I have a simple iPhone OpenGL ES app, in which I render a full-screen background image using a texture, and then draw 3D polyhedra on top of it using lines. The texture is displayed using glDrawTexfOES.
The problem is that I don't seem able to display the polyhedra on top of the background. In the glDrawTexfOES call, if I use a z value of less than 1, the background image shows but no polyhedra. If the z value is 1 (or more), the polyhedra show but not the background image.
Blending is not enabled. Depth testing is on. Depth buffer attached. Depth testing seems to be working when just the polyhedra are drawn. The polyhedra are drawn with simple lines.
The z value behavior suggests that maybe the polyhedra have depth buffer values of 1...?
Any clues to how to get both background image and foreground objects displayed?