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 5 of 5

Thread: Turn off the lights

  1. #1
    Junior Member Newbie
    Join Date
    May 2009
    Posts
    9

    Turn off the lights

    Hello!

    I'm trying to turn off the lights but I can't.

    I'm using just glEnable(GL_LIGHTING); and then adding no lights.

    Where am I going wrong?

  2. #2
    Junior Member Regular Contributor
    Join Date
    Apr 2009
    Posts
    185

    Re: Turn off the lights

    please give some code
    but may be
    and perhapes you not enabled GL_LIGHT0 (it might be source id 0 of light)
    and
    i think it follows Global Light Problem Right?

    (
    please not much cause i am newbie
    )
    haven't made a game [img]<<GRAEMLIN_URL>>/frown.gif[/img]

  3. #3
    Junior Member Regular Contributor
    Join Date
    Apr 2009
    Posts
    185

    Re: Turn off the lights

    is it
    http://www.falloutsoftware.com/tutorials/gl/gl8.htm
    and it will same as i posted in Global Light Problem
    some where you find
    ambiancy diffuse shininess used properly in code some times by wrong position color not give desireable result
    glEnable(GL_LIGHTING);
    glEnable(GL_LIGHT0);
    glLighfv(..
    ....
    ...
    glMaterial....
    thats final from me(pleease send me game)
    haven't made a game [img]<<GRAEMLIN_URL>>/frown.gif[/img]

  4. #4
    Junior Member Newbie
    Join Date
    May 2009
    Posts
    9

    Re: Turn off the lights

    Thanks for the reply.

    The problem was not that it was dark but that it was light and I had no lights enabled.

    It turns out that the core problem was that I was drawing the textures with
    glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);

    instead of

    glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);

  5. #5
    Junior Member Regular Contributor
    Join Date
    Apr 2009
    Posts
    185

    Re: Turn off the lights

    The problem was not that it was dark but that it was light and I had no lights enabled.
    is your problem solved
    if please send me the game(i love games)
    haven't made a game [img]<<GRAEMLIN_URL>>/frown.gif[/img]

Posting Permissions

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