[Moved from github issue]
When investigating new features in SDL3, I found one of particular interest – the ability to wrap a SDL_Texture around a foreign GL texture using SDL_CreateTextureWithProperties() and SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_NUMBER. I’d like to use this to wrap a new gstreamer video frame coming from gst-gl, use the Render API to copy it to my own texture and queue that for drawing somewhere on screen.
I’m not having much luck and I doubt that the gst frame is being copied to my own texture properly (using a SDL_SetRenderTarget and SDL_RenderTexture). When I use the copied texture, it shows up as transparent. When trying to inspect the wrapped gst texture, I noticed that SDL_PROP_TEXTURE_OPENGL_TEXTURE_NUMBER is not even set (I was expecting the foreign gst texture number). Is that normal?
Can anyone comment if my idea if wrapping and copying foreign gst textures would be feasible? I’m only using the Render API, not GL directly or the new GPU renderer – both seem very complex..
Cheers,
Rob