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

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.

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