Page 1 of 1

Z indices?

Posted: Sat Aug 20, 2005 1:03 am
by Dances
OK, I am making a 3d game, which of course has a HUD display rendered over top everything else. At current I am rendering my HUD every frame to keep it over top of everything else. Is there a way to keep the old rendering of the HUD on top of the new 3d all the time via a 'z index' or something so I only have to redraw the HUD when there are changes to the data displayed?

P.S. my scene is 3d and my HUD is 2d images and text.

Posted: Sat Aug 20, 2005 7:33 am
by T101
Other than rendering your HUD into a texture when it changes and displaying that texture every frame: no.

The 2D overlays are rendered over the 3D scene. Since the 3D scene is rendered first, the HUD will have been overwritten.

Posted: Sat Aug 20, 2005 5:35 pm
by Dances
Alright, thanks then. It'd be nice if there was a way to omit certain pixels from rendering, or to keep certain things on top, much less requirement on the CPU, but I'll take what I can get. Thanks for answering.