Results 1 to 4 of 4

Thread: Polygons, Cubes and Light

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2002
    Location
    Burlington, VT
    Posts
    13

    Polygons, Cubes and Light

    Hi again. I have a scene constructed with cubes, every cube is constructed with 6 polygons. When I add light, it seems to be somewhat 'inside' out. I can see the things that are on the inside of a polygon. I applied a normal to every vertex and made sure that GL_SMOOTH is set. My question is, what cause this problem?

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: Polygons, Cubes and Light

    Did you enable depth testing, and clear the depth buffer each frame?
    Deiussum
    Software Engineer and OpenGL enthusiast

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2002
    Location
    Burlington, VT
    Posts
    13

    Re: Polygons, Cubes and Light

    Originally posted by Deiussum:
    Did you enable depth testing, and clear the depth buffer each frame?
    Yes I did!

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: Polygons, Cubes and Light

    Do you have face culling enabled? If you do it's possible that you are not using the correct winding order, or have the culling setup to cull the wrong faces.
    Deiussum
    Software Engineer and OpenGL enthusiast

Similar Threads

  1. I need help drawing some cubes
    By Areinn in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 08-08-2013, 08:50 PM
  2. To display of concave polygons, polygons containing holes
    By deepa in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-13-2004, 09:22 PM
  3. Marching Cubes
    By Satanic Dogus in forum OpenGL: Basic Coding
    Replies: 13
    Last Post: 10-11-2001, 08:06 PM
  4. Textured Polygons & Light effects?
    By in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 07-05-2000, 08:39 AM
  5. A problem with cubes...
    By CyBBe in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-16-2000, 10:45 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