pygame-ce icon indicating copy to clipboard operation
pygame-ce copied to clipboard

Expose native sdl functionality

Open amengede opened this issue 7 months ago โ€ข 1 comments
trafficstars

Pygame is a wrapper around SDL, and itโ€™s great! However advanced users would like to be able to fetch the underlying SDL functions.

Examples:

getting the address of an opengl procedure not exposed by pyopengl

Getting the raw surface from a window for vulkan rendering

A quick fix could be to expose the raw function pointer, which users could manage themselves with something like FFI.

amengede avatar Mar 26 '25 20:03 amengede

However advanced users would like to be able to fetch the underlying SDL functions

I'd think advanced users would like to be able to use underlying SDL functionality, I don't really see what you mean about fetching.

getting the address of an opengl procedure not exposed by pyopengl

OK I sorta get what you mean now. You mean like https://github.com/pygame-community/pygame-ce/pull/3285 ?

Getting the raw surface from a window for vulkan rendering

Sure, someone could work on Vulkan support but I don't think it's priority at all. I'm skeptical people will actually use it, and it seems like it would take substantial contributor effort. It's quite strange actually that I'm unaware any of feature requests for vulkan support ever, and then you and the author of https://github.com/pygame-community/pygame-ce/issues/3393 mention it on the exact same day.

To make this issue more actionable I would appreciate more specific things about what you want exposed (like SDL function names) and why.

Starbuck5 avatar Apr 01 '25 06:04 Starbuck5

I referenced a PR that seems related to what you're bringing up, #3285. What I didn't notice is that PR was raised in response to your own other issue https://github.com/pygame-community/pygame-ce/issues/3284.

I'm going to close this one as a duplicate of that, because the other issue is much more specific and actionable.

Starbuck5 avatar May 11 '25 02:05 Starbuck5