SDL/src/render
Ryan C. Gordon ca9a321715
render: GL/GLES now draw lines almost perfectly matching software renderer.
One place known to differ in a significant way is a single line segment that
starts and ends on the same point; the GL renderers will light up a single
pixel here, whereas the software renderer will not. My current belief is this
is a bug in the software renderer, based on the wording of the docs:

"SDL_RenderDrawLine() draws the line to include both end points."

You can see an example program that triggers that difference in Bug #2006.

As it stands, the GL renderers might _also_ render diagonal lines differently,
as the the Bresenham step might vary between implementations (one does three
pixels and then two, the other does two and then three, etc). But this patch
causes those lines to start and end on the correct pixel, and that's the best
we can do, and all anyone really needs here.

Not closing any bugs with this patch (yet!), but here are several that it
appears to fix. If no other corner cases pop up, we'll call this done.

Reference Bug #2006.
Reference Bug #1626.
Reference Bug #4001.
...and probably others...
2021-09-19 15:47:24 -04:00
..
direct3d Add SDL_RenderSetVSync() 2021-09-14 09:56:29 -07:00
direct3d11 Add SDL_RenderSetVSync() 2021-09-14 09:56:29 -07:00
metal Add SDL_RenderSetVSync() 2021-09-14 09:56:29 -07:00
opengl render: GL/GLES now draw lines almost perfectly matching software renderer. 2021-09-19 15:47:24 -04:00
opengles render: GL/GLES now draw lines almost perfectly matching software renderer. 2021-09-19 15:47:24 -04:00
opengles2 render: GL/GLES now draw lines almost perfectly matching software renderer. 2021-09-19 15:47:24 -04:00
psp Add SDL_RenderSetVSync() 2021-09-14 09:56:29 -07:00
software SW_RenderGeometry: add a redundant check to clear static analysis (see bug #4600) 2021-08-27 07:44:03 +02:00
vitagxm render: Mark viewport/cliprect dirty when window is resized. 2021-09-18 11:54:25 -04:00
SDL_d3dmath.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_d3dmath.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_render.c render: constified some local variables in SDL_AllocateRenderVertices. 2021-09-19 00:38:06 -04:00
SDL_sysrender.h Add SDL_RenderSetVSync() 2021-09-14 09:56:29 -07:00
SDL_yuv_sw.c Fix software UpdateNVTexture non fullscreen (bug #5430) 2021-01-05 21:54:03 +01:00
SDL_yuv_sw_c.h Remove old YUV fixme 2021-02-10 10:22:18 -05:00