Welcome! Log In Create A New Profile

Advanced

Clear Z Buffer Without Copying Frame

Posted by punmaster 
Clear Z Buffer Without Copying Frame
January 13, 2009 12:02AM
Does anyone know how to clear the Z buffer in GX without doing a frame copy. I am basically looking for a GX equivalent to OpenGL's "glClear(GL_DEPTH_BUFFER_BIT);". I want to do this because I am rendering several layers of models and textured quads and I want to stack them according to the order in which I draw them, not concerning their Z values. I can't just turn the Z buffer off, because I want Z buffer clipping to be used while the individual layers are being drawn. I only want to clear it in between layers. I considered using "GXPokeZ(...);" to do this manually, but unfortunately, this command is executed immediately, which is worthless if the rest of my commands are still in the FIFO. Instead of doing something potentially complicated and/or expensive, such as doing a frame copy to a temporary buffer, flushing my FIFO, or using FIFO interrupts, I thought I'd ask if anyone here had any better ideas. Maybe I am missing something much more obvious. Either way, thank you in advance, and happy coding. :)
Sorry, only registered users may post in this forum.

Click here to login