Results 1 to 4 of 4

Thread: Light Problem

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2004
    Posts
    15

    Light Problem

    Another confusing situation!!
    I've used GLUT library in my program to draw spheres and cones and I also have some lights in space. Funny part is that, the objects drawn by GLUT are affected by light and the polygons that I've drawn are not!! My polygons are rendered flat with no highlights.
    What could be the problem, since all the objects are drawn in the same situation (they are few lines apart)?

    Thanks,

  2. #2
    Senior Member Frequent Contributor ehsan2004's Avatar
    Join Date
    Jun 2004
    Location
    Iran
    Posts
    645

    Re: Light Problem

    When you use from the GLUT objects, you don't need to specify the normal vectors. But when you draw your own polygons, you should specify their normal vectors. In lighting, the direction of the light, orientation of the normal vectors and/or the direction of the viewr are so important.
    -Ehsan-

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2004
    Posts
    15

    Re: Light Problem

    Thanks alot Ehsan, I didn't know. That does it.

  4. #4
    Junior Member Newbie
    Join Date
    Jul 2005
    Location
    China
    Posts
    3

    Re: Light Problem

    Oh, Thanks too, normal is important to light...

Similar Threads

  1. Problem with light
    By Srcee in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-02-2011, 06:09 AM
  2. Light Problem
    By Stack Overflow in forum OpenGL: Basic Coding
    Replies: 13
    Last Post: 01-07-2003, 11:40 AM
  3. Light Problem
    By Pody in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 07-19-2002, 03:00 PM
  4. Light Problem
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-02-2001, 05:25 AM
  5. Light problem
    By Claudio in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 09-30-2000, 12:15 PM

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