Custom rendering
Posted: Tue Mar 17, 2009 10:51 am
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 ?
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 ?