Stefan Ullinger
authorSam Lantinga
Sat, 19 Sep 2009 04:43:41 +0000
changeset 3262e3d33bd599eb
parent 3261 72b542f34739
child 3263 924b486541dc
Stefan Ullinger

Hi,

so here we go: GL_LINE_SMOOTH bad for business! ;)

I checked the code within SDL_renderer_gl.c / GL_CreateRenderer(..)
and have found the reason for blurred lines when using OpenGL.
I have attached 2 images here.
I don't know whether this has to be changed and I don't know if there
is an option to turn it off/on...just wanted to say that with GL_LINE_SMOOTH
enabled there is a difference when rendering with opengl compared to directx.
src/video/SDL_renderer_gl.c
     1.1 --- a/src/video/SDL_renderer_gl.c	Thu Sep 17 20:35:12 2009 +0000
     1.2 +++ b/src/video/SDL_renderer_gl.c	Sat Sep 19 04:43:41 2009 +0000
     1.3 @@ -423,7 +423,8 @@
     1.4      data->scaleMode = -1;
     1.5      data->glDisable(GL_DEPTH_TEST);
     1.6      data->glDisable(GL_CULL_FACE);
     1.7 -    data->glEnable(GL_LINE_SMOOTH);
     1.8 +    /* This ended up causing video discrepancies between OpenGL and Direct3D */
     1.9 +    /*data->glEnable(GL_LINE_SMOOTH);*/
    1.10      if (data->GL_ARB_texture_rectangle_supported) {
    1.11          data->glEnable(GL_TEXTURE_RECTANGLE_ARB);
    1.12      } else {