PDA

View Full Version : Setting up a Clipping Rect in OpenGL thru SDL



jdarling
08-03-2007, 04:22 PM
I noted that calling SDL_SetClipRect doesn't do anything when you have SDL in OpenGL mode. I guess that this makes sense, as at this point your utilizing pure OpenGL and not the default SDL interface. But, this causes a problem for me, how exactly do I create a clipping rect in OpenGL?

I know this has probably been asked 1000's of times, but I can't find it in my quick searches :).

technomage
08-03-2007, 05:37 PM
I think you need to look at glScissor. It restricts the drawing of the screen to a rectangular area. I'd give you an sample but I'm off out. sorry.