Skip to content

gpu/vulkan renderer: Reconfigure the window on renderer creation if i…#15876

Merged
Kontrabant merged 1 commit into
libsdl-org:mainfrom
Kontrabant:wl_external_fix
Jun 23, 2026
Merged

gpu/vulkan renderer: Reconfigure the window on renderer creation if i…#15876
Kontrabant merged 1 commit into
libsdl-org:mainfrom
Kontrabant:wl_external_fix

Conversation

@Kontrabant

Copy link
Copy Markdown
Contributor

…t has the OpenGL flag

Issues can arise if a window initially configured for OpenGL is later used with a Vulkan-based renderer. Try to reconfigure or recreate the window in the unlikely event that it has the OpenGL flag set when initializing the Vulkan or GPU renderer to remove any platform or driver-specific OpenGL objects and properties.

Fixes hot-swapping between an OpenGL renderer and the GPU renderer on some platforms in #15847

  • I confirm that I am the author of this code and release it to the SDL project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Comment thread src/render/gpu/SDL_render_gpu.c Outdated
…t has the OpenGL flag

In some cases, conflicts can occur at the platform or driver level if a window initially configured for OpenGL is then used with a Vulkan-based renderer. Try to reconfigure or recreate the window in the unlikely event that it has the OpenGL flag set when initializing the Vulkan or GPU renderer to remove any platform or driver-specific OpenGL objects and properties.
@Kontrabant Kontrabant merged commit e263708 into libsdl-org:main Jun 23, 2026
9 checks passed
@Kontrabant Kontrabant deleted the wl_external_fix branch June 23, 2026 15:03
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

Successfully merging this pull request may close these issues.

2 participants