From 42de99cf3b0d00b61410d24e7387116defcc7b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sat, 12 Sep 2026 01:51:17 -0300 Subject: [PATCH] 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. --- .gitignore | 1 + bin/assets/icon/ecode-icon-web.hvif | Bin 0 -> 270 bytes premake4.lua | 3 +++ premake5.lua | 2 ++ src/eepp/window/backend/SDL2/windowsdl2.cpp | 17 +++++++---------- src/eepp/window/backend/SDL3/windowsdl3.cpp | 17 +++++++---------- 6 files changed, 20 insertions(+), 20 deletions(-) create mode 100644 bin/assets/icon/ecode-icon-web.hvif diff --git a/.gitignore b/.gitignore index e05a54a93..76bf7b208 100644 --- a/.gitignore +++ b/.gitignore @@ -86,3 +86,4 @@ ecode.dmg /projects/android-project/.project /projects/android-project/app/.project /design/ +/projects/haiku/ecode/ecode.app/* \ No newline at end of file diff --git a/bin/assets/icon/ecode-icon-web.hvif b/bin/assets/icon/ecode-icon-web.hvif new file mode 100644 index 0000000000000000000000000000000000000000..976fa0c57cb720e9f0edceab8528beb5227d874d GIT binary patch literal 270 zcmc~x&P-!sVqjxheJR#TFb`%fIu+rRZ--~rAtsR-t9`+7q#ogk>G=J$5r>