Topic: Hi and question

Im a Swedish guy trying out my first project in the 3Dworld ever and have chosen this great (and god damn its great Gman!) engine. Thanks for delivering it to BMax.

Now a newbie question.. as it seems like Irrlicht does provide its own methods to listen and controlling keyboard inputs, which should I use when programming in BMAX? The irrlicht or BMAX methods? Does it really matter (speed, intereference etc.)

Re: Hi and question

greetings AJirenius smile  thx for the complement!  you should definately use the Irrlicht input routines.  BlitzMax is not the one creating the forms so the events are not being captured properly by the built-in BlitzMax input system.  now, there is a class in the gg.IrrAddons that helps simulate the BlitzMax input system and makes input reading much smoother.  for example, with straight Irrlicht, you cannot read if two keys are held down at the same time.

the class inside of gg.IrrAddons you would be looking for is:

T_irrSmoothEventReceiver

unfortunately i dont have a good example of how to use it.  if you cant figure it out, just lmk and ill try to whip up an example for you.

Re: Hi and question

Great! Thank you very much.. as I proceed with this project I will put up some links and advert both your effort and Irrlicht. I will soon also put up some "help needed" with this project as I really would like to focus  on the graphics more than the programming this time but still it is very smooth to work with.

4 (edited by AJirenius 2006-02-20 10:12:20)

Re: Hi and question

I continue my questions in this thread (think there will be a few as Im new to this)

Im trying to simpify this problem to the first sample of Irrlicht.

When I compile the first example it works great but if I build my own type with the mesh and the meshnode I get.. nothing. The mesh loads and the texture loads but it doesnt show anything. Example given (without the samplecomments) I only added a type and used an object of that type to show the mesh.
Am I totally way out??? Dont laugh smile

Strict

Framework BRL.Blitz

Import gg.IrrBMAX

' The new type containing just an AnimatedMesh and The AMSN.

Type Unit
    
    Field mesh:T_irrIAnimatedMesh
    Field node:T_irrIAnimatedMeshSceneNode    

End Type

' And heres that object.
Local Test:Unit 



Local device:T_irrIrrlichtDevice=T_irrIrrlichtDevice.create(EDT_SOFTWARE,T_irrDimension2d_s32.create(640,480),16,False,False,False,Null)

device.setWindowCaption("Hello World! - Irrlicht Engine Demo")

Local driver:T_irrIVideoDriver=device.getVideoDriver()
Local smgr:T_irrISceneManager=device.getSceneManager()
Local guienv:T_irrIGUIEnvironment=device.getGUIEnvironment()

guienv.addStaticText("Hello World! This is the Irrlicht Software renderer!",T_irrRect_s32.createFromVals(10,10,200,22),True)


Test.mesh=smgr.getMesh("../media/sydney.md2")
Test.node=smgr.addAnimatedMeshSceneNode(Test.mesh)

If Test.node.handle<>0
    Test.node.setMaterialFlag(EMF_LIGHTING,False)
    Test.node.setFrameLoop(0,310)
    Test.node.setMaterialTexture(0,driver.getTexture("../media/sydney.bmp"))
EndIf


Local camera:T_irrICameraSceneNode=smgr.addCameraSceneNode(Null,T_irrVector3df.createFromVals(0,30,-40),T_irrVector3df.createFromVals(0,5,0))


While (device.run())

    inScene(True,True,T_irrSColor.createFromVals(255,100,101,140))
    
    smgr.drawAll()
    guienv.drawAll()
    
    driver.endScene()

Wend

device.drop()

5 (edited by DaY 2006-02-20 12:18:46)

Re: Hi and question

it might be as u need
( - Test.node.setMaterialFlag(EMF_LIGHTING,False) - )


Test.mesh=smgr.getMesh("../media/sydney.md2")
Test.node=smgr.addAnimatedMeshSceneNode(Test.mesh)
Test.node.setMaterialFlag(EMF_LIGHTING,False)

as u need to make shore the mesh has its own lighting switched on if u dont have any dynamic or atmospheric lights on so it needs to be done at setup or maybe ur mesh is just realy small