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: Lighting Question

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2005
    Posts
    8

    Lighting Question

    In gl.h, there is a constant GL_MAX_LIGHTS and it's a hex number. The same number in decimal is 3377. Is that right? Can I have 3377 light sources?

  2. #2
    Junior Member Newbie
    Join Date
    Aug 2005
    Location
    Pasadena, CA
    Posts
    6

    Re: Lighting Question

    Not quite. Use glGetIntegerv() to query the OpenGL state machine and print the result, and you'll see the maximum number of lights is actually much lower.

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2005
    Location
    France
    Posts
    10

    Re: Lighting Question

    #define GL_MAX_LIGHTS 0x0D31

    it means that the maximum number of lights is the integer at the adress 0x0D31. it's just a pointer!

    With 3377 lights, I'll be able to build a big night club

  4. #4
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,453

    Re: Lighting Question

    Pointers? That sounds like "Peeks and pokes for OpenGL".
    The GL_ defines are the GLenum values you use in most OpenGL commands. They are by no means pointers, just values.

  5. #5
    Junior Member Newbie
    Join Date
    Jun 2005
    Location
    France
    Posts
    10

    Re: Lighting Question

    I know it's not a pointer. But, for example, GL_EXP2,GL_CCW or GL_TRIANGLES are just some constants used in switch statement.

    GL_MAX_LIGHT refers to an intern pointer. I kwow it's not THE real pointer but it refers to a pointer. That is why you must call the function glGet...

    Sorry if my answer wasn't clair and if I'm in a mist, thank you for correcting me

    Good programming!!!

Posting Permissions

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