sdl2_frt/src/render
Sam Lantinga d23d9c88e5 Fixed bug 2421 - SDL_RenderCopyEx off by one when rotating by 90 and -90
chasesan

When using SDL_RenderCopyEx, I get a problem on some platforms where the output is offset by +/-1 on other platforms and not on others. I tried it with a center of both 0,0 (and offsetting by width/height) and NULL (for centered).

The rotation involved is 90, and/or -90 rotation. The rotation was a constant, no arithmetic was involved when inputting it into SDL_RenderCopyEx.

This occurred with 32x32, 24x24, and 16x16 texture sizes. I apologize that I don't have more precise information, as I received the information as a bug report myself. But I have tracked the problem down to here.

My program requires pixel perfect alignment on several different platforms, so this is something of a showstopper for me.

--

Sylvain

It appears the RenderCopyEx is done as expected,
this is the red rectangle which is not correctly positionned !

So, here's patch with a 0.5 float increment, like for opengles2, for DrawLines, and also Draw Points.
2014-07-07 23:26:34 -07:00
..
direct3d Fixed mingw64 build and warnings 2014-07-07 10:26:28 -07:00
direct3d11 The YUV offset is 16 / 255, not 16 / 256 2014-07-03 10:22:12 -07:00
opengl The YUV offset is 16 / 255, not 16 / 256 2014-07-03 10:22:12 -07:00
opengles Fixed bug 2421 - SDL_RenderCopyEx off by one when rotating by 90 and -90 2014-07-07 23:26:34 -07:00
opengles2 Fixed compiler warnings on iOS 2014-07-07 11:00:25 -07:00
psp Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
software 565 textures have higher priority than 555 textures 2014-06-22 09:42:43 -07:00
mmx.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_d3dmath.c Fixes #2529, guard SDL_d3math.* with the proper defines 2014-05-10 16:23:06 -03:00
SDL_d3dmath.h Fixes #2529, guard SDL_d3math.* with the proper defines 2014-05-10 16:23:06 -03:00
SDL_render.c Render: Allow empty cliprect. 2014-04-19 13:15:41 -07:00
SDL_sysrender.h Render: Allow empty cliprect. 2014-04-19 13:15:41 -07:00
SDL_yuv_mmx.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_yuv_sw_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_yuv_sw.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00