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 Frequent Contributor
    Join Date
    Feb 2000
    Location
    France
    Posts
    880

    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
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    milano, italy
    Posts
    282

    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

Similar Threads

  1. Specular light shader
    By paradoxresolved in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-20-2014, 06:57 PM
  2. directional light specular
    By somboon in forum OpenGL: General
    Replies: 4
    Last Post: 05-05-2010, 03:20 PM
  3. Specular Light Problem
    By MasterDunx in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-22-2010, 05:39 PM
  4. No Specular light :(
    By McZ in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-16-2003, 11:18 PM
  5. Specular light
    By Tandyi in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 05-24-2002, 09:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean