Topic: Loading .x models with the irrlicht mod
Hello all,
I am new to both Irrlicht and Blitzmax. I want to thank Gman for this wonderful mod.
Recently, I tried to modify the Hello World example to load a .X (DirectX) animated model. However, even though the program compiles and runs, the mesh is not displayed. Here's the code I used.
Local driver:IVideoDriver = device.getVideoDriver()
Local smgr:ISceneManager = device.getSceneManager()
Local guienv:IGUIEnvironment = device.getGUIEnvironment()
Local mesh:IAnimatedMesh = smgr.getMesh("characteranimation3.x")
If (mesh)
Print "Mesh loaded succesfully."
EndIf
Local node:IAnimatedMeshSceneNode = smgr.addAnimatedMeshSceneNode( mesh )
If (node)
Print"The animated scene node exists!"
EndIf
smgr.addCameraSceneNode(Null, _VECTOR3DF(0,30,-40), _VECTOR3DF(0,5,0))
While(device.run())
driver.beginScene(True, True, _SCOLOR(255,100,101,140))
smgr.drawAll()
guienv.drawAll()
driver.endScene()
Wend
Both IF commands execute, which means I should be seeing my model.... but I can't. Can anyone explain this? Any help will be greatly appreciated.