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

Thread: Lighted texture

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2002
    Location
    Hawamdia, Giza, Egypt
    Posts
    19

    Lighted texture

    Hello all,
    The OpenGL doesn't add light to textures automatically.
    Can any one help me doing that ?

    MHassan

  2. #2
    Member Regular Contributor CrazyButcher's Avatar
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    402

    Re: Lighted texture

    glEnable(GL_LIGHT0)
    glEnable(GL_LIGHTING)

    and make sure your texture environment is GL_MODULATE and you have correct normals for all vertices

    http://nehe.gamedev.net
    http://www.gametutorials.com

    billions of tutorials here, also have lighting explained

Posting Permissions

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