Fix GL resource sharing across native application windows

Decouple GL object sharing between native windows from auxiliary worker-thread context support. Platforms without threaded GL contexts, such as Haiku, must still share textures and other GL resources between their window contexts.

Always configure SDL_GL_SHARE_WITH_CURRENT_CONTEXT according to the requested context settings, while continuing to create the auxiliary thread context only on supported platforms. Explicitly reset the SDL attribute for non-shared contexts to avoid leaking state into subsequent window creation.

Apply the fix to both SDL2 and SDL3 backends. Also link the Haiku unit test executable against libbsd and libnetwork to resolve its PTY and socket dependencies.
This commit is contained in:
Martín Lucas Golini
2026-09-12 01:51:17 -03:00
parent 5d3be27a9d
commit 42de99cf3b
6 changed files with 20 additions and 20 deletions
+2
View File
@@ -2033,6 +2033,8 @@ workspace "eepp"
"src/tools/ecode/plugins/autocomplete/usersnippetstore.cpp" }
filter { "system:not windows", "system:not haiku" }
links { "pthread" }
filter "system:haiku"
links { "bsd", "network" }
filter {}
eepp_module_backward_add( false )
build_link_configuration( "eepp-unit_tests", true )