PDA

View Full Version : It's all very dark....



zoldar256
07-16-2001, 09:31 AM
Hmmm... I'm trying to apply a simple texture to a simple surface of quads. But when I render the scene it all shows up black. Even if I draw a line and set it's color to white. It's black too. But if I don't set a min filter, it all shows up blue. I'm confused.... Oh, the texture2d function looks like this:
glTexImage2D(GL_TEXTURE_2D, 0, 1, 64, 64, 0, GL_RED, GL_UNSIGNED_BYTE, textureMap);
which all seems fine to me.

Rob The Bloke
07-16-2001, 01:54 PM
1. Have you specified texturing coordinates for your object?
2. If you have glTexEnvf(GLTEXTURE_ENV , GL_TEXTURE_ENV_MODE , GL_MODULATE); listed somewhere make sure the colour you have specified using glColor*() is NOT black. (alternatively specify GL_REPLACE)
3. If you have lighting enabled, have you specified normals & set the position of the light.
4. Have you ensured that the camera is in the correct place to see the texture mapped object?

If yes to all the above post a listing of your code....

rts
07-16-2001, 06:28 PM
... you are about to be eaten by a grue.


Sorry, couldn't resist http://www.opengl.org/discussion_boards/ubb/smile.gif


Anyways, #3 and #4 on Rob's list are the most likely problems. I speak from experience http://www.opengl.org/discussion_boards/ubb/smile.gif

zoldar256
07-17-2001, 07:42 AM
Originally posted by Rob The Bloke:
1. Have you specified texturing coordinates for your object?
2. If you have glTexEnvf(GLTEXTURE_ENV , GL_TEXTURE_ENV_MODE , GL_MODULATE); listed somewhere make sure the colour you have specified using glColor*() is NOT black. (alternatively specify GL_REPLACE)

Yeah! W-E-R-D.... #2 was it, thanks for your help without seeing the code. It woulda been really tough for me to post the code. :-D