Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: It's all very dark....

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2001
    Posts
    18

    It's all very dark....

    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.
    W-E-R-D

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    May 2000
    Location
    Oxford, England
    Posts
    547

    Re: It's all very dark....

    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....

  3. #3
    Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Vancouver BC Canada
    Posts
    433

    Re: It's all very dark....

    ... you are about to be eaten by a grue.


    Sorry, couldn't resist


    Anyways, #3 and #4 on Rob's list are the most likely problems. I speak from experience

  4. #4
    Junior Member Newbie
    Join Date
    Jul 2001
    Posts
    18

    Re: It's all very dark....

    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
    W-E-R-D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •