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: specular light

  1. #1

    specular light

    Hi,

    Do you need ambient and diffuse or one of them to have specular light. I set up a menu to toggle between the lights to see differant effects but when i enable specular the lights go out. ambient and diffuse work by themselves.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Feb 2000
    Location
    France
    Posts
    1,118

    Re: specular light

    You must have some kind of an error in your code (ambient, diffuse and specular work separately !).

    Could you post you lights initialization code here so that we can have a look at the problem ?

    Cheers.

    Eric

  3. #3
    Member Regular Contributor
    Join Date
    Feb 2000
    Location
    milano, italy
    Posts
    288

    Re: specular light

    remember to set the material shininess with a call to something like
    glMaterialf(GL_FRONT,GL_SHININESS,50)

    the default is 0, wich is the worst value SGI have chosen

    also be careful if you're scaling your object: try to enable normalization with
    glEnable(GL_NORMALIZE)

    Dolo/\/\ightY
    Dolo/\/\ightY

Posting Permissions

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