Fixed OpenGL state issue reported by Dmytro Bogovych
authorSam Lantinga <slouken@libsdl.org>
Wed, 14 Jan 2009 06:53:03 +0000
changeset 304120d65430e63c
parent 3040 62d4992e5a92
child 3042 5475a7b8ddeb
Fixed OpenGL state issue reported by Dmytro Bogovych
CREDITS
src/video/SDL_renderer_gl.c
     1.1 --- a/CREDITS	Wed Jan 14 04:25:32 2009 +0000
     1.2 +++ b/CREDITS	Wed Jan 14 06:53:03 2009 +0000
     1.3 @@ -26,8 +26,8 @@
     1.4    during the Google Summer of Code 2008
     1.5  
     1.6  * Marty Leisner, Andrew, Will, Edgar Simo, Donny Viszneki, Andrea Mazzoleni,
     1.7 -  and Couriersud for helping find SDL 1.3 bugs in the great SDL Bug Hunt
     1.8 -  of January 2009!
     1.9 +  Dmytro Bogovych, and Couriersud for helping find SDL 1.3 bugs in the great
    1.10 +  SDL Bug Hunt of January 2009!
    1.11  
    1.12  * Donny Viszneki for helping fix SDL 1.3 bugs in the great SDL Bug Hunt of
    1.13    January 2009!
     2.1 --- a/src/video/SDL_renderer_gl.c	Wed Jan 14 04:25:32 2009 +0000
     2.2 +++ b/src/video/SDL_renderer_gl.c	Wed Jan 14 06:53:03 2009 +0000
     2.3 @@ -846,6 +846,7 @@
     2.4          renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w,
     2.5                                   texture_h, 0, format, type, NULL);
     2.6      }
     2.7 +    renderdata->glDisable(data->type);
     2.8      result = renderdata->glGetError();
     2.9      if (result != GL_NO_ERROR) {
    2.10          GL_SetError("glTexImage2D()", result);
    2.11 @@ -993,6 +994,7 @@
    2.12      renderdata->glTexSubImage2D(data->type, 0, rect->x, rect->y, rect->w,
    2.13                                  rect->h, data->format, data->formattype,
    2.14                                  pixels);
    2.15 +    renderdata->glDisable(data->type);
    2.16      result = renderdata->glGetError();
    2.17      if (result != GL_NO_ERROR) {
    2.18          GL_SetError("glTexSubImage2D()", result);