Irrlicht Wrapper for GLBasic!

Previous topic - Next topic

Schranz0r

I start to wrapp the Irrlicht-Engine, it works fine :)

Code atm:

Code (glbasic) Select

AUTOPAUSE FALSE
Irr_CreateDevice(640,480,32)
Irr_SetWindowCaption("Irrlicht Test")
Irr_GuiAddStaticText("Hello World!", 10,10,200,25)
LOCAL sydney = Irr_GetMesh("media/sydney.md2")
LOCAL node = Irr_AddAnimatedMeshSceneNode(sydney)
Irr_SetMaterialFlag(node)
Irr_SetMaterialTexture(node, "media/sydney.bmp")

Irr_AddCameraSceneNode(0,30,-40,0,5,0)


WHILE Irr_DeviceRun()

Irr_BeginScene(TRUE,TRUE,255,100,101,140)
Irr_DrawAll()
Irr_GuiDrawAll()
Irr_EndScene()
WEND
Irr_DropDevice()
END


I use the LibIrrlicht.a, headers and the Irrlicht.dll !

[attachment deleted by admin]
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

Topzombie


Quentin

Supi Schranzor. Mit dem Gedanken hatte ich auch schon mal gespielt. Die GUI-Funktionen von Irrlicht wären sicherlich auch einen Blick wert.

Schranz0r

#3
Kann Euch das gerne schicken...
Bin grad ein bisschen beschäftigt  :/

Edit: ich bin so Frei und lads hoch :D

Achja das braucht ihr auch noch:

http://downloads.sourceforge.net/irrlicht/irrlicht-1.6.zip

[attachment deleted by admin]
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

bigsofty

Good work!  :good:

You basing it on Frank Dodds FB wrapper or the official SF C++ headers?

Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Schranz0r

It basing on Schranz0r GLBasic Wrapper  :D

No, i Include the official Headers and Wrapp it inside of GLBasic...
Works fine!
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

bigsofty

Ah, even better, Franks wrapper is getting out of date!  ;)
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Quentin

Super! Schon mal ein guter Einstieg.
Hast die Includes unter ../Compiler/platform/Include abgelegt?

Schranz0r

nein, ich hab sie unter:

C:\Program Files\GLBasic\Compiler\platform\Win32\Include

und natürlich :

C:\Program Files\GLBasic\Compiler\platform\Win32\Lib


das GLBasic-Header-Packet darf man natürlich auch net vergessen!

http://www.glbasic.com/files/headers.rar
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

devo

Hat jemand das Ding weiterentwickelt ?  ;/

Schranz0r

Quote from: devo on 2010-Mar-29
Hat jemand das Ding weiterentwickelt ?  ;/

Nein da leider wenig interesse daran stand hatte ich es auf Eis gelegt, wenn jedoch ein paar das wollen mach ich weiter!
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

devo

Quote from: Schranz0r on 2010-Mar-29
Quote from: devo on 2010-Mar-29
Hat jemand das Ding weiterentwickelt ?  ;/

Nein da leider wenig interesse daran stand hatte ich es auf Eis gelegt, wenn jedoch ein paar das wollen mach ich weiter!

Oh, schein ja der einzige zu sein, der sich dafür interessiert.  ;/   Bin Neuling mit GLB und hab da so meine Schwierigkeiten. :S
Normal nutze ich Irrlicht unter FreeBasic und Delphi. Was mich interessiert ist die Einbringung der NewtonSDK.
Der Newtonwrapper unter GLB ist cool.

Schranz0r

Jo der ist super, hat Gernot aka Hello Kitty super gemacht ;)
Werde die Tage mal weiter basteln und dir dann Fortschritte melden. (Irrlicht)

Grüße
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

devo

Quote from: Schranz0r on 2010-Mar-30
Jo der ist super, hat Gernot aka Hello Kitty super gemacht ;)
Werde die Tage mal weiter basteln und dir dann Fortschritte melden. (Irrlicht)

Grüße


Cool.
Kannste mir mal erklären was für ein Array durch DGArray festgelegt wird ?
MfG.

Schranz0r

DGArray im INLINE ist "sowas" wie Vector in C++

du kannst Klassen, pointer, jeglichen Dateityp reinpacken :)

kleiner Test(Sinnfrei aber soll ja nur zeigen wie es geht):

Vec.gbas
Code (glbasic) Select
INLINE

struct Vec
{
int x;
int y;
};

DGArray<Vec>MyTvecs; // Vec ins Array als Dateityp

ENDINLINE


FUNCTION CreateVector: x%, y% // returns Vec_ID
INLINE
Vec MyVec;
MyVec.x = x;
MyVec.y = y;
DIMPUSH(MyTvecs,MyVec); // ins Array einfügen!

return LEN(MyTvecs)-1; // item 1 = 0;  item 2 = 1 usw :)

ENDINLINE
ENDFUNCTION 


FUNCTION GetVectorX: Vec_ID%
INLINE
return MyTvecs(Vec_ID).x;
ENDINLINE
ENDFUNCTION

FUNCTION GetVectorY: Vec_ID%
INLINE
return MyTvecs(Vec_ID).y;
ENDINLINE
ENDFUNCTION




main.gbas
Code (glbasic) Select
LOCAL vec1 = CreateVector(10,20)
LOCAL vec2 = CreateVector(50,60)


WHILE TRUE

PRINT "Vec_ID: "+vec1+" | x: "+GetVectorX(vec1)+" | y: "+GetVectorY(vec1), 10,10
PRINT "Vec_ID: "+vec2+" | x: "+GetVectorX(vec2)+" | y: "+GetVectorY(vec2), 10,30


SHOWSCREEN
WEND
END
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard