Drawing order
Posted: Thu Nov 09, 2006 8:58 pm
I have 2 objects that I wish to draw one above the other and I would like some advice on how this could be done.
I have
- Sphere --> world pos = 0,0,0
- Cube --> world pos = 0,0,1
So if the camera is at (0,0,5) looking at (0,0,0)
Calling pSceneManager->drawAll() would render the Cube in "front" of the Sphere
Now I wish to render the Cube "behind" the Sphere while keeping all my objects in their respective positions.
In pseudo code, here is what I did
Hide the Sphere
Show the Cube
pSceneManager->drawAll()
Show the Sphere
Hide the Cube
pSceneManager->drawAll()
Now doing that, I would expect the Sphere to be drawn on to of the Cube that is not the case. Can anyone hint on what I've done wrong please.
I have
- Sphere --> world pos = 0,0,0
- Cube --> world pos = 0,0,1
So if the camera is at (0,0,5) looking at (0,0,0)
Calling pSceneManager->drawAll() would render the Cube in "front" of the Sphere
Now I wish to render the Cube "behind" the Sphere while keeping all my objects in their respective positions.
In pseudo code, here is what I did
Hide the Sphere
Show the Cube
pSceneManager->drawAll()
Show the Sphere
Hide the Cube
pSceneManager->drawAll()
Now doing that, I would expect the Sphere to be drawn on to of the Cube that is not the case. Can anyone hint on what I've done wrong please.