1 (edited by danman 2007-11-20 09:23:41)

Topic: Returning the device created by ib3d

Hi gman the more i'm using this the more i'm getting into it!!  smile

I am a bit stuck at the moment, basically ive been using the .b3d side of things and was wondering how to do the following:

1- access  the irr device created by the graphics3d command. I need to be able to use the event system from irrlicht core as well as the gui but want to use the ib3d commands for mesh control and key input. Is this possible?
I thought i could do it reading type "ib3d_engine.device" but cannot, are these fields private?

2- When i create a mesh/primitive/camera/light using b3d commands, how can i reference the object when switching to the irrlicht style of programming? At the moment i get messages like cannot convert ib3d_mesh to irrlicht.core.mesh (or something like that)

Re: Returning the device created by ib3d

Type MyGameEngine Extends ib3d_engine
    Method OnEvent:Int(event:SEvent)
        DebugLog("EVENT")
    EndMethod
EndType

Re: Returning the device created by ib3d

Thanks, that helps me loads.

4 (edited by danman 2007-12-11 15:53:22)

Re: Returning the device created by ib3d

One more Q on this,

b.h=ib3d_copyentity(bullet)

as there is no copyentity/mesh, how could i make the ib3d type convert into a irrlicht type to be copied using irrlicht core commands and returned as an ib3d type.

Re: Returning the device created by ib3d

unfortunately there is not a really good way at the moment.  i dont have the APIs with me but you would need to use the ISceneNode clone method to get a new ISceneNode.  you would need to create a new MESH using new (ie New MESH), and then i think its called SetNode() on mesh passing in the new ISceneNode which will then setup everything it needs in ib3d.