Results 1 to 5 of 5

Thread: stange face overcoss

  1. #1
    Member Contributor
    Join Date
    Feb 2001
    Location
    Slovakia
    Posts
    53

    stange face overcoss

    (stange hm,hm.. mistake i mean strange)
    My init code is:
    glEnable(GL_TEXTURE_2D);
    glShadeModel(GL_SMOOTH);
    glClearColor(0.0f,0.0f,0.0f,1.0f);
    glClearDepth(1.0f);
    glEnable(GL_DEPTH_TEST);
    glDepthFunc(GL_LESS);
    glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
    And when i try to display a cube there are strange triangles on the edges of the cube.
    The triangles have textures of the back face.
    When the cube is moving the triangles are changing there shape according to the movement of the cube.
    When i call the
    glPolygonMode(GL_BACK,GL_LINE);
    function then the effect is gone.
    Is this a solution?? or?
    (Picture of the effect: http://www.kmit.sk/~grex/)


    [This message has been edited by Fredy (edited 02-21-2001).]

    [This message has been edited by Fredy (edited 02-21-2001).]

  2. #2
    Senior Member Regular Contributor
    Join Date
    May 2001
    Location
    London UK
    Posts
    195

    Re: stange face overcoss

    Calling glPolygonMode(GL_BACK,GL_LINE) does not sound like a good solution. Something is wrong with your code. Try to enable backface culling and check the result.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jan 2001
    Location
    Belgium
    Posts
    183

    Re: stange face overcoss

    Looks like a Z-BUffer stuff to me, it's not accurate enough.

    Try with a 24/32bits Zbuffer or try glDepthFunc(GL_LEQUAL);

    But anyway, you should enable backface culling too as Mango said. It will avoid backfaces to be rendered, and thus it will avoid the problem you're having in that case.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jan 2001
    Location
    Belgium
    Posts
    183

    Re: stange face overcoss

    Maybe the projection frustrum far limit is "too far".
    If this value is too big, it reduces the Z-buffer accuracy.

  5. #5
    Member Contributor
    Join Date
    Feb 2001
    Location
    Slovakia
    Posts
    53

    Re: stange face overcoss

    Tnx guys! Problem solved.

Similar Threads

  1. stange behavior on my Quadro 6000
    By Abdallah DIB in forum OpenGL: GLSL
    Replies: 0
    Last Post: 08-02-2011, 09:22 AM
  2. changing back face to front face in vertex shader
    By hoschie211 in forum OpenGL: GLSL
    Replies: 1
    Last Post: 11-03-2009, 12:36 AM
  3. Stange noise problem on Linux only
    By in forum OpenGL: User Software
    Replies: 1
    Last Post: 10-13-2005, 05:30 AM
  4. Very stange TMUs
    By TurboCG in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 07-10-2002, 01:21 PM
  5. Stange semi-transparent object
    By zoldar256 in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 08-03-2001, 02:40 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