SDL_RenderSetClipRect x,y position

I believe my engine is using the OpenGL rendering system, which means that when using SDL_RenderSetClipRect (and only this function), the coordinates of 0,0 are for the bottom left of the screen.

If I change to use DirectX, with the x,y coordinates change so that 0,0 is the top-left of the screen, or will it stay at the bottom right ?

Are you mixing the SDL renderer with your own code or just using the
renderer? Because the SDL renderer always uses the top left as 0,0.

2015-10-14 7:27 GMT-03:00, MrTAToad :> I believe my engine is using the OpenGL rendering system, which means that

when using SDL_RenderSetClipRect (and only this function), the coordinates
of 0,0 are for the bottom left of the screen.

If I change to use DirectX, with the x,y coordinates change so that 0,0 is
the top-left of the screen, or will it stay at the bottom right ?

I believe the origin for the opengl driver has been fixed to top-left (see https://bugzilla.libsdl.org/show_bug.cgi?id=2700). From my testing,
clipping works now. I switch between the software opengl renderer drivers and no longer need to do anything special with clipping coordinates.

AlvinOn 14/10/15 07:27, MrTAToad wrote:

I believe my engine is using the OpenGL rendering system, which means that when using SDL_RenderSetClipRect (and only this function), the coordinates
of 0,0 are for the bottom left of the screen.

If I change to use DirectX, with the x,y coordinates change so that 0,0 is the top-left of the screen, or will it stay at the bottom right ?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Just using the SDL2 renderer for everything…

Sik wrote:> Are you mixing the SDL renderer with your own code or just using the

renderer? Because the SDL renderer always uses the top left as 0,0.

2015-10-14 7:27 GMT-03:00, MrTAToad <@MrTAToad>:

I believe my engine is using the OpenGL rendering system, which means that
when using SDL_RenderSetClipRect (and only this function), the coordinates
of 0,0 are for the bottom left of the screen.

If I change to use DirectX, with the x,y coordinates change so that 0,0 is
the top-left of the screen, or will it stay at the bottom right ?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Ah, so it looks its been fixed. I’ll have to get an update for the beta at some point then

Alvin Beach wrote:> On 14/10/15 07:27, MrTAToad wrote:

I believe my engine is using the OpenGL rendering system, which means that when using SDL_RenderSetClipRect (and only this function), the coordinates
of 0,0 are for the bottom left of the screen.

If I change to use DirectX, with the x,y coordinates change so that 0,0 is the top-left of the screen, or will it stay at the bottom right ?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I believe the origin for the opengl driver has been fixed to top-left (see https://bugzilla.libsdl.org/show_bug.cgi?id=2700). From my testing,
clipping works now. I switch between the software opengl renderer drivers and no longer need to do anything special with clipping coordinates.

Alvin


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org