I was wondering if there was a way to make OpenGL ES render a batch of quads (rendered with texture page changes) and render them in z order (or reverse).
Note I don’t want a ZBuffer, I just want quads rendered in order of zDepth.
Now I know people will say just render them in order, well I render grouped by texture page. However as you can imagine there are some cases where sprites from one texture page need to appear in front of another. When you only render on a texture page sort this causes a problem.
So I was wondering if I assigned the quads a z order would OpenGL ES respect this?
Any help greatfully received.
Cheers
Rich
You cannot achieve what you want without Z Buffer / Depth Buffer.. What you are asking is the Depth Buffer’s work done without enabling it !!
When Z buffer is enabled,everytime OpenGL draws to a pixel.. it checks the pixels existing Z value and then decides on whether to draw it or not.
When Depth Buffer is not enabled it simply overwrites irrespective of what z value of previous existing pixel was.