-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SDL_CreateTexture from some shared texture #9823
Comments
0-copy textures are created using properties to specify the platform specific details. I'm not sure how this integrates into the camera system, but you can see an example of this in testffmpeg. |
SDL_Create0CopyTexture() could hide all those platform specific details. Looking at testffmpeg: GetTextureForMemoryFrame is the usual way: but GetOESTextureForDRMFrame recreates the SDL_Texture each time and update it from the fd handle. the update part: It seems this could be factorized. but maybe 0 copy texture need to much customization and not obvious to abstract it. And maybe re-creating the texture isn´t a big deal. Since the use-case I thought was the camera API, maybe it can simply turned into adding a |
so if creating a re-creating 0copy texture each frame isn't a big deal. (vs only updating a 0copy texture, each frame), then this is ok. and I´ve clarified what I thought so closing this ticked, and re-opened a new one for the camera with the suggestion ! |
one more guess: |
Duplicate of #9826 |
There was this feature for the camera API, where the device can provide an handle to manipulate texture with 0-copy, which must faster that getting a software surface (#8565 ).
Same way we grab a software frame with
SDL_Surface * SDL_AcquireCameraFrame(...);
,we could introduce a new type (ok whatever), SDL_0CopyTexturem and have a similar API:
SDL_0CopyTexture * SDL_AcquireCamera0CopyFrame(...)
we would also need the correct helper functions
SDL_Create0CopyTextureFrom() .. (does this has to be from something here ?)
SDL_UpdateTextureFrom0Copy()
The use-case here the camera api, but I thing this can more generic purpose.
The text was updated successfully, but these errors were encountered: