SDL_RenderSetScissor

This is effectively SDL_SetClipRect for SDL 1.3’s renderers.
I find myself desiring this type of functionality frequently, and since
I’m writing sdlgui it has become a bit more difficult to ignore.

Attached is a patch implementing this for Direct3D9, OpenGL,
OpenGLES(1/2), DirectFB, and Software renderers. I have no idea whether
or not NDS’s gl2D supports GL_SCISSOR_TEST/glSetScissor, so although I
have made the appropriate function (NDS_RenderSetScissor), the
implementation is commented out until someone who knows for certain gets
to it.

Enjoy!
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: RenderSetScissor.diff
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110507/43688afa/attachment.asc

I made errors and in my haste didn’t even think about correcting them.
Attached is a corrected diff.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: RenderSetScissor.diff
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110507/64b51089/attachment.txt

I am having issues with the OpenGL implementation on Windows 7 (64-bit, with 32-bit binaries). I’ve spent about an hour working on it now and need to move on. If someone could look into it, I’d be greatful.

The software renderer seems to be ignoring the clip rect, so I’m switching my focus to that.------------------------
EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/