Results 1 to 8 of 8

Thread: Polygon Bugs

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    reston,va usa
    Posts
    6

    Polygon Bugs

    My OGL scene is bugged, I am rendering a box, but the rear and side polygons are overriding the front polygon.

    Any ideas what can cause this?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Arlon, Belgium
    Posts
    477

    Re: Polygon Bugs

    Can I see the source code ?

  3. #3
    Junior Member Newbie
    Join Date
    Dec 2000
    Posts
    26

    Re: Polygon Bugs

    Are you sending the vertices to OpenGL in counter-clock-wise order? This may be a problem.

  4. #4
    Member Contributor
    Join Date
    Feb 2000
    Location
    Gothenburg, Sweden
    Posts
    68

    Re: Polygon Bugs

    Try enableling depth test

    glEnable(DEPTH_TEST);

    Osku

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

    Re: Polygon Bugs

    Sounds like a depth test problem. If you're using glut and linux, also make sure to use GLUT_DEPTH when you call glutInit(). I got burned with that awhile back when I had depth test enabled, but the depth test didn't seem to work right.
    Deiussum
    Software Engineer and OpenGL enthusiast

  6. #6
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    reston,va usa
    Posts
    6

    Re: Polygon Bugs

    I do enable depth testing, but I am not sure about the vertexes being loaded coounter-clockwise.

    I copied the vertex code straight from nehe tutorial on texture mapping.

    One thing though, I adopted NeHe texture mapping tutorial using QT OpenGL Module. Anyone have experiene using this module, any known problems that might cause these issues.

    So far I have only tested it on Windows, it might work without issue on linux. Sigh.

    Anyone all input is welcome.

    Thanks.

    Shep

  7. #7
    Member Contributor
    Join Date
    Oct 2000
    Location
    Pittsburgh, PA
    Posts
    52

    Re: Polygon Bugs

    Hmmm... just in case you haven't, make sure to clear the depth buffer each time you render:

    glClear(GL_DEPTH_BUFFER);

  8. #8
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,342

    Re: Polygon Bugs

    ... and don't forget glDepthFunc(GL_LESS);

Similar Threads

  1. Few driver bugs from AMD
    By kozmo in forum OpenGL: Drivers
    Replies: 21
    Last Post: 03-19-2011, 03:08 AM
  2. AMD FIX YOUR BUGS!
    By glfreak in forum OpenGL: Windows
    Replies: 4
    Last Post: 05-09-2008, 12:37 PM
  3. motion of a triangle or polygon inside a polygon
    By Dathu in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 04-09-2008, 05:45 AM
  4. rendering polygon elements edge-on & polygon offset
    By rlskinner in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 02-19-2004, 08:43 AM
  5. Driver bugs
    By Zengar in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 04-09-2003, 03: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