SDL
SDL copied to clipboard
[patch] Add SDL_RecreateWindow() to the API
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: 2.0.9 Reported for operating system, platform: All, All
Comments on the original bug report:
On 2019-01-09 14:39:17 +0000, David Lönnhager wrote:
Created attachment 3560 Add SDL_RecreateWindow() to the API
Hello
I'd like to expose the function SDL_RecreateWindow() to users of SDL. The reason is to make it possible to recreate windows with certain flags (manually), eg SDL_WINDOW_OPENGL.
Cf. https://github.com/pygame/pygame/issues/712
On 2020-12-12 18:38:38 +0000, Rene Dudfield wrote:
Any chance of exposing SDL_RecreateWindow?
On 2020-12-13 03:28:59 +0000, Sam Lantinga wrote:
Possibly, let's look at it post-2.0.14 release.
This is a no for SDL2 at this point, and I'm inclined to say no for SDL3, too.
This is a no for SDL2 at this point, and I'm inclined to say no for SDL3, too.
Why? For me, this will be very useful, because I create my window with SDL_CreateWindowFrom and I can't change flags after. The problem is by default a window use hardware acceleration, and I don't want of this. So this method is my last chance... or SDL_CreateWindowFrom need to be modified to accept new flags.
When using SDL_CreateWindowFrom(), you can just destroy the window and then call it again.
yes but this function doesn't to allow to provide new flags
Ah, good point. What you want is SDL_CreateWindowWithProperties() in SDL3.
mmm probably, but it's in SDL3 which hasn't been released yet (I think). There is no function to changes flags of a window in SDL2?
No, there isn’t, but we’re working towards an SDL3 release and you’re welcome to grab the current source from GitHub and see if it meets your needs.
ok, thanks