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

Adding backend sources for SDL3 #556

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmikushin
Copy link

This PR experimentally adds backend files for SDL3.

SDL3 only differs from SDL2 in some functions/enums naming and a few function arguments. Nonetheless, this PR creates separate files for SDL3 for more clearance.

I'd appreciate devs' advise what would be your preference about removing SDL2/SDL3 code deduplication. One option that I see is to use:

#if SDL_VERSION_ATLEAST(3, 0, 0)

What do you think?

… functions/enums naming and a few function arguments
@mikke89 mikke89 added the backends Platforms and renderers label Dec 30, 2023
@mikke89
Copy link
Owner

mikke89 commented Dec 30, 2023

Very cool, thank you!

I am already feeling the maintenance overhead of all the backends, so it would be preferable if we could unite them. Especially considering that it's not just the SDL_SDLrenderer backend, but the GL ones too. It quickly becomes a combinatorial problem. We probably need some preprocessing like you suggest. Though, I think I'd prefer we use SDL_MAJOR_VERSION.

I see that they've done some work on the their high DPI support, finally! It would be really cool if we could add support for that, similar to how we do it in GLFW.

@mikke89
Copy link
Owner

mikke89 commented Feb 11, 2024

Hey, do you have an update on this one? Would be great to see this being continued.

@dmikushin
Copy link
Author

Hi @mikke89 , not yet, I've been developing some RmlUi app that shall also work as a test bed for this SDL 3.0 work. I plan to finish it, make sure no issues originate from this context, and then - clean up this PR according to your preference expressed above. Alternatively, I can refactor the PR right away, but that would be a blind shot, no real testing at all. What do you think?

@mikke89
Copy link
Owner

mikke89 commented Feb 11, 2024

Cool, I'd be interested to hear more about the project of yours.

There's no hurry, but I wouldn't mind merging something not fully tested, as long as we don't have any regression for SDL2. And I'll of course help test for any such regressions. Then we can do a follow-up pull request for more polishing later on. This way other users can more easily test and help out too as they spot things.

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

Successfully merging this pull request may close these issues.

2 participants