Questions about how Irrlicht drawing is done.

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
WindScar
Posts: 7
Joined: Wed Sep 01, 2010 10:38 pm

Questions about how Irrlicht drawing is done.

Post by WindScar »

1. First you add nodes to the Scene Manager. Each node contains one or more meshes. Then you add a CameraSceneNode to the scene manager and configure it. Then you call the function drawAll() of your scenemanager objects and everything is drawn to the video buffer based on that CameraSceneNode. Is this all right?

But what if you add 2 CameraSceneNodes? Is there a way to switch between them?

And also about some functions from the video namespace like video::draw3DLine. Will those functions use the CameraSceneNode on the Scane Manager object to calculate the projection? What if there is no Scene Manager created in the program? How to set the camera for the video drawing functions?

Thanks in advance.
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Most of these things should be answered by the tutorials. Please read them thoroughly.
All functions use the currently set projection matrix, except they do their own projection handling.
WindScar
Posts: 7
Joined: Wed Sep 01, 2010 10:38 pm

Post by WindScar »

How do you set the current projection matrix? I swear I've read the whole documentation and didn't find the answer.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

IVideoDriver::setTransform() is used to set the transformation matrix that is used to render. The active camera scene node automatically sets the view and projection matrix.

You could find this pretty easily by tracing through the source of ISceneManager::drawAll().

Travis
Post Reply