From 0d6fd7a116950d046146b7e2ca5c1b79236ed78f Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 14 Jan 2009 06:53:03 +0000 Subject: [PATCH] Fixed OpenGL state issue reported by Dmytro Bogovych --- CREDITS | 4 ++-- src/video/SDL_renderer_gl.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CREDITS b/CREDITS index f7e616a31..71b68378f 100644 --- a/CREDITS +++ b/CREDITS @@ -26,8 +26,8 @@ Thanks to everyone who made this possible, including: during the Google Summer of Code 2008 * Marty Leisner, Andrew, Will, Edgar Simo, Donny Viszneki, Andrea Mazzoleni, - and Couriersud for helping find SDL 1.3 bugs in the great SDL Bug Hunt - of January 2009! + Dmytro Bogovych, and Couriersud for helping find SDL 1.3 bugs in the great + SDL Bug Hunt of January 2009! * Donny Viszneki for helping fix SDL 1.3 bugs in the great SDL Bug Hunt of January 2009! diff --git a/src/video/SDL_renderer_gl.c b/src/video/SDL_renderer_gl.c index 330c52a8d..0ff68e79c 100644 --- a/src/video/SDL_renderer_gl.c +++ b/src/video/SDL_renderer_gl.c @@ -846,6 +846,7 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w, texture_h, 0, format, type, NULL); } + renderdata->glDisable(data->type); result = renderdata->glGetError(); if (result != GL_NO_ERROR) { GL_SetError("glTexImage2D()", result); @@ -993,6 +994,7 @@ GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, renderdata->glTexSubImage2D(data->type, 0, rect->x, rect->y, rect->w, rect->h, data->format, data->formattype, pixels); + renderdata->glDisable(data->type); result = renderdata->glGetError(); if (result != GL_NO_ERROR) { GL_SetError("glTexSubImage2D()", result);