From 77fa04adb0148522b310a9d60b895009313cd4af Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 6 Oct 2025 21:01:20 +0200 Subject: [PATCH 01/28] glgsg: Fix typo causing SSBO support not always detected --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 1d92309a65..a11e03377e 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -2146,7 +2146,7 @@ reset() { #ifndef OPENGLES // Check for SSBOs. - if (is_at_least_gl_version(4, 3) || has_extension("ARB_shader_storage_buffer_object")) { + if (is_at_least_gl_version(4, 3) || has_extension("GL_ARB_shader_storage_buffer_object")) { _supports_shader_buffers = true; _glGetProgramInterfaceiv = (PFNGLGETPROGRAMINTERFACEIVPROC) get_extension_func("glGetProgramInterfaceiv"); From c352e92dbcbda6f5248c1ac066609d68fdcc4152 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 15 Oct 2025 21:22:34 +0200 Subject: [PATCH 02/28] dtoolbase: Fix out-of-bounds access in pdtoa.cxx --- dtool/src/dtoolbase/pdtoa.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtool/src/dtoolbase/pdtoa.cxx b/dtool/src/dtoolbase/pdtoa.cxx index 552391a6fc..ce47acb339 100644 --- a/dtool/src/dtoolbase/pdtoa.cxx +++ b/dtool/src/dtoolbase/pdtoa.cxx @@ -252,7 +252,7 @@ inline static unsigned CountDecimalDigit32(uint32_t n) { } inline static void DigitGen(const DiyFp& W, const DiyFp& Mp, uint64_t delta, char* buffer, int* len, int* K) { - static const uint32_t kPow10[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 0, 0, 0, 0, 0 }; + static const uint32_t kPow10[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 0, 0, 0, 0, 0, 0 }; const DiyFp one(uint64_t(1) << -Mp.e, Mp.e); const DiyFp wp_w = Mp - W; uint32_t p1 = static_cast(Mp.f >> -one.e); From 56cdea16c9f8a628810dcc6e90e0bd0aa4eb514e Mon Sep 17 00:00:00 2001 From: jtfedd Date: Sat, 15 Feb 2025 20:56:07 -0600 Subject: [PATCH 03/28] pgui: Fix bugs with pgSliderBar dragging Closes #1722 --- panda/src/pgui/pgSliderBar.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/panda/src/pgui/pgSliderBar.cxx b/panda/src/pgui/pgSliderBar.cxx index d423549ccb..7fe5bc8c73 100644 --- a/panda/src/pgui/pgSliderBar.cxx +++ b/panda/src/pgui/pgSliderBar.cxx @@ -693,6 +693,11 @@ advance_scroll() { */ void PGSliderBar:: advance_page() { + // Do not try to advance the page while dragging + if (_dragging) { + return; + } + // Is the mouse position left or right of the current thumb position? LPoint3 mouse = mouse_to_local(_mouse_pos) - _thumb_start; PN_stdfloat target_ratio = mouse.dot(_axis) / _range_x; @@ -705,7 +710,7 @@ advance_page() { t = min(_ratio + _page_ratio - _scroll_ratio, target_ratio); } internal_set_ratio(t); - if (t == target_ratio) { + if (_ratio == target_ratio) { // We made it; begin dragging from now on until the user releases the // mouse. begin_drag(); From fd5258fe094f523b2a5e71f42131740e1a16c0f3 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 12 Nov 2025 11:36:42 +0100 Subject: [PATCH 04/28] makepanda: Skip building TinyOsxGraphicsWindow when building 64-bit Also disable linking AGL on macOS SDK 26.0, which has removed it --- makepanda/makepanda.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 17699c3074..d4879b869f 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1249,7 +1249,8 @@ if (COMPILER=="GCC"): if GetTarget() == 'darwin': LibName("ALWAYS", "-framework AppKit") - LibName("AGL", "-framework AGL") + if SDK["OSXTARGET"] < (26, 0): + LibName("AGL", "-framework AGL") LibName("CARBON", "-framework Carbon") LibName("COCOA", "-framework Cocoa") # Fix for a bug in OSX Leopard: @@ -5616,9 +5617,10 @@ if not RUNTIME and not PkgSkip("TINYDISPLAY"): TargetAdd('p3tinydisplay_ztriangle_4.obj', opts=OPTS, input='ztriangle_4.cxx') TargetAdd('p3tinydisplay_ztriangle_table.obj', opts=OPTS, input='ztriangle_table.cxx') if GetTarget() == 'darwin': - TargetAdd('p3tinydisplay_tinyOsxGraphicsWindow.obj', opts=OPTS, input='tinyOsxGraphicsWindow.mm') - TargetAdd('libp3tinydisplay.dll', input='p3tinydisplay_tinyOsxGraphicsWindow.obj') - TargetAdd('libp3tinydisplay.dll', opts=['CARBON', 'AGL', 'COCOA']) + if frozenset(OSX_ARCHS) - frozenset(('x86_64', 'arm64')): + TargetAdd('p3tinydisplay_tinyOsxGraphicsWindow.obj', opts=OPTS, input='tinyOsxGraphicsWindow.mm') + TargetAdd('libp3tinydisplay.dll', input='p3tinydisplay_tinyOsxGraphicsWindow.obj') + TargetAdd('libp3tinydisplay.dll', opts=['CARBON', 'AGL', 'COCOA']) elif GetTarget() == 'windows': TargetAdd('libp3tinydisplay.dll', input='libp3windisplay.dll') TargetAdd('libp3tinydisplay.dll', opts=['WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM']) From 23782ec51102c1b45aa53d7055c70ff8e7fab9a8 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 12 Nov 2025 11:40:50 +0100 Subject: [PATCH 05/28] task: Also check for subclasses of coroutine Apparently Nuitka uses custom coroutine classes that inherit from Python's own coroutine class, causing PyCoro_CheckExact to be inadequate In the future we may want to check the ABC or check the existence of send/throw methods --- panda/src/event/asyncFuture_ext.cxx | 2 +- panda/src/event/pythonTask.cxx | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/panda/src/event/asyncFuture_ext.cxx b/panda/src/event/asyncFuture_ext.cxx index 4bc9f07378..f30ca366d5 100644 --- a/panda/src/event/asyncFuture_ext.cxx +++ b/panda/src/event/asyncFuture_ext.cxx @@ -396,7 +396,7 @@ gather(PyObject *args) { continue; } #if PY_VERSION_HEX >= 0x03050000 - } else if (PyCoro_CheckExact(item)) { + } else if (PyObject_TypeCheck(item, &PyCoro_Type)) { // We allow passing in a coroutine instead of a future. This causes it // to be scheduled as a task on the current task manager. PT(AsyncTask) task = new PythonTask(item); diff --git a/panda/src/event/pythonTask.cxx b/panda/src/event/pythonTask.cxx index f5af3f48de..fabdeb4a6c 100644 --- a/panda/src/event/pythonTask.cxx +++ b/panda/src/event/pythonTask.cxx @@ -53,15 +53,18 @@ PythonTask(PyObject *func_or_coro, const std::string &name) : _function = func_or_coro; Py_INCREF(_function); #if PY_VERSION_HEX >= 0x03050000 - } else if (PyCoro_CheckExact(func_or_coro)) { - // We also allow passing in a coroutine, because why not. + } else if (PyCoro_CheckExact(func_or_coro) || + PyGen_CheckExact(func_or_coro) || + PyType_IsSubtype(Py_TYPE(func_or_coro), &PyCoro_Type)) { + // We also allow passing in a coroutine. _generator = func_or_coro; Py_INCREF(_generator); -#endif +#else } else if (PyGen_CheckExact(func_or_coro)) { // Something emulating a coroutine. _generator = func_or_coro; Py_INCREF(_generator); +#endif } else { nassert_raise("Invalid function passed to PythonTask"); } @@ -528,7 +531,7 @@ do_python_task() { Py_DECREF(str); Py_DECREF(str2); } - if (PyCoro_CheckExact(result)) { + if (PyObject_TypeCheck(result, &PyCoro_Type)) { // If a coroutine, am_await is possible but senseless, since we can // just call send(None) on the coroutine itself. _generator = result; @@ -624,7 +627,7 @@ do_python_task() { } #if PY_VERSION_HEX >= 0x03050000 - } else if (result == Py_None && PyCoro_CheckExact(_generator)) { + } else if (result == Py_None && PyObject_TypeCheck(_generator, &PyCoro_Type)) { // Bare yield from a coroutine means to try again next frame. Py_DECREF(result); return DS_cont; From a01e039669a10c38ab38eecfab9613662fa8ace7 Mon Sep 17 00:00:00 2001 From: omn14 Date: Wed, 16 Apr 2025 13:52:24 +0200 Subject: [PATCH 06/28] x11: Add function for detecting auto repeat key events (#1735) Cherry-picked from master --- panda/src/x11display/config_x11display.cxx | 4 ++ panda/src/x11display/config_x11display.h | 1 + panda/src/x11display/x11GraphicsWindow.cxx | 64 +++++++++++++++++++++- panda/src/x11display/x11GraphicsWindow.h | 2 + 4 files changed, 69 insertions(+), 2 deletions(-) diff --git a/panda/src/x11display/config_x11display.cxx b/panda/src/x11display/config_x11display.cxx index d31c4c1c23..e63d394e10 100644 --- a/panda/src/x11display/config_x11display.cxx +++ b/panda/src/x11display/config_x11display.cxx @@ -84,6 +84,10 @@ ConfigVariableString x_wm_class PRC_DESC("Specify the value to use for the res_class field of the window's " "WM_CLASS property.")); +ConfigVariableBool x_detectable_auto_repeat +("x-detectable-auto-repeat", false, + PRC_DESC("Set this true to enable detectable auto-repeat for keyboard input.")); + /** * Initializes the library. This must be called at least once before any of * the functions or classes in this library can be used. Normally it will be diff --git a/panda/src/x11display/config_x11display.h b/panda/src/x11display/config_x11display.h index 157f09c5fc..2373d99185 100644 --- a/panda/src/x11display/config_x11display.h +++ b/panda/src/x11display/config_x11display.h @@ -36,5 +36,6 @@ extern ConfigVariableInt x_wheel_right_button; extern ConfigVariableInt x_cursor_size; extern ConfigVariableString x_wm_class_name; extern ConfigVariableString x_wm_class; +extern ConfigVariableBool x_detectable_auto_repeat; #endif diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index 531a100e59..f6008e2940 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -97,8 +97,7 @@ x11GraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, int flags, GraphicsStateGuardian *gsg, GraphicsOutput *host) : - GraphicsWindow(engine, pipe, name, fb_prop, win_prop, flags, gsg, host) -{ + GraphicsWindow(engine, pipe, name, fb_prop, win_prop, flags, gsg, host) { x11GraphicsPipe *x11_pipe; DCAST_INTO_V(x11_pipe, _pipe); _display = x11_pipe->get_display(); @@ -123,6 +122,8 @@ x11GraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, PT(GraphicsWindowInputDevice) device = GraphicsWindowInputDevice::pointer_and_keyboard(this, "keyboard_mouse"); add_input_device(device); _input = device; + + enable_detectable_auto_repeat(); } /** @@ -2442,3 +2443,62 @@ cleanup: return ret; } + +/** + * + */ +int x11GraphicsWindow:: +xim_preedit_start(XIC ic, XPointer client_data, XPointer call_data) { + x11GraphicsWindow *window = (x11GraphicsWindow *)client_data; + return window->handle_preedit_start(); +} + +/** + * + */ +void x11GraphicsWindow:: +xim_preedit_draw(XIC ic, XPointer client_data, + XIMPreeditDrawCallbackStruct *call_data) { + x11GraphicsWindow *window = (x11GraphicsWindow *)client_data; + nassertv_always(call_data != nullptr); + window->handle_preedit_draw(*call_data); +} + +/** + * + */ +void x11GraphicsWindow:: +xim_preedit_caret(XIC ic, XPointer client_data, + XIMPreeditCaretCallbackStruct *call_data) { + x11GraphicsWindow *window = (x11GraphicsWindow *)client_data; + nassertv_always(call_data != nullptr); + window->handle_preedit_caret(*call_data); +} + +/** + * + */ +void x11GraphicsWindow:: +xim_preedit_done(XIC ic, XPointer client_data, XPointer call_data) { + x11GraphicsWindow *window = (x11GraphicsWindow *)client_data; + window->handle_preedit_done(); +} + +/** + * Enables detectable auto-repeat if supported by the X server. + */ +void x11GraphicsWindow:: +enable_detectable_auto_repeat() { + if (!x_detectable_auto_repeat) { + return; + } + + Bool supported; + if (XkbSetDetectableAutoRepeat(_display, True, &supported)) { + x11display_cat.info() << "Detectable auto-repeat enabled.\n"; + } else if (!supported) { + x11display_cat.warning() << "Detectable auto-repeat is not supported by the X server.\n"; + } else { + x11display_cat.error() << "Failed to set detectable auto-repeat.\n"; + } +} diff --git a/panda/src/x11display/x11GraphicsWindow.h b/panda/src/x11display/x11GraphicsWindow.h index ca44e4d426..2b0ee94e3e 100644 --- a/panda/src/x11display/x11GraphicsWindow.h +++ b/panda/src/x11display/x11GraphicsWindow.h @@ -46,6 +46,8 @@ public: INLINE X11_Window get_xwindow() const; + void enable_detectable_auto_repeat(); + protected: virtual void close_window(); virtual bool open_window(); From 2c9997ee6d1802c3581436b919d984cf635be32a Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 12 Nov 2025 11:47:48 +0100 Subject: [PATCH 07/28] x11: Remove methods added erroneously during bad merge --- panda/src/x11display/x11GraphicsWindow.cxx | 40 ---------------------- 1 file changed, 40 deletions(-) diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index f6008e2940..dd6f468ebd 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -2444,46 +2444,6 @@ cleanup: return ret; } -/** - * - */ -int x11GraphicsWindow:: -xim_preedit_start(XIC ic, XPointer client_data, XPointer call_data) { - x11GraphicsWindow *window = (x11GraphicsWindow *)client_data; - return window->handle_preedit_start(); -} - -/** - * - */ -void x11GraphicsWindow:: -xim_preedit_draw(XIC ic, XPointer client_data, - XIMPreeditDrawCallbackStruct *call_data) { - x11GraphicsWindow *window = (x11GraphicsWindow *)client_data; - nassertv_always(call_data != nullptr); - window->handle_preedit_draw(*call_data); -} - -/** - * - */ -void x11GraphicsWindow:: -xim_preedit_caret(XIC ic, XPointer client_data, - XIMPreeditCaretCallbackStruct *call_data) { - x11GraphicsWindow *window = (x11GraphicsWindow *)client_data; - nassertv_always(call_data != nullptr); - window->handle_preedit_caret(*call_data); -} - -/** - * - */ -void x11GraphicsWindow:: -xim_preedit_done(XIC ic, XPointer client_data, XPointer call_data) { - x11GraphicsWindow *window = (x11GraphicsWindow *)client_data; - window->handle_preedit_done(); -} - /** * Enables detectable auto-repeat if supported by the X server. */ From 227a9e3406ed650f7ff6378643d36e0e7c8e7645 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 12 Nov 2025 11:48:51 +0100 Subject: [PATCH 08/28] workflow: Update from deprecated macOS 13 runner to macOS 14 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2feb1aa06e..e8695de55a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')" strategy: matrix: - os: [ubuntu-22.04, windows-2022, macOS-13] + os: [ubuntu-22.04, windows-2022, macOS-14] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v1 From 2ecbd546404202383453fad99c8e31474b6abf6c Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 1 Dec 2025 10:05:44 +0100 Subject: [PATCH 09/28] installer: Add Python 3.15 --- makepanda/installer.nsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/makepanda/installer.nsi b/makepanda/installer.nsi index b31ad3cd55..1a5f57a2bb 100644 --- a/makepanda/installer.nsi +++ b/makepanda/installer.nsi @@ -428,6 +428,7 @@ SectionGroup "Python modules" SecGroupPython !insertmacro PyBindingSection 3.12-32 .cp312-win32.pyd !insertmacro PyBindingSection 3.13-32 .cp313-win32.pyd !insertmacro PyBindingSection 3.14-32 .cp314-win32.pyd + !insertmacro PyBindingSection 3.15-32 .cp315-win32.pyd !else !insertmacro PyBindingSection 3.5 .cp35-win_amd64.pyd !insertmacro PyBindingSection 3.6 .cp36-win_amd64.pyd @@ -439,6 +440,7 @@ SectionGroup "Python modules" SecGroupPython !insertmacro PyBindingSection 3.12 .cp312-win_amd64.pyd !insertmacro PyBindingSection 3.13 .cp313-win_amd64.pyd !insertmacro PyBindingSection 3.14 .cp314-win_amd64.pyd + !insertmacro PyBindingSection 3.15 .cp315-win_amd64.pyd !endif SectionGroupEnd @@ -552,6 +554,7 @@ Function .onInit !insertmacro MaybeEnablePyBindingSection 3.12-32 !insertmacro MaybeEnablePyBindingSection 3.13-32 !insertmacro MaybeEnablePyBindingSection 3.14-32 + !insertmacro MaybeEnablePyBindingSection 3.15-32 ${EndIf} !else !insertmacro MaybeEnablePyBindingSection 3.5 @@ -565,6 +568,7 @@ Function .onInit !insertmacro MaybeEnablePyBindingSection 3.12 !insertmacro MaybeEnablePyBindingSection 3.13 !insertmacro MaybeEnablePyBindingSection 3.14 + !insertmacro MaybeEnablePyBindingSection 3.15 ${EndIf} !endif @@ -594,6 +598,10 @@ Function .onInit SectionSetFlags ${SecPyBindings3.14} ${SF_RO} SectionSetInstTypes ${SecPyBindings3.14} 0 !endif + !ifdef SecPyBindings3.15 + SectionSetFlags ${SecPyBindings3.15} ${SF_RO} + SectionSetInstTypes ${SecPyBindings3.15} 0 + !endif ${EndUnless} FunctionEnd @@ -909,6 +917,7 @@ Section Uninstall !insertmacro RemovePythonPath 3.12-32 !insertmacro RemovePythonPath 3.13-32 !insertmacro RemovePythonPath 3.14-32 + !insertmacro RemovePythonPath 3.15-32 !else !insertmacro RemovePythonPath 3.5 !insertmacro RemovePythonPath 3.6 @@ -920,6 +929,7 @@ Section Uninstall !insertmacro RemovePythonPath 3.12 !insertmacro RemovePythonPath 3.13 !insertmacro RemovePythonPath 3.14 + !insertmacro RemovePythonPath 3.15 !endif SetDetailsPrint both @@ -999,6 +1009,7 @@ SectionEnd !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.12-32} $(DESC_SecPyBindings3.12-32) !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.13-32} $(DESC_SecPyBindings3.13-32) !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.14-32} $(DESC_SecPyBindings3.14-32) + !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.15-32} $(DESC_SecPyBindings3.15-32) !else !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.5} $(DESC_SecPyBindings3.5) !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.6} $(DESC_SecPyBindings3.6) @@ -1010,6 +1021,7 @@ SectionEnd !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.12} $(DESC_SecPyBindings3.12) !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.13} $(DESC_SecPyBindings3.13) !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.14} $(DESC_SecPyBindings3.14) + !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.15} $(DESC_SecPyBindings3.15) !endif !ifdef INCLUDE_PYVER !insertmacro MUI_DESCRIPTION_TEXT ${SecPython} $(DESC_SecPython) From 8ece2c86d018fbade96a61d50038a8d6ebb0bf73 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 1 Dec 2025 10:21:15 +0100 Subject: [PATCH 10/28] Update BACKERS.md from latest master [skip ci] --- BACKERS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BACKERS.md b/BACKERS.md index 2b48940fc3..29838e55e9 100644 --- a/BACKERS.md +++ b/BACKERS.md @@ -5,10 +5,12 @@ This is a list of all the people who are contributing financially to Panda3D. I ## Bronze Sponsors [Route4Me](https://route4me.com/) +[LambdaTest](https://www.lambdatest.com/?utm_source=panda3d&utm_medium=sponsor) * [Daniel Stokes](https://opencollective.com/daniel-stokes) * [David Rose](https://opencollective.com/david-rose) * [Route4Me](https://route4me.com/) +* [LambdaTest](https://www.lambdatest.com/?utm_source=panda3d&utm_medium=sponsor) ## Benefactors From 03873c7adfdf7cfc7c9ce94de2e6eaf54d24e0c9 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 1 Dec 2025 11:26:51 +0100 Subject: [PATCH 11/28] Update Windows thirdparty tools to 1.10.16 --- .github/workflows/ci.yml | 4 ++-- README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8695de55a..9c304c75af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,9 +20,9 @@ jobs: shell: powershell run: | $wc = New-Object System.Net.WebClient - $wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-win64.zip", "thirdparty-tools.zip") + $wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.16/panda3d-1.10.16-tools-win64.zip", "thirdparty-tools.zip") Expand-Archive -Path thirdparty-tools.zip - Move-Item -Path thirdparty-tools/panda3d-1.10.15/thirdparty -Destination . + Move-Item -Path thirdparty-tools/panda3d-1.10.16/thirdparty -Destination . - name: Get thirdparty packages (macOS) if: runner.os == 'macOS' run: | diff --git a/README.md b/README.md index 99ae98d97f..0621692a86 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,8 @@ depending on whether you are on a 32-bit or 64-bit system, or you can [click here](https://github.com/rdb/panda3d-thirdparty) for instructions on building them from source. -- https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-win64.zip -- https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-win32.zip +- https://www.panda3d.org/download/panda3d-1.10.16/panda3d-1.10.16-tools-win64.zip +- https://www.panda3d.org/download/panda3d-1.10.16/panda3d-1.10.16-tools-win32.zip After acquiring these dependencies, you can build Panda3D from the command prompt using the following command. Change the `--msvc-version` option based From 6a77fc633b2187066820904cd694c42c90bb1cd2 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 1 Dec 2025 11:47:01 +0100 Subject: [PATCH 12/28] dist: Update macOS target for Python 3.14 to 10.15 --- direct/src/dist/commands.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/direct/src/dist/commands.py b/direct/src/dist/commands.py index 68ce14ac82..b8b08b6456 100644 --- a/direct/src/dist/commands.py +++ b/direct/src/dist/commands.py @@ -301,7 +301,10 @@ class build_apps(setuptools.Command): # manylinux1 is not offered for Python 3.10 anymore self.platforms[0] = 'manylinux2010_x86_64' - if sys.version_info >= (3, 13): + if sys.version_info >= (3, 14): + # This version of Python is only available for 10.15+. + self.platforms[1] = 'macosx_10_15_x86_64' + elif sys.version_info >= (3, 13): # This version of Python is only available for 10.13+. self.platforms[1] = 'macosx_10_13_x86_64' elif sys.version_info >= (3, 8): @@ -587,8 +590,14 @@ class build_apps(setuptools.Command): subprocess.check_call([sys.executable, '-m', 'pip'] + pip_args) except: # Display a more helpful message for these common issues. - if platform.startswith('macosx_10_9_') and sys.version_info >= (3, 13): - new_platform = platform.replace('macosx_10_9_', 'macosx_10_13_') + if platform.startswith('macosx_10_13_') and sys.version_info >= (3, 14): + new_platform = platform.replace('macosx_10_13_', 'macosx_10_15_') + self.announce('This error likely occurs because {} is not a supported target as of Python 3.14.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR) + elif platform.startswith('macosx_10_9_') and sys.version_info >= (3, 13): + if sys.version_info >= (3, 14): + new_platform = platform.replace('macosx_10_9_', 'macosx_10_15_') + else: + new_platform = platform.replace('macosx_10_9_', 'macosx_10_13_') self.announce('This error likely occurs because {} is not a supported target as of Python 3.13.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR) elif platform.startswith('manylinux2010_') and sys.version_info >= (3, 11): new_platform = platform.replace('manylinux2010_', 'manylinux2014_') @@ -597,7 +606,9 @@ class build_apps(setuptools.Command): new_platform = platform.replace('manylinux1_', 'manylinux2014_') self.announce('This error likely occurs because {} is not a supported target as of Python 3.10.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR) elif platform.startswith('macosx_10_6_') and sys.version_info >= (3, 8): - if sys.version_info >= (3, 13): + if sys.version_info >= (3, 14): + new_platform = platform.replace('macosx_10_6_', 'macosx_10_15_') + elif sys.version_info >= (3, 13): new_platform = platform.replace('macosx_10_6_', 'macosx_10_13_') else: new_platform = platform.replace('macosx_10_6_', 'macosx_10_9_') From f4ee9503557dc356e45751a85721eb6cd6c8c4fb Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 1 Dec 2025 14:46:40 +0100 Subject: [PATCH 13/28] deploy-stub: Fix missing time.h include --- pandatool/src/deploy-stub/deploy-stub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pandatool/src/deploy-stub/deploy-stub.c b/pandatool/src/deploy-stub/deploy-stub.c index 7a36da6789..95d40ad25a 100644 --- a/pandatool/src/deploy-stub/deploy-stub.c +++ b/pandatool/src/deploy-stub/deploy-stub.c @@ -21,6 +21,7 @@ #include #include #include +#include #if PY_MAJOR_VERSION >= 3 # include From 784f32d0b989dc426ce7da1d72816688c2f565a2 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 18 Dec 2025 15:00:56 +0100 Subject: [PATCH 14/28] showbase: add user_exit alias for userExit --- direct/src/showbase/ShowBase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 7db064fbea..ee1a415cb3 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -3396,6 +3396,7 @@ class ShowBase(DirectObject.DirectObject): remove_camera_frustum = removeCameraFrustum save_cube_map = saveCubeMap save_sphere_map = saveSphereMap + user_exit = userExit start_wx = startWx start_tk = startTk start_direct = startDirect From 6ada5071d531d0fb8d3942a65ef290f62089a1ff Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 6 Dec 2025 21:04:58 +0100 Subject: [PATCH 15/28] dist: Add linecache stubs for newer versions of Python --- direct/src/dist/FreezeTool.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/direct/src/dist/FreezeTool.py b/direct/src/dist/FreezeTool.py index 93981a9c81..8f0d28d06b 100644 --- a/direct/src/dist/FreezeTool.py +++ b/direct/src/dist/FreezeTool.py @@ -201,12 +201,23 @@ def getline(filename, lineno, module_globals=None): return '' def clearcache(): - global cache - cache = {} + cache.clear() def getlines(filename, module_globals=None): return [] +def _getline_from_code(filename, lineno): + return '' + +def _make_key(code): + return (code.co_filename, code.co_qualname, code.co_firstlineno) + +def _getlines_from_code(code): + return [] + +def _source_unavailable(filename): + return True + def checkcache(filename=None): pass From 5b2cb98a9363023d0be9489e79d9ead390c24dbd Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 6 Dec 2025 21:04:41 +0100 Subject: [PATCH 16/28] dist: Add hidden import for jnius --- direct/src/dist/FreezeTool.py | 1 + 1 file changed, 1 insertion(+) diff --git a/direct/src/dist/FreezeTool.py b/direct/src/dist/FreezeTool.py index 8f0d28d06b..eeed0fa35b 100644 --- a/direct/src/dist/FreezeTool.py +++ b/direct/src/dist/FreezeTool.py @@ -115,6 +115,7 @@ hiddenImports = { 'scipy.stats._stats': ['scipy.special.cython_special'], 'setuptools.monkey': ['setuptools.msvc'], 'shapely._geometry_helpers': ['shapely._geos'], + 'jnius': ['jnius_config'], } if sys.version_info >= (3,): From 5d8af37c41c92005cd24b4e18c67e50515d00946 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 22 Dec 2025 11:37:16 +0100 Subject: [PATCH 17/28] makepanda: Only add -msse2 when building for x86 platforms Partial backport of 2759fb9606ee743660dafac61ed60bba34f9c0f8 --- makepanda/makepanda.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index d4879b869f..2fd81b6624 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1658,7 +1658,7 @@ def CompileCxx(obj,src,opts): if optlevel >= 4 or target == "android": cmd += " -fno-rtti" - if ('SSE2' in opts or not PkgSkip("SSE2")) and not arch.startswith("arm") and arch != 'aarch64': + if ('SSE2' in opts or not PkgSkip("SSE2")) and arch.find('86') > 0: cmd += " -msse2" # Needed by both Python, Panda, Eigen, all of which break aliasing rules. From df4ebca33556565f2799d0b8c662281618dd0015 Mon Sep 17 00:00:00 2001 From: a2cy <75477334+a2cy@users.noreply.github.com> Date: Wed, 17 Dec 2025 23:58:19 +0100 Subject: [PATCH 18/28] audiotraits: Add support for different coordinate systems for 3d audio Backport of 4705b329436bdb9717261eb97f3163d1155dae53 (#1786) --- panda/src/audiotraits/openalAudioManager.cxx | 176 ++++++++++++++++--- panda/src/audiotraits/openalAudioSound.cxx | 53 +++++- 2 files changed, 199 insertions(+), 30 deletions(-) diff --git a/panda/src/audiotraits/openalAudioManager.cxx b/panda/src/audiotraits/openalAudioManager.cxx index 59ce773cb1..54f54f83a6 100644 --- a/panda/src/audiotraits/openalAudioManager.cxx +++ b/panda/src/audiotraits/openalAudioManager.cxx @@ -701,21 +701,85 @@ get_active() const { void OpenALAudioManager:: audio_3d_set_listener_attributes(PN_stdfloat px, PN_stdfloat py, PN_stdfloat pz, PN_stdfloat vx, PN_stdfloat vy, PN_stdfloat vz, PN_stdfloat fx, PN_stdfloat fy, PN_stdfloat fz, PN_stdfloat ux, PN_stdfloat uy, PN_stdfloat uz) { ReMutexHolder holder(_lock); - _position[0] = px; - _position[1] = pz; - _position[2] = -py; + CoordinateSystem cs = get_default_coordinate_system(); - _velocity[0] = vx; - _velocity[1] = vz; - _velocity[2] = -vy; + switch (cs) { + case CS_yup_right: + _position[0] = px; + _position[1] = py; + _position[2] = pz; - _forward_up[0] = fx; - _forward_up[1] = fz; - _forward_up[2] = -fy; + _velocity[0] = vx; + _velocity[1] = vy; + _velocity[2] = vz; - _forward_up[3] = ux; - _forward_up[4] = uz; - _forward_up[5] = -uy; + _forward_up[0] = fx; + _forward_up[1] = fy; + _forward_up[2] = fz; + + _forward_up[3] = ux; + _forward_up[4] = uy; + _forward_up[5] = uz; + break; + + case CS_zup_right: + _position[0] = px; + _position[1] = pz; + _position[2] = -py; + + _velocity[0] = vx; + _velocity[1] = vz; + _velocity[2] = -vy; + + _forward_up[0] = fx; + _forward_up[1] = fz; + _forward_up[2] = -fy; + + _forward_up[3] = ux; + _forward_up[4] = uz; + _forward_up[5] = -uy; + break; + + case CS_yup_left: + _position[0] = px; + _position[1] = py; + _position[2] = -pz; + + _velocity[0] = vx; + _velocity[1] = vy; + _velocity[2] = -vz; + + _forward_up[0] = fx; + _forward_up[1] = fy; + _forward_up[2] = -fz; + + _forward_up[3] = ux; + _forward_up[4] = uy; + _forward_up[5] = -uz; + break; + + case CS_zup_left: + _position[0] = px; + _position[1] = pz; + _position[2] = py; + + _velocity[0] = vx; + _velocity[1] = vz; + _velocity[2] = vy; + + _forward_up[0] = fx; + _forward_up[1] = fz; + _forward_up[2] = fy; + + _forward_up[3] = ux; + _forward_up[4] = uz; + _forward_up[5] = uy; + break; + + default: + nassert_raise("invalid coordinate system"); + return; + } make_current(); @@ -735,21 +799,85 @@ audio_3d_set_listener_attributes(PN_stdfloat px, PN_stdfloat py, PN_stdfloat pz, void OpenALAudioManager:: audio_3d_get_listener_attributes(PN_stdfloat *px, PN_stdfloat *py, PN_stdfloat *pz, PN_stdfloat *vx, PN_stdfloat *vy, PN_stdfloat *vz, PN_stdfloat *fx, PN_stdfloat *fy, PN_stdfloat *fz, PN_stdfloat *ux, PN_stdfloat *uy, PN_stdfloat *uz) { ReMutexHolder holder(_lock); - *px = _position[0]; - *py = -_position[2]; - *pz = _position[1]; + CoordinateSystem cs = get_default_coordinate_system(); - *vx = _velocity[0]; - *vy = -_velocity[2]; - *vz = _velocity[1]; + switch (cs) { + case CS_yup_right: + *px = _position[0]; + *py = _position[1]; + *pz = _position[2]; - *fx = _forward_up[0]; - *fy = -_forward_up[2]; - *fz = _forward_up[1]; + *vx = _velocity[0]; + *vy = _velocity[1]; + *vz = _velocity[2]; - *ux = _forward_up[3]; - *uy = -_forward_up[5]; - *uz = _forward_up[4]; + *fx = _forward_up[0]; + *fy = _forward_up[1]; + *fz = _forward_up[2]; + + *ux = _forward_up[3]; + *uy = _forward_up[4]; + *uz = _forward_up[5]; + break; + + case CS_zup_right: + *px = _position[0]; + *py = -_position[2]; + *pz = _position[1]; + + *vx = _velocity[0]; + *vy = -_velocity[2]; + *vz = _velocity[1]; + + *fx = _forward_up[0]; + *fy = -_forward_up[2]; + *fz = _forward_up[1]; + + *ux = _forward_up[3]; + *uy = -_forward_up[5]; + *uz = _forward_up[4]; + break; + + case CS_yup_left: + *px = _position[0]; + *py = _position[1]; + *pz = -_position[2]; + + *vx = _velocity[0]; + *vy = _velocity[1]; + *vz = -_velocity[2]; + + *fx = _forward_up[0]; + *fy = _forward_up[1]; + *fz = -_forward_up[2]; + + *ux = _forward_up[3]; + *uy = _forward_up[4]; + *uz = -_forward_up[5]; + break; + + case CS_zup_left: + *px = _position[0]; + *py = _position[2]; + *pz = _position[1]; + + *vx = _velocity[0]; + *vy = _velocity[2]; + *vz = _velocity[1]; + + *fx = _forward_up[0]; + *fy = _forward_up[2]; + *fz = _forward_up[1]; + + *ux = _forward_up[3]; + *uy = _forward_up[5]; + *uz = _forward_up[4]; + break; + + default: + nassert_raise("invalid coordinate system"); + return; + } } /** diff --git a/panda/src/audiotraits/openalAudioSound.cxx b/panda/src/audiotraits/openalAudioSound.cxx index 155d6211fb..335090f32a 100644 --- a/panda/src/audiotraits/openalAudioSound.cxx +++ b/panda/src/audiotraits/openalAudioSound.cxx @@ -14,6 +14,7 @@ // Panda Headers #include "throw_event.h" +#include "coordinateSystem.h" #include "openalAudioSound.h" #include "openalAudioManager.h" @@ -692,13 +693,53 @@ length() const { void OpenALAudioSound:: set_3d_attributes(PN_stdfloat px, PN_stdfloat py, PN_stdfloat pz, PN_stdfloat vx, PN_stdfloat vy, PN_stdfloat vz) { ReMutexHolder holder(OpenALAudioManager::_lock); - _location[0] = px; - _location[1] = pz; - _location[2] = -py; + CoordinateSystem cs = get_default_coordinate_system(); - _velocity[0] = vx; - _velocity[1] = vz; - _velocity[2] = -vy; + switch (cs) { + case CS_yup_right: + _location[0] = px; + _location[1] = py; + _location[2] = pz; + + _velocity[0] = vx; + _velocity[1] = vy; + _velocity[2] = vz; + break; + + case CS_zup_right: + _location[0] = px; + _location[1] = pz; + _location[2] = -py; + + _velocity[0] = vx; + _velocity[1] = vz; + _velocity[2] = -vy; + break; + + case CS_yup_left: + _location[0] = px; + _location[1] = py; + _location[2] = -pz; + + _velocity[0] = vx; + _velocity[1] = vy; + _velocity[2] = -vz; + break; + + case CS_zup_left: + _location[0] = px; + _location[1] = pz; + _location[2] = py; + + _velocity[0] = vx; + _velocity[1] = vz; + _velocity[2] = vy; + break; + + default: + nassert_raise("invalid coordinate system"); + return; + } if (is_playing()) { _manager->make_current(); From c8c5ae829d13d2eab8910c2c31099b632ce5a8a0 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 14 Nov 2024 20:07:48 +0100 Subject: [PATCH 19/28] putil: Fix SparseArray get_lowest_on_bit and get_lowest_off_bit Cherry-pick of d173086a6f25ffe238f90b65386dad54119eb618 --- panda/src/putil/sparseArray.cxx | 14 +++++++++++--- tests/putil/test_sparsearray.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/panda/src/putil/sparseArray.cxx b/panda/src/putil/sparseArray.cxx index 5404728aa1..54aa8b03ea 100644 --- a/panda/src/putil/sparseArray.cxx +++ b/panda/src/putil/sparseArray.cxx @@ -89,12 +89,16 @@ get_num_off_bits() const { /** * Returns the index of the lowest 1 bit in the array. Returns -1 if there - * are no 1 bits or if there are an infinite number of 1 bits. + * are no 1 bits and 0 if there are an infinite number of 1 bits. */ int SparseArray:: get_lowest_on_bit() const { if (_inverse) { - return -1; + if (_subranges.empty() || _subranges[0]._begin > 0) { + return 0; + } else { + return _subranges[0]._end; + } } if (_subranges.empty()) { @@ -111,7 +115,11 @@ get_lowest_on_bit() const { int SparseArray:: get_lowest_off_bit() const { if (!_inverse) { - return -1; + if (_subranges.empty() || _subranges[0]._begin > 0) { + return 0; + } else { + return _subranges[0]._end; + } } if (_subranges.empty()) { diff --git a/tests/putil/test_sparsearray.py b/tests/putil/test_sparsearray.py index 5138914cdf..4c627a29be 100644 --- a/tests/putil/test_sparsearray.py +++ b/tests/putil/test_sparsearray.py @@ -235,6 +235,35 @@ def test_sparse_array_augm_assignment(): assert s is t +def test_sparse_array_lowest_bit(): + sa = core.SparseArray() + assert sa.get_lowest_off_bit() == 0 + assert sa.get_lowest_on_bit() == -1 + + sa.invert_in_place() + assert sa.get_lowest_off_bit() == -1 + assert sa.get_lowest_on_bit() == 0 + + sa = core.SparseArray() + sa.set_bit(0) + sa.set_bit(1) + assert sa.get_lowest_off_bit() == 2 + assert sa.get_lowest_on_bit() == 0 + + sa.invert_in_place() + assert sa.get_lowest_off_bit() == 0 + assert sa.get_lowest_on_bit() == 2 + + sa = core.SparseArray() + sa.set_bit(2) + assert sa.get_lowest_off_bit() == 0 + assert sa.get_lowest_on_bit() == 2 + + sa.invert_in_place() + assert sa.get_lowest_off_bit() == 2 + assert sa.get_lowest_on_bit() == 0 + + def test_sparse_array_getstate(): sa = core.SparseArray() assert sa.__getstate__() == () From d020b25afe0527397ef98a1d4e68c7f73c772523 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 14 Nov 2024 20:21:04 +0100 Subject: [PATCH 20/28] windisplay: Fix recursive loop in adjust_z_order Cherry-pick of 639497310e2972eae81ee825dbdff14cdc02c520 with alteration to preserve ABI (replacing an unused bool field) --- panda/src/windisplay/winGraphicsWindow.cxx | 11 ++++++++++- panda/src/windisplay/winGraphicsWindow.h | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/panda/src/windisplay/winGraphicsWindow.cxx b/panda/src/windisplay/winGraphicsWindow.cxx index 0a216be367..c7f8afd26d 100644 --- a/panda/src/windisplay/winGraphicsWindow.cxx +++ b/panda/src/windisplay/winGraphicsWindow.cxx @@ -1308,6 +1308,11 @@ adjust_z_order() { void WinGraphicsWindow:: adjust_z_order(WindowProperties::ZOrder last_z_order, WindowProperties::ZOrder this_z_order) { + // Prevent calling this recursively. + if (_in_adjust_z_order) { + return; + } + HWND order; bool do_change = false; @@ -1337,8 +1342,10 @@ adjust_z_order(WindowProperties::ZOrder last_z_order, break; } if (do_change) { + _in_adjust_z_order = true; BOOL result = SetWindowPos(_hWnd, order, 0,0,0,0, SWP_NOMOVE | SWP_NOSENDCHANGING | SWP_NOSIZE); + _in_adjust_z_order = false; if (!result) { windisplay_cat.warning() << "SetWindowPos failed.\n"; @@ -1630,7 +1637,9 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { if (_hWnd != nullptr) { handle_reshape(); } - adjust_z_order(); + if (!_in_adjust_z_order) { + adjust_z_order(); + } return 0; case WM_PAINT: diff --git a/panda/src/windisplay/winGraphicsWindow.h b/panda/src/windisplay/winGraphicsWindow.h index a0416a873f..1f1edaac97 100644 --- a/panda/src/windisplay/winGraphicsWindow.h +++ b/panda/src/windisplay/winGraphicsWindow.h @@ -173,7 +173,7 @@ private: bool _ime_open; bool _ime_active; bool _tracking_mouse_leaving; - bool _bCursor_in_WindowClientArea; + bool _in_adjust_z_order = false; HANDLE _input_device_handle[32]; HCURSOR _cursor; DEVMODE _fullscreen_display_mode; From cbd25a4d802afa7389df4a51e6964c0f4f4a64a6 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 26 Nov 2024 16:40:49 +0100 Subject: [PATCH 21/28] makepanda: Don't look for macOS framework when cross-compiling Backport of 7191fb1ed68e470cdc7b11f3b5b74544991caea0 --- makepanda/makepandacore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 74a4307a29..4df2de0e78 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -1831,7 +1831,7 @@ def SmartPkgEnable(pkg, pkgconfig = None, libs = None, incs = None, defs = None, DefSymbol(target_pkg, d, v) return - elif not custom_loc and GetHost() == "darwin" and framework != None: + elif not custom_loc and GetHost() == "darwin" and GetTarget() == "darwin" and framework is not None: prefix = SDK["MACOSX"] if (os.path.isdir(prefix + "/Library/Frameworks/%s.framework" % framework) or os.path.isdir(prefix + "/System/Library/Frameworks/%s.framework" % framework) or From 6b3ed01756086251d5070fb0a67bc046559da958 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 26 Nov 2024 18:16:01 +0100 Subject: [PATCH 22/28] framework: Clean up task manager on close_framework() This prevents crashes due to the tasks it spawns continuing to run Backport of a32030d46e6a96547fe4ebe6b1036be652ef659f --- panda/src/framework/pandaFramework.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/panda/src/framework/pandaFramework.cxx b/panda/src/framework/pandaFramework.cxx index 706ff4995d..29f5746c38 100644 --- a/panda/src/framework/pandaFramework.cxx +++ b/panda/src/framework/pandaFramework.cxx @@ -189,6 +189,8 @@ close_framework() { _event_handler.remove_all_hooks(); + _task_mgr.cleanup(); + _is_open = false; _made_default_pipe = false; _default_pipe.clear(); From 40ecb01bb157badac4fd482b8806721d4e3ad0c4 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 14 Dec 2024 12:50:02 +0100 Subject: [PATCH 23/28] samples: Remove unused CardMaker import from procedural-cube sample Backport of 5d465be01e9ac5a8aad9cb689af822f60682b7e9 --- samples/procedural-cube/main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/samples/procedural-cube/main.py b/samples/procedural-cube/main.py index 2f21cd9a0f..266afc4205 100755 --- a/samples/procedural-cube/main.py +++ b/samples/procedural-cube/main.py @@ -17,7 +17,6 @@ from panda3d.core import GeomVertexFormat, GeomVertexData from panda3d.core import Geom, GeomTriangles, GeomVertexWriter from panda3d.core import Texture, GeomNode from panda3d.core import PerspectiveLens -from panda3d.core import CardMaker from panda3d.core import Light, Spotlight from panda3d.core import TextNode from panda3d.core import LVector3 From b09ebf3b84ae9d3f858edee19871bce450072d12 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 29 Dec 2024 14:39:43 +0100 Subject: [PATCH 24/28] makewheel: Exclude some more system libs Backport of be382a8f29f81c289be818760eae12523aa26837 --- makepanda/makewheel.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/makepanda/makewheel.py b/makepanda/makewheel.py index c0fe650fdf..e60033b9a3 100644 --- a/makepanda/makewheel.py +++ b/makepanda/makewheel.py @@ -114,7 +114,9 @@ MANYLINUX_LIBS = [ # These are not mentioned in manylinux1 spec but should nonetheless always # be excluded. "linux-vdso.so.1", "linux-gate.so.1", "ld-linux.so.2", "libdrm.so.2", + "ld-linux-x86-64.so.2", "ld-linux-aarch64.so.1", "libEGL.so.1", "libOpenGL.so.0", "libGLX.so.0", "libGLdispatch.so.0", + "libGLESv2.so.2", ] # Binaries to never scan for dependencies on non-Windows systems. From 33888de3b54311b697b7179b955925c98b33a05c Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 29 Jan 2025 11:12:07 +0100 Subject: [PATCH 25/28] glgsg: Do not prefer depth-stencil ms renderbuffers on macOS Fixes #1719 Backport of fa64a52fca875b99c1cdb423968bb53985afec7b --- panda/src/glstuff/glGraphicsBuffer_src.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index e63ea89b17..f6444806df 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -517,6 +517,18 @@ rebuild_bitplanes() { // but it's a waste. Let's not do it unless the user requested stencil. _use_depth_stencil = false; +#ifdef __APPLE__ + } else if (_fb_properties.get_depth_bits() > 0 && _requested_multisamples) { + // Apple's OpenGL driver doesn't like blitting depth-stencil targets. + // See GitHub issue #1719 + _use_depth_stencil = false; + if (_fb_properties.get_depth_bits() < 24) { + // Make sure we do get at least as many depth bits as we would have + // gotten if we did get a depth-stencil buffer. + _fb_properties.set_depth_bits(24); + } +#endif + } else if (_fb_properties.get_depth_bits() > 0) { // Let's use a depth stencil buffer by default, if a depth buffer was // requested. From e319be1fcb226d9aabd33ada77f3a317d6854c12 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 22 Dec 2025 12:17:55 +0100 Subject: [PATCH 26/28] doc: Add release notes for 1.10.16 --- doc/ReleaseNotes | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/doc/ReleaseNotes b/doc/ReleaseNotes index e5651145b7..6374795a59 100644 --- a/doc/ReleaseNotes +++ b/doc/ReleaseNotes @@ -1,3 +1,29 @@ +----------------------- RELEASE 1.10.16 ----------------------- + +This maintenance release fixes some minor defects and stability issues. + +* OpenAL: Support non-default coordinate systems when playing 3D audio +* Tasks: Coroutine detect now also handles coroutine subclass to support Nuitka +* Tasks: Now properly handles generators without send() +* Windows: Fixes a hang when adjusting Z-order in some situations +* Fix SparseArray methods get_lowest_off_bit() and get_lowest_on_bit() +* Fix linecache error when distributing for newer Python versions +* Fix `await AsyncFuture.gather()` returning first item instead of tuple (#1738) +* Fix use-after-free in collision system with transform cache disabled (#1733) +* OpenGL: fix error blitting depth texture on macOS (#1719) +* OpenGL: fix SSBO support not being detected in certain situations +* X11: Add config variable to enable detection of autorepeat key events (#1735) +* GUI: Fix bug with PGSliderBar dragging (#1722) +* Minor thread safety things for free-threaded Python builds +* Add forward compatibility for bam version 6.46 +* Fixes a harmless buffer overflow in pdtoa +* Fix compilation issues with SDL version of tinydisplay (#1708) +* bam2egg: Fix issue when having more than two tags (#1725) +* Fix "Detected leak for ... which interrogate cannot delete." error (#1743) +* Fix PythonCallbackObject crash upon destruction in some cases +* PStats: Fix crash when receiving frames out of order +* PandaFramework::close_framework() now clears task manager of tasks + ----------------------- RELEASE 1.10.15 ----------------------- This release adds support for Python 3.13, and fixes some significant bugs. From 975a9fb484f56db32ba13ca4770939cee0388fd2 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 22 Dec 2025 12:41:34 +0100 Subject: [PATCH 27/28] egg: Add limited forward compatibility for ORM textures Mainly intended to be able to passthrough 1.11 egg files safely --- doc/ReleaseNotes | 1 + panda/src/egg/eggTexture.cxx | 23 +++++++++++++++++++++++ panda/src/egg/eggTexture.h | 5 +++++ panda/src/egg2pg/eggLoader.cxx | 6 ++++++ 4 files changed, 35 insertions(+) diff --git a/doc/ReleaseNotes b/doc/ReleaseNotes index 6374795a59..a9322f8518 100644 --- a/doc/ReleaseNotes +++ b/doc/ReleaseNotes @@ -10,6 +10,7 @@ This maintenance release fixes some minor defects and stability issues. * Fix linecache error when distributing for newer Python versions * Fix `await AsyncFuture.gather()` returning first item instead of tuple (#1738) * Fix use-after-free in collision system with transform cache disabled (#1733) +* Egg: Add limited forward compatibility for metallic-roughness textures * OpenGL: fix error blitting depth texture on macOS (#1719) * OpenGL: fix SSBO support not being detected in certain situations * X11: Add config variable to enable detection of autorepeat key events (#1735) diff --git a/panda/src/egg/eggTexture.cxx b/panda/src/egg/eggTexture.cxx index 899438276e..4fb9ba1c3e 100644 --- a/panda/src/egg/eggTexture.cxx +++ b/panda/src/egg/eggTexture.cxx @@ -564,6 +564,11 @@ affects_polygon_alpha() const { case ET_selector: return true; + case ET___occlusion: + case ET___occlusion_metallic_roughness: + case ET___metallic_roughness: + return false; + case ET_unspecified: break; } @@ -886,6 +891,15 @@ string_env_type(const string &string) { } else if (cmp_nocase_uh(string, "emission") == 0) { return ET_emission; + } else if (cmp_nocase_uh(string, "occlusion") == 0) { + return ET___occlusion; + + } else if (cmp_nocase_uh(string, "occlusion_metallic_roughness") == 0) { + return ET___occlusion_metallic_roughness; + + } else if (cmp_nocase_uh(string, "metallic_roughness") == 0) { + return ET___metallic_roughness; + } else { return ET_unspecified; } @@ -1319,6 +1333,15 @@ ostream &operator << (ostream &out, EggTexture::EnvType type) { case EggTexture::ET_emission: return out << "emission"; + + case EggTexture::ET___occlusion: + return out << "occlusion"; + + case EggTexture::ET___occlusion_metallic_roughness: + return out << "occlusion_metallic_roughness"; + + case EggTexture::ET___metallic_roughness: + return out << "metallic_roughness"; } nassertr(false, out); diff --git a/panda/src/egg/eggTexture.h b/panda/src/egg/eggTexture.h index 5d602e26f8..6e1b7017fb 100644 --- a/panda/src/egg/eggTexture.h +++ b/panda/src/egg/eggTexture.h @@ -108,6 +108,11 @@ PUBLISHED: ET_selector, ET_normal_gloss, ET_emission, + + // Forward compatibility with Panda 1.11 + ET___occlusion, + ET___occlusion_metallic_roughness, + ET___metallic_roughness, }; enum CombineMode { CM_unspecified, diff --git a/panda/src/egg2pg/eggLoader.cxx b/panda/src/egg2pg/eggLoader.cxx index b1beac16d9..c0d9a7fa55 100644 --- a/panda/src/egg2pg/eggLoader.cxx +++ b/panda/src/egg2pg/eggLoader.cxx @@ -876,6 +876,10 @@ load_textures() { */ bool EggLoader:: load_texture(TextureDef &def, EggTexture *egg_tex) { + if (egg_tex->get_env_type() == EggTexture::ET___occlusion) { + return false; + } + // Check to see if we should reduce the number of channels in the texture. int wanted_channels = 0; bool wanted_alpha = false; @@ -1533,6 +1537,8 @@ make_texture_stage(const EggTexture *egg_tex) { break; case EggTexture::ET_selector: + case EggTexture::ET___metallic_roughness: + case EggTexture::ET___occlusion_metallic_roughness: stage->set_mode(TextureStage::M_selector); break; From 64b98ea81371e230907f10c19a9ea3e7f3d75535 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 22 Dec 2025 12:43:21 +0100 Subject: [PATCH 28/28] GLSL: Add p3d_MetallicRoughnessTexture input mapped to M_metallic_roughness This new M_metallic_roughness enum value is just an alias of M_selector --- doc/ReleaseNotes | 1 + panda/src/glstuff/glShaderContext_src.cxx | 3 ++- panda/src/gobj/textureStage.h | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/ReleaseNotes b/doc/ReleaseNotes index a9322f8518..5942c69e8c 100644 --- a/doc/ReleaseNotes +++ b/doc/ReleaseNotes @@ -13,6 +13,7 @@ This maintenance release fixes some minor defects and stability issues. * Egg: Add limited forward compatibility for metallic-roughness textures * OpenGL: fix error blitting depth texture on macOS (#1719) * OpenGL: fix SSBO support not being detected in certain situations +* GLSL: Add p3d_MetallicRoughnessTexture input mapped to M_metallic_roughness * X11: Add config variable to enable detection of autorepeat key events (#1735) * GUI: Fix bug with PGSliderBar dragging (#1722) * Minor thread safety things for free-threaded Python builds diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 1de385095f..6a65fb1f8d 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -1015,7 +1015,8 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { else if (noprefix.compare(7, string::npos, "Height") == 0) { bind._part = Shader::STO_stage_height_i; } - else if (noprefix.compare(7, string::npos, "Selector") == 0) { + else if (noprefix.compare(7, string::npos, "MetallicRoughness") == 0 || + noprefix.compare(7, string::npos, "Selector") == 0) { bind._part = Shader::STO_stage_selector_i; } else if (noprefix.compare(7, string::npos, "Gloss") == 0) { diff --git a/panda/src/gobj/textureStage.h b/panda/src/gobj/textureStage.h index ebbd1ab1a2..ce15745457 100644 --- a/panda/src/gobj/textureStage.h +++ b/panda/src/gobj/textureStage.h @@ -65,6 +65,9 @@ PUBLISHED: M_normal_gloss, M_emission, + + // Forward compatibility alias. + M_metallic_roughness = M_selector, }; enum CombineMode {