You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: HG 2.1 Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2019-08-08 18:17:44 +0000, Malte Kießling wrote:
The Implementations of SDL_GL_BindTexture have different behaviour depending on the selected renderer.
For the GL renderer, depending on the type (yuv or not), either 3 or one texture is bound. The different texture units are also only selected when it is a yuv texture. Otherwise, i assume, the caller is responsible for that.
Both GLES1 and GLES2 only bind a single texture target. This is interesting, as the GLES2 renderer has support for yuv textures, but does not bind them when using GLES2_BindTexture. It does bind them on a yuv render.
As pointed out in bug 3286, this is quite inconsistent.
For the future i would suggest functions that return information (gl texture id?) of the texture type and number of hardware textures used.
Maybe something akin to
int SDL_GL_GetTextureIDs(SDL_Texture* texture, int* count, Uint32** dst);
would help, and let the user bind it. Or seperate it, like for the update functions.
int SDL_GL_BindTexture(SDL_Texture* texture, float* w, float* h);
int SDL_GL_BindTextureYUV(SDL_Texture* texture, float* w, float* h);
int SDL_GL_GetTextureID(SDL_Texture* texture, int* dst);
int SDL_GL_GetTextureIDYUV(SDL_Texture* texture, Uint32* y, Uint32* u, Uint32* v);
These are just ideas. Id be willing to try my hand at implementing something akin to this, if its generally wanted.
Having access to the underlying driver data for textures in general is nice when interacting with 3rd party libraries. Im not at home in direct x, but i would think that it would help there, too.
(In my case, the current implementation of imgui expects a texture id for drawing images, and integrating imgui with renderer things in general is a tad messy right now).
Have a nice week!
~mkalte
On 2019-08-09 20:46:14 +0000, Malte Kießling wrote:
Created attachment 3924
patch idea
I have written some stuff to show what kind of functionality i thought of when writing this report.
This isn't tested and there likely is more to add and improve.
The text was updated successfully, but these errors were encountered:
Shamelessly bumping this, as i still like committing the horrible sin of mixing opengl calls with the renderer.
As an alternative to exposing the texture ids themself the api could also just provide information - if its yuv or not etc - so that one can access the relevant texture units instead of the ids. not sure if that is a better or worse idea though.
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: HG 2.1
Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2019-08-08 18:17:44 +0000, Malte Kießling wrote:
On 2019-08-09 20:46:14 +0000, Malte Kießling wrote:
The text was updated successfully, but these errors were encountered: