# HG changeset patch # User Sam Lantinga # Date 1258788412 0 # Node ID 3bd01435287fc326ec557c7c2627d6d6bf3d7e68 # Parent 1edb86163d629c87bdd544889efbc47d1373a5d4 Added comment for pixel-perfect line workaround. diff -r 1edb86163d62 -r 3bd01435287f src/video/SDL_renderer_gl.c --- a/src/video/SDL_renderer_gl.c Sat Nov 21 07:22:59 2009 +0000 +++ b/src/video/SDL_renderer_gl.c Sat Nov 21 07:26:52 2009 +0000 @@ -1157,13 +1157,17 @@ /* The line is half open, so we need one more point to complete the line. * http://www.opengl.org/documentation/specs/version1.1/glspec1.1/node47.html + * If we have to, we can use vertical line and horizontal line textures + * for vertical and horizontal lines, and then create custom textures + * for diagonal lines and software render those. It's terrible, but at + * least it would be pixel perfect. */ data->glBegin(GL_POINTS); #ifdef __APPLE__ /* Mac OS X seems to always leave the second point open */ data->glVertex2f(0.5f + x2, 0.5f + y2); #else - /* Linux seems to use the right-most or bottom-most point open */ + /* Linux seems to leave the right-most or bottom-most point open */ if (x1 > x2) { data->glVertex2f(0.5f + x1, 0.5f + y1); } else if (x2 > x1) {