We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3422 - OpenGL ES 1.1 renderer: SDL_UpdateTexture breaks later function calls (missing glDisable)
Summary: OpenGL ES 1.1 renderer: SDL_UpdateTexture breaks later function calls (missin...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: HG 2.0
Hardware: All Android (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-14 19:48 UTC by ny00
Modified: 2016-10-01 20:08 UTC (History)
0 users

See Also:


Attachments
Patch + Sample program + Screenshots (44.66 KB, application/zip)
2016-09-14 19:48 UTC, ny00
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ny00 2016-09-14 19:48:41 UTC
Created attachment 2560 [details]
Patch + Sample program + Screenshots

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.

A ZIP file is attached with the following contents:
- A patch.
- A test program.
- Two screenshots (with and without the bug).
Comment 1 Sam Lantinga 2016-10-01 20:08:33 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/d1967bb54276