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

[SDL3] Be able to retrieve real rendering backend name when using GPU backend #11600

Open
MrOnlineCoder opened this issue Dec 6, 2024 · 3 comments
Milestone

Comments

@MrOnlineCoder
Copy link

MrOnlineCoder commented Dec 6, 2024

If renderer is created with SDL_CreateRenderer(window, NULL) and SDL decides to use the new GPU API for it, the call to SDL_GetRendererName function will return gpu as the result for it, giving not much usefulness in terms of logging or debugging about which backend/graphics API is used behind the scenes. Maybe it would be worth adding it as property to renderer? Something like SDL_PROP_RENDERER_GPU_API_STRING

@slouken slouken added this to the 3.2.0 milestone Dec 6, 2024
@AntTheAlchemist
Copy link
Contributor

Can we just add the backend renderer in brackets to 'SDL_GetRendererName'? So we'd get "GPU (OpenGL)".

@MrOnlineCoder
Copy link
Author

That's one of solutions, at least I personally use it for mostly debugging and including in crash reports / logs, so that would be just enough. And I am not sure that renderer name is something that should be parsed programatically, so making it more human-readable like you suggested is fine, I guess?

@icculus
Copy link
Collaborator

icculus commented Dec 7, 2024

No, let's make it a property. The name strings probably shouldn't be messed with like that.

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

4 participants