Author Topic: MD2-Loader  (Read 6387 times)

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5013
  • O Rly?
    • View Profile
MD2-Loader
« on: 2008-Dec-27 »
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]
« Last Edit: 2008-Dec-27 by Schranz0r »
I <3 DGArray's :D

PC:
AMD RYzen 7 1700 @3.9Ghz, 16GB HyperX Fury 2666Mhz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Hatonastick

  • Guest
Re: MD2-Loader
« Reply #1 on: 2008-Dec-30 »
Very cool!   :good:  Wish I had even half your coding ability.  :'(

Will you be looking at adding animation later on?
« Last Edit: 2008-Dec-30 by Hatonastick »

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5013
  • O Rly?
    • View Profile
Re: MD2-Loader
« Reply #2 on: 2008-Dec-30 »
I dont know  :|
Thats realy hard  :puke:
I <3 DGArray's :D

PC:
AMD RYzen 7 1700 @3.9Ghz, 16GB HyperX Fury 2666Mhz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard