Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: newb problem w/ clipping effects

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2003
    Posts
    1

    newb problem w/ clipping effects

    I've just started learning OpenGL, so to mess around with some stuff I made a program that displays two cubes and rotates them around. This screenshot shows the problem:



    The cube that is shown correctly is in the center of the coordinate system, and rotates about itself; the cube which is mostly missing (the green and blue faces are the very edges of two of its faces, the red is probably hiding behind the first cube) seems to get that effect every time it gets near the first cube on the screen, but not necessarily touching it. The messed-up cube has the same orientation as the first. The only GL state I have enabled is culling. Any ideas what's up?

    [This message has been edited by strangeduck (edited 06-22-2003).]

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: newb problem w/ clipping effects

    Hi !

    There was no screenshot visible so I am just guessing here, the most common problems are that you have not enabled the depth testing/depth buffer or that you have set incorrect values for the near/far clipping planes.

    Mikael

  3. #3
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: newb problem w/ clipping effects

    Hi !

    Ok, now the image is there, if the clipped one is closer to the viewer then it might be because you have it to close to the near clipping plane. but it's clipped at the diagonal of a quad so it is also possible that you have a triangle facing the wrong direction (back facing triangles are not rendered by default), but as the other one is visible and I guess you use the same code I don't think that is the problem.

    Mikael

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •