Commit a2c7f4e1 authored by Sam Lantinga's avatar Sam Lantinga

Fixed OpenGL state issue reported by Dmytro Bogovych

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403503
parent 628262d3
...@@ -26,8 +26,8 @@ Thanks to everyone who made this possible, including: ...@@ -26,8 +26,8 @@ Thanks to everyone who made this possible, including:
during the Google Summer of Code 2008 during the Google Summer of Code 2008
* Marty Leisner, Andrew, Will, Edgar Simo, Donny Viszneki, Andrea Mazzoleni, * 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 Dmytro Bogovych, and Couriersud for helping find SDL 1.3 bugs in the great
of January 2009! SDL Bug Hunt of January 2009!
* Donny Viszneki for helping fix SDL 1.3 bugs in the great SDL Bug Hunt of * Donny Viszneki for helping fix SDL 1.3 bugs in the great SDL Bug Hunt of
January 2009! January 2009!
......
...@@ -846,6 +846,7 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) ...@@ -846,6 +846,7 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w, renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w,
texture_h, 0, format, type, NULL); texture_h, 0, format, type, NULL);
} }
renderdata->glDisable(data->type);
result = renderdata->glGetError(); result = renderdata->glGetError();
if (result != GL_NO_ERROR) { if (result != GL_NO_ERROR) {
GL_SetError("glTexImage2D()", result); GL_SetError("glTexImage2D()", result);
...@@ -993,6 +994,7 @@ GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, ...@@ -993,6 +994,7 @@ GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
renderdata->glTexSubImage2D(data->type, 0, rect->x, rect->y, rect->w, renderdata->glTexSubImage2D(data->type, 0, rect->x, rect->y, rect->w,
rect->h, data->format, data->formattype, rect->h, data->format, data->formattype,
pixels); pixels);
renderdata->glDisable(data->type);
result = renderdata->glGetError(); result = renderdata->glGetError();
if (result != GL_NO_ERROR) { if (result != GL_NO_ERROR) {
GL_SetError("glTexSubImage2D()", result); GL_SetError("glTexSubImage2D()", result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment