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 1799

Summary: OpenGLES2 Renderer : GL_INVALID_ENUM <- glDisable(GL_TEXTURE_2D)
Product: SDL Reporter: PoopiSan <poopisan>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: CLOSED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus
Version: HG 2.0   
Hardware: ARM   
OS: Other   

Description PoopiSan 2013-04-12 05:23:23 UTC
During the OpenGLES function call analysis ( XCode Instrument tool for iPad )I got the following error:

GL_INVALID_ENUM <- glDisable(GL_TEXTURE_2D)

Furhter analysis narrows this down to function:

GLES2_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture)

and line:
    data->glDisable(texturedata->texture_type);

which seems to be incorrect according to the : http://www.khronos.org/opengles/sdk/docs/man/xhtml/glDisable.xml
Comment 1 Ryan C. Gordon 2013-04-17 11:42:51 UTC
Yeah, glDisable(GL_TEXTURE_2D) is legal in GLES 1.1, but not 2.0.

We never have a glEnable() call anywhere, so I think this was just leftover code when moving from 1.1? It's safe to just remove it, I think.

--ryan.
Comment 2 Ryan C. Gordon 2013-04-17 11:46:54 UTC
I _think_ this is fixed in hg changeset f4a3c5a68119, but I can't test the GLES2 renderer here. Feel free to reopen this bug if I broke it worse.  :)

--ryan.
Comment 3 PoopiSan 2013-04-18 10:03:26 UTC
Seems to be working fine.