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: masking in 3D?

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2010
    Posts
    4

    masking in 3D?

    Hi there,

    I'm really new to OpenGL and am hoping someone here can help with a problem we're having. I'm using an openframeworks library to take an animated model in collada data and draw it to the screen. I want to crop a section of this model when it's drawn to the screen, which is being drawn using openGL. Is there a way to do this? I've read about the stencil buffer but am wondering if there is a better, maybe simpler way.

    Thanks.
    Jay

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    586

    Re: masking in 3D?

    you can look into GL_SCISSOR_TEST.

    You can also set up your own clipping planes using glClipPlane if you need a non-rectangular clipping region.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2010
    Posts
    4

    Re: masking in 3D?

    awesome. a glClipPlane that I move with a transform matrix did the trick. Thanks!

Posting Permissions

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