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 highlight

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2008
    Location
    Viet Nam
    Posts
    12

    Specular highlight

    Hi, I have a program with a sphere and a cylinder, I copied the code to draw the sphere from my book, and I draw the cylinder by myself. The sphere has a nice specular spot on it when I move the light around, but I can not make the cylinder has any specular spot, please help. I draw both object with same color, same material settings.

    Thank you.

  2. #2
    Intern Contributor
    Join Date
    Jan 2007
    Posts
    89

    Re: Specular highlight

    Does the diffuse lighting work? If not, check the normals.

    If you use normal per-vertex lighting(glLight), generate more triangles for the cylinder.

  3. #3
    Intern Contributor uruk's Avatar
    Join Date
    Dec 2004
    Location
    acasa :) sau la munca :(
    Posts
    66

    Re: Specular highlight

    I think this is what you need:
    Code :
    glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,GL_SEPARATE_SPECULAR_COLOR);
    Stat rosa pristina nomine, nomina nuda tenemus.

Posting Permissions

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