I'm currently trying out a more objectoriented way of wrapping irrlicht which means that it won't be very pleasant to use in Blitz3D.
But I believe theduck will cover that part.
Anyway, here is an example on how to load a quake3 map and load a dwarf.
Currently the wrapper only supports dwarves ;)
//Edit
Just wanted to mention a little about the method I'm using.
Basically I break down the whole namespace/class structure of Irrlicht into a set of "plain" functions.
I export these functions and create declarations for them in Bmax.
Then in Bmax I reconstruct the whole structure again using Bmax types and methods which call the declared functions.
So far it works pretty well and I will do some performance tests to see if this method have any significant impact on the performance or not.
Wrapping this way is a tremendous amount of work but I'm currently working on a tool that will do this for me.
The wrappertool should theoretically be able to wrap any kind of C++ Api this way but that is a later project.
But I believe theduck will cover that part.
Anyway, here is an example on how to load a quake3 map and load a dwarf.
Currently the wrapper only supports dwarves ;)
Import "-lirrwrap" Include "IrrInclude.bmx" Local Device:Irr_IrrlichtDevice = CreateIrrlichtDevice(800,600,32,False,False,False) Local Scene:Irr_SceneManager = Device.getSceneManager() Local Video:Irr_VideoDriver = Device.getVideoDriver() Local FileSystem:Irr_FileSystem = Device.getFileSystem() Local Mesh:Irr_AnimatedMesh = Scene.GetMesh("C:\dwarf\dwarf1.x") Local Node:Irr_AnimatedMeshNode = Scene.AddAnimatedMeshNode(Mesh) Local Camera:Irr_CameraNode = Scene.AddCameraNodeFPS() FileSystem.AddZipFileArchive("C:\q3levels\meatpak\meatpak.pk3") Local LevelMesh:Irr_AnimatedMesh = Scene.GetMesh("maps\whitemeat.bsp") Local LevelNode:Irr_SceneNode = Scene.AddOctTreeSceneNode(LevelMesh) While Device.Run() = True Video.BeginScene(True,True,Null) Scene.DrawAll() Video.EndScene() FlushMem() Wend Device.Drop()
//Edit
Just wanted to mention a little about the method I'm using.
Basically I break down the whole namespace/class structure of Irrlicht into a set of "plain" functions.
I export these functions and create declarations for them in Bmax.
Then in Bmax I reconstruct the whole structure again using Bmax types and methods which call the declared functions.
So far it works pretty well and I will do some performance tests to see if this method have any significant impact on the performance or not.
Wrapping this way is a tremendous amount of work but I'm currently working on a tool that will do this for me.
The wrappertool should theoretically be able to wrap any kind of C++ Api this way but that is a later project.