mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
77305d47c2
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. |
||
---|---|---|
.. | ||
direct3d | ||
direct3d11 | ||
opengl | ||
opengles | ||
opengles2 | ||
psp | ||
software | ||
mmx.h | ||
SDL_d3dmath.c | ||
SDL_d3dmath.h | ||
SDL_render.c | ||
SDL_sysrender.h | ||
SDL_yuv_mmx.c | ||
SDL_yuv_sw_c.h | ||
SDL_yuv_sw.c |