Page 1 of 1

Problem in the simpliest project you can imagine...

Posted: Fri May 07, 2010 10:40 pm
by Manawenuz
Hi everybody!

I can't figure out why this programme doesn't work. It just consists in a ICameraSceneNode, a CSphereSceneNode (implemented in my graphics.cpp file). Everything is just fine up to link, and when I execute the final program, the sphere is much bigger than what it should be...
I also noticed that the result is exactly the same if I just comment out the line where I add the camera. As if the creation of the camera is not taken into account...
See the code (and forgive me for the few french words remaining :))

Thank you for your help

PS : I'm coding with a Mac, so you may have to adapt the Makefile

Posted: Sat May 08, 2010 12:54 am
by DtD
You do not need to be copying code from Irrlicht into your program's source. Generally speaking the I... classes are interface classes you should be using, and C... classes are the actual implementations.

The proper way of adding a sphere scene node would be with the ISceneManager addSphereSceneNode function.

~David

Posted: Sat May 08, 2010 11:27 am
by Manawenuz
I am aware of that, but I needed a concrete class to make my class GraphicsObject inherit from CSphereNode...
But well anyway I gave another structure to the code, make my call GraphicObject inherit from IMeshSceneNode directly. (I admit it's better :))
But I have exactly the same result

I really don't understand where the problem comes from

PS : I updated the link. Now you can download the modified version