I have got a 2D mesh working now - it’s a frame rate counter. When I render the 2D mesh, I change the projection to orthographic and then when finished, I pop my mtrices back to the way they were before I rendered the mesh.
The problem is this, I have a cube in the scene which has one texture on each face, but this cube is rendered a flat black.
What can be happening here? The lighting is begin put back on, so is the texture. This is very odd.
If I have multiple meshes in the scene everything works fine, but as soon as I put in the frame rate counter I get this problem.
It could be one of several things. What texture environment mode is being used when texturing the cube? If it is GL_MODULATE, make sure that the current color is not black.
Well, I have checked the code and we don’t seem to getting black vertex colours anywhere.
I have inserted lines to set the current colour to white when GL_MODULATE is set and this doesn’t change anything either.
This seems strange though considering we only get this problem when I start using 2D graphics over the top of the 3D scene. Can anyone explain why this might be the case?