Currently, I have GL_DEPTH_TEST
enabled and use it for textures. However, I'd like to draw a untextured rectangle with a certain depth/z value.
glDisable(GL_TEXTURE_2D);
glColor3f(colour.x, colour.y, colour.z);
glRects((short) rect.x, (short) rect.y, (short) rect.z, (short) rect.w);
glEnable(GL_TEXTURE_2D);
The code above draws the square. How do I set a Z or depth value for the square so that depth testing works with it?