Navigation Menu

Skip to content

Commit

Permalink
Fixed bug 3422 - OpenGL ES 1.1 renderer: SDL_UpdateTexture breaks lat…
Browse files Browse the repository at this point in the history
…er function calls (missing glDisable)

ny00

Using the OpenGL ES 1.1 renderer, after updating a texture with SDL_UpdateTexture (or SDL_UnlockTexture), a following call to SDL_RenderFillRect draws a rectangle with the wrong color (which appears to be the same as the texture's top-left pixel).

Comparing SDL_render_gles.c:GLES_UpdateTexture to SDL_render_gl.c:GL_UpdateTexture, a missing call to glDisable appears to be the cause. After adding it back, the bug is resolved.
  • Loading branch information
slouken committed Oct 1, 2016
1 parent 571f4ce commit 86b4319
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/render/opengles/SDL_render_gles.c
Expand Up @@ -590,6 +590,7 @@ GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
data->format,
data->formattype,
src);
renderdata->glDisable(data->type);
SDL_free(blob);

if (renderdata->glGetError() != GL_NO_ERROR) {
Expand Down

0 comments on commit 86b4319

Please sign in to comment.