| Summary: | OpenGL renderer doesn't always enable GL_TEXTURE_2D | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Juha Niemimäki <juha.niemimaki> |
| Component: | render | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | Keywords: | target-2.0.14 |
| Version: | HG 2.1 | ||
| Hardware: | PowerPC | ||
| OS: | AmigaOS | ||
|
Description
Juha Niemimäki
2020-02-21 08:10:59 UTC
So this is cached state, so if we're turning it on and off, we need to check/update: GL_RenderData::drawstate.texturing It looks like several places (not just SDL_UpdateTexture) enable and disable it. This is likely a holdover from before we were aggressively caching state. I need to go back and read up on the legacy rules of GL_TEXTURE_2D...I suspect we don't need to enable it every time we bind a texture, but only when drawing with one, which would mean the correct thing to do is remove all these enable/disable calls outside of the one in SetDrawState(). --ryan. Ok, this is fixed by https://hg.libsdl.org/SDL/rev/1c73cc1e4a3a ...we don't need to enable GL_TEXTURE_* to change texture state, just to enable texturing during rendering. --ryan. |