Skip to content
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

hello, is sdl2 compatible with SDL_GPU? #247

Open
joyrax-dev opened this issue Mar 30, 2023 · 1 comment
Open

hello, is sdl2 compatible with SDL_GPU? #247

joyrax-dev opened this issue Mar 30, 2023 · 1 comment

Comments

@joyrax-dev
Copy link

hello, is sdl2 compatible with SDL_GPU? For example, were I able to convert texture from sdl2 to image SDL_GPU and vice versa? I still do not understand what and how is mutually replaced

@MonsieurBleu
Copy link

Hello, you have multiple ways to convert SDL_Surface to GPU_Image or GPU_Targets.

Exemples of this by copy can be found in the wiki :
https://grimfang4.github.io/sdl-gpu/group__Conversions.html

You can even load & save SDL surfaces from/into files with all the formats supported by SDL_GPU using :
https://grimfang4.github.io/sdl-gpu/group__SurfaceControls.html

From this you can convert your SDL_Surface to an SDL_Texture if you want, or going the opposite way from SDL_Texture to GPU_Image or GPU_Target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants