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 4 of 4

Thread: No Clipping

  1. #1
    Intern Newbie
    Join Date
    Mar 2012
    Location
    Devon, England
    Posts
    39

    No Clipping

    How is it possible to stop or highly reduce clipping because in a simple 3D world I created objects seem to 'fall behind the screen' a long time before they should when you moving around?

    This screen-shot might illustrate my problem better.


    Thanks,
    Rowan
    Help Me [img]<<GRAEMLIN_URL>>/smile.gif[/img]

  2. #2
    Advanced Member Frequent Contributor Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    947

    Re: No Clipping

    Set front (near) clipping plane distance (e.g. in gluPerspectice) to lower value. But never to 0. Keep far/near lower than 1e6 in order to have acceptable resolution with 24-bit Z-buffer.

  3. #3
    Member Regular Contributor
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    302

    Re: No Clipping

    In addition, you can switch off the depth-test for fragments in front of the near plane: glEnable(GL_DEPTH_CLAMP);
    Note that this can introduce artifacts, e.g. your grey plane could overwrite your wireframe rendering (just in front of the near plane of course).

  4. #4
    Intern Newbie
    Join Date
    Mar 2012
    Location
    Devon, England
    Posts
    39

    Re: No Clipping

    Thanks, that solved the problem.
    Help Me [img]<<GRAEMLIN_URL>>/smile.gif[/img]

Posting Permissions

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