Hi, i hope i will get some help here.
In my game i use diffrent viewports.
One for the main window and another one for a inventory window.
In the main window i can draw easily scene nodes by calling smgr->drawall().
In my inventory window i have to draw single objects.
here are the steps i have made in the rundevice() loop:
1. change the viewport
2. set the active camera ( to inventory)
3. render the camera
4. make an object visible
5. render the object
6. make this object invisible again.
All objects are drawn in the inventory, but i still have two problems:
1. It seems render() doesn't take care of the rotation of the object. There is something missing which is included in smgr->drawall() which updates the rotation.
2. Additionally i want to use a lightscenenode in this inventory to light the objects. Somehow it doesn't work. Where in the sequence above do i have to render the light ? (before or after the camera/objects ?)
And what additional commands are needed to light the objects ?
Custom rendering
Would the CGUIViewport that I wrote a while ago work for you? It was originally written for Irrlicht 1.3 or so, but updating it should be fairly easy.
The CGUIViewport is just a standard IGUIElement that renders an Irrlicht scene in the space it covers. The scene could have a camera, lights, and all that stuff. You don't need to write any rendering code, just the code to initialize and configure and the CGUIViewport and then call gui->drawAll() just like you normally would.
Travis
The CGUIViewport is just a standard IGUIElement that renders an Irrlicht scene in the space it covers. The scene could have a camera, lights, and all that stuff. You don't need to write any rendering code, just the code to initialize and configure and the CGUIViewport and then call gui->drawAll() just like you normally would.
Travis