Ryujinx-SDL/src/render/opengles2
Sam Lantinga 77305d47c2 Fixed bug 3345 - SDL_RenderClear inconsistency with ClipRect
Simon Hug

The description of the SDL_RenderClear function in the SDL_render.h header says the following:

"This function clears the entire rendering target, ignoring the viewport."

The word "entire" implies that the clipping rectangle set with SDL_RenderSetClipRect also gets ignored. This is left somewhat ambiguous if only the viewport is mentioned. Minor thing, but let's see what the implementations actually do.

The software renderer ignores the clipping rectangle when clearing. It even has a comment on this: /* By definition the clear ignores the clip rect */

Most other render drivers (opengl, opengles, opengles2, direct3d, and psp [I assume. Can't test it.]) use the scissor test for the ClipRect and don't disable it when clearing. Clearing will only happen within the clipping rectangle for these drivers.

An exception is direct3d11 which uses a clear function that ignores the scissor test.
2016-10-01 11:46:32 -07:00
..
SDL_gles2funcs.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_render_gles2.c Fixed bug 3345 - SDL_RenderClear inconsistency with ClipRect 2016-10-01 11:46:32 -07:00
SDL_shaders_gles2.c Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_shaders_gles2.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00