-
-
Notifications
You must be signed in to change notification settings - Fork 164
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 interface for _sdl2.video classes #3317
base: main
Are you sure you want to change the base?
Conversation
Hey, good to see you moving this forward, this is important for us to do! Some organizational things: Also, I would think these new files would live in the _sdl2 folder. I believe when Window was ported it went there first. |
I agree that they should live in one module. a good name would be |
Yea you are correct about the multiple modules, I will add it in a single module. Is there an example of that in the repo at this moment, I can probably do that with the multiple header files, but if we already have more elegant solution I would like to use it, probably call it pygame._renderer like damusss said. (EDIT: I guess I can do the same as it is done for geometry module) About _sdl2, I am pretty sure Window was added outside of it in the first commit https://github.com/pygame-community/pygame-ce/pull/2114/files#diff-3279c6977adb71e8d262e5974889267e57e33c5ef0d5c76a0146999fba0b40c6 |
I imagined this as the first PR towards the goal of rewriting _sdl2.video stuff in C code. Since those classes are used in combination with each other, I wanted to add them all, so then for example when I will write the implementation for Renderer, I can do it without any compilation errors where I am missing the declaration for Texture. At this moment, this code itself doesn't do anything, you can write
for example, and you get
as the output. But that is everything that has been implemented. Also, I didn't include
_render
in pygame.init, so you need to manually import it, otherwise it won't work, so at the moment, this module is basically hidden, just so it doesn't break anything