Happy holidays everyone! I am excited to present to you the new 1.10.8 release of Panda3D. Consider it a belated Christmas present, if you will. This is another maintenance release, fixing a number of issues and shortcomings, and upgrading is highly recommended. In the meantime, work on the next major 1.11 release is also progressing well, and we will soon share some exciting updates about the ongoing work.
Head over to the download page to upgrade right away, or keep on reading to learn what’s new.
macOS 11 and Apple silicon
Since our last release, Apple has released the new version of their operating system, codenamed “Big Sur”. This release caused some issues with the Panda3D SDK installation, which have now been resolved. “Big Sur” also adds support for the arm64 architecture, used by Apple’s new M1 processor. While existing x86-64 programs continue to be able to run on the new Apple hardware via emulation, better performance can be achieved if the applications are compiled for the arm64 architecture. Since we already supported building for arm64 on other platforms (such as Android and Raspberry Pi), it was not hard for us to extend this support to macOS as well, so is it now possible to build Panda3D 1.10.8 for arm64 on macOS.
There are two caveats, however: the Cg Toolkit and FMOD Ex are not available for arm64, so we are unable to offer support for Cg shaders or the FMOD sound module in the arm64 build. For this reason, arm64 support has not yet been included as part of the official macOS installer. This will be remedied in the 1.11.0 release, when these thirdparty packages will be replaced, and we will be able to offer fully functioning native arm64 builds for macOS at that time. However, if you are feeling adventurous, there is a wheel for Python 3.9.1 including arm64 support available here, albeit without the aforementioned features.
Mode-based texture inputs
As an experimental feature, it is now possible to directly address textures by their TextureStage mode in GLSL shaders. Instead of having to use either named shader inputs to assign textures or needing to refer to textures by their index in the stage sorting order, one can now directly refer to
p3d_TextureNormal, etc. to distinguish different types of texture assignments. These may be declared as arrays to handle multiple textures with the same mode. If no textures with these modes are assigned, Panda3D automatically provides a “fallback” texture containing an appropriate default colour, such as an all-white texture for
p3d_TextureModulate, an all-black texture for
p3d_TextureAdd, and a texture with color
(0.5, 0.5, 1) for
p3d_TextureNormal. This makes it possible to write shaders that handle these textures regardless of whether these textures are present or not.
We would love for you to try this feature and provide your feedback in the discussion forums.
Querying system DPI scaling
A new “display zoom” property has been added to GraphicsPipe. This property can be queried to determine the UI scaling that has been configured in the operating system, in order to scale up interfaces based on the monitor’s pixel density. Applications that use
aspect2d for GUI positioning generally don’t need to worry about this, other than perhaps to choose an appropriate window size, but applications that use pixel-based positioning will want to consider scaling their UI by this factor in order to properly account for monitors with different DPIs, viewing distances, and users with reading difficulties.
A configuration variable called
display-zoom has been added to override the value detected from the operating system. This can be used by developers to simulate running their application on monitors with a different DPI, or to allow a user to override the UI scaling on a per-application basis.
If the operating system is automatically scaling up the application, such as is the case on macOS or on Windows if
dpi-aware false is set, the returned value will simply be
Multithreaded pipeline fixes
The multithreaded rendering pipeline is a feature that the community finds important for the significant performance gains that it can bring to an application. For that reason we are continuing to improve the stability of this system. A memory leak has been fixed that was particularly prevalent with this system active, as well as a crash that could happen when unplugging a device on macOS. There was an issue with text entered into a DirectEntry flickering with the threaded pipeline active that has now also been resolved. The collision traverser now also releases the GIL during operation, increasing the possibility for parallelism as well as avoiding a potential deadlock in certain circumstances.
Some of the other improvements made in this release are listed below.
- Fix error with build_apps not working with certain versions of Python
- Fix sounds resuming on reactivation if stop() was called while inactive (#559)
- Fix crash caused by some gamepad drivers on Linux (#1066)
- Skinning-enabled shaders can now properly render unskinned models as well
- BitMask, SparseArray, BitArray types can now be pickled (#886)
- VFSImporter now properly detects source file encodings in Python 3
- Workaround for lighting bug with scenes imported using panda3d-gltf/blend2bam
- Fix compilation error with Bullet 2.90+
- Assimp library was updated in Windows thirdparty packages (#1020)
- libCg is now shipped as library instead of framework on macOS (#1079)
- Fix some erroneous warnings about missing modules in build_apps
- Add warnings to build_apps when forgetting dependencies in requirements.txt
- Add experimental
- Fix ability to use deployment system when compiling without OpenSSL (#1073)
- Fix assorted issues with rgbPanel
- Fix comparison operator of RenderEffects object