Codesnippets > Userlibs [ *.gbal]
MD2-Loader
(1/1)
Schranz0r:
Now you can load MD2-Models into GLBasic!
No animation supported yet... sorry... :S
--- Code: (glbasic) ---//MD2_LoadModel(filename$, Object_ID%)
//on success -> return the Object_ID%
//else return -1 !
model = MD2_LoadModel("car.md2",1)
--- End code ---
Example:
--- Code: (glbasic) ---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
--- End code ---
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]
Hatonastick:
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:
Navigation
[0] Message Index
Go to full version