View Full Version : Perspective -> Orthographic -> Perspective. Textures die!!?

10-20-2000, 06:31 AM

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.

Can anybody help?


10-20-2000, 07:32 AM
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.

10-23-2000, 12:42 AM
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?

Luke A. Guest.

10-23-2000, 01:48 AM
Can you send some code so that we can debug it on our side ?

My e-mail address is available via the question mark on top of this topic...

If you can't send code, can you post part of your code ?



10-23-2000, 02:19 AM
It's okay, I've just added some code to turn the blending function on and off.

Oh, and I added a few more calls to the texture_env_combine extension.

It's all my fault! Doh! ;-)

Thanks for the help anyway,
Luke A. Guest.