| Summary: | SDL_GL_BindTexture() doesn't allow selection of active texture unit | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Denis Washington <denisw> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | gabomdq |
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
|
Description
Denis Washington
2013-02-13 05:27:35 UTC
I agree that SDL_GL_BindTexture functionality can be expanded...minimal as it is now, I barely got it through Sam's "no bloat" filter :) But if more people start using this functionality (you are the third person besides me I've seen interested in these functions), we can certainly expand it (and add something to reset SDL to a known rendering state externally as well, something which currently is not possible) It would be really useful. In my application I am rendering by using OpenGL ES 2.0 directly, but I rely on SDL_CreateTextureFromSurface() so that I don't have to do the conversion of an SDL_Surface to a GLES2 texture myself. For this use case, it would be handy if I could do anything with an SDL_Texture that I can do with a GL texture handle. A simple alternative solution that minimizes bloat would be to have something like SDL_GL_GetTextureHandle() that directly returns the native GL texture ID, so that you can pass it to glBindTexture() etc. yourself. This was just a bug with the OpenGL ES 2.0 renderer. The other OpenGL renderers don't bind a texture unit, for this reason. Fixed, thanks! http://hg.libsdl.org/SDL/rev/a3ebd92ff0b2 |