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

Thread: Separate specular colour

  1. #1
    Intern Contributor
    Join Date
    Aug 2000
    Location
    St. Andrews, Fife, Scotland
    Posts
    61

    Separate specular colour

    I have been writing an OpenGL based game which uses both texture mapping and lighting. I realised that lighting did not appear to be working on all texture mapped areas. After some reading in the red book, I discovered that what I needed to do was separate the specular colour. This call should have done the trick.
    Code :
    glLightModeli (GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);
    however my compiler came up with an error - the constants are undefined. Is this a great big hole in Apple's implementation of OpenGL or is the red book talking analy. Anyway, what should I do?
    From the man with the
    mac and hence the
    mission POSSIBLE.

  2. #2
    Guest

    Re: Separate specular colour

    i'm still learning opengl on the mac, so i apologize if what i'm about to say is absolute nonsense. : )

    i'm guesssing there might be two problems.
    one could be that you may have to use a specific agl command, but i doubt thats it though.
    Another thing is that you may have to define the specular color, or the specular related constants. Does the red book mention any extra codes needed, like for gl_lighting commands you can choose color, agle, direction. so maybe specular requires this to in a sense.

    well those are my guesses.


  3. #3
    Intern Contributor
    Join Date
    Aug 2000
    Location
    St. Andrews, Fife, Scotland
    Posts
    61

    Re: Separate specular colour

    I've worked it out now, you don't need to specify anything extra, it's just normal lighting except with the specular colour applied after the texture. However it only works with OpenGL 1.2, the Apple SDK is only OpenGL 1.0.
    From the man with the
    mac and hence the
    mission POSSIBLE.

Posting Permissions

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