MD2-Loader

Previous topic - Next topic

Schranz0r

Now you can load MD2-Models into GLBasic!
No animation supported yet... sorry...  :S

Code (glbasic) Select

//MD2_LoadModel(filename$, Object_ID%)
//on success -> return the Object_ID%
//else return -1 !

model = MD2_LoadModel("car.md2",1)


Example:

Code (glbasic) Select
model = MD2_LoadModel("car.md2",1)
LOADSPRITE "car.png", 1


LOCAL phi

WHILE TRUE

X_MAKE3D 1,10000,45
X_CAMERA 0,400,400, 0,0,0

INC phi,1

X_ROTATION phi, 0,0,1

X_SETTEXTURE 1, -1
X_DRAWOBJ model, 0

X_DRAWAXES 0,0,0

SHOWSCREEN
WEND
END



Download see attachment
;)


IMPORTANT:

You need this: http://www.glbasic.com/files/headers.rar
Unpack into : Program Files\GLBasic\Compiler

Screenshot:



[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

Hatonastick

#1
Very cool!   :good:  Wish I had even half your coding ability.  :'(

Will you be looking at adding animation later on?

Schranz0r

I dont know  :|
Thats realy hard  :puke:
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