It’s a new year and a new release for Panda3D! Version 1.10.0 is one of our most ambitious releases to date and brings with it many enhancements, features, bugfixes, and various other improvements. Let’s jump right in, shall we?

Rebranding

You may have noticed our first change before even downloading the SDK: We now have a completely new look! We have given the website a complete overhaul and have streamlined the process of downloading the latest SDK. We hope you like it, and we look forward to meeting some of the newcomers who will be joining our community in the near future!

Python 3 support

With Python 2 due to sunset next year, Panda3D has used this release cycle to modernize its Python support code. Not only does Panda3D now support the user’s choice of either Python 2 or 3, but also includes coroutine support for those using Python 3.5 and up! Coroutines are defined with async def and can be added to the TaskManager just like any other task. Asynchronous operations can be performed with await op() , which will cause the TaskManager to run other tasks until the operation completes, keeping frame rates up without requiring awkward callbacks. This combines the programmer convenience of writing simple functions with the smooth performance of asynchronous operations!

Gamepad/joystick support

This release brings first-class support for reading joystick/gamepad controller input on Windows, Linux, and macOS. Those already familiar with Panda3D’s keyboard/mouse input API should feel right at home with the new gamepad/joystick support, which detects already-present and hotplugged gamepad devices, and even allows assigning a unique prefix to each device’s input events in order to distinguish between multiple gamepads connected at once. What’s more, the new code has all the basics for implementing motion tracker and VR support in a future release. We can’t wait to see what kinds of new multiplayer “living room” style games people create!

Android port

The new release has made significant strides towards bringing the Android port to the level of quality one should expect of a Panda port. It’s now even possible to compile Panda3D on your Android machine, and there is even a third-party development environment available on the Play Store for developing Python games on your Android device. The major shortcoming as of yet is that there is no easy deployment pipeline yet to deploy your games for Android, so that will be a major priority going forward.

Shaders

Shaders are an essential part in achieving more advanced graphics with Panda3D than the fixed-function pipeline offers. So, of course we’ve devoted a lot of attention to improving the shaders in Panda3D. The shader generator, which makes it easy to use advanced effects without having to write shader, has received a significant overhaul. This overhaul dramatically improves its runtime performance, removes frame chugs, and makes it more reliable. Not only that, but it now supports additional features, including point light shadows and reoriented normal mapping.

For those creating their own shaders, we’ve brought many improvements as well, such as a GLSL preprocessor (allowing the use of #include instructions) and the availability of many more built-in inputs for custom shaders.Improving the shader system even further will be a major priority for the next major release of Panda3D, in which we plan to bring a brand new physically-based rendering shader to the engine core, and make it easier to write shaders that target a wide variety of platforms.

OpenGL improvements

There are too many improvements to the OpenGL renderer to name, but perhaps the most exciting is the ability to explicitly request an OpenGL Core Profile.

What is an OpenGL Core Profile? With OpenGL 3.2, Khronos removed many of the older features that had long since been deprecated (such as the fixed function pipeline), to allow driver developers to focus on the more modern graphics techniques without needing to worry about compatibility with older, deprecated functionality. While the newer features are fully capable of superseding the older methods, this does mean losing compatibility with older OpenGL applications. So, OpenGL 3.2 solved this problem by allowing applications to request either a “Core Profile” or a “Compatibility Profile,” where the former allows use of the latest and greatest functionality, and the latter ensures that applications written for OpenGL versions as old as 1.0 continue to function. The OpenGL driver provides the Compatibility Profile, unless the application specifically asks for a Core Profile, thereby indicating its willingness to operate without a fixed-function pipeline and many other legacy features.

Panda3D is able to make use of either profile, but users can now specifically request a Core Profile through use of the gl-version .prc configuration variable, granting full access to the latest extensions and functionality supported by the system OpenGL driver. Note, however, that doing this opts out of fixed-function pipeline support, and it is the user’s responsibility to provide suitable shaders.

Deployment system

One of Panda3D’s major strengths is how easy it is to use, and for this we also need to make it possible to deploy your application effortlessly to any supported platform. In order to ensure that we can keep up this promise, we’ve rebuilt our deployment system from the ground up for the new release. The new system is built around the existing Python packaging ecosystem, leveraging popular Python packaging tools like setuptools and pip in order to make it easy to build your application into an executable, regardless of which Python version it needs or which external libraries it pulls in.

HarfBuzz text shaping

For many users, making applications accessible to speakers of non-Latin-alphabet languages is of utmost importance. Many of these languages do not follow the basic left-to-right writing rules to which the English-speaking world is most accustomed. Many of these languages, in fact, don’t even use an alphabet! Some of them use one glyph per word, while others use characters made up of overlapping glyphs that must be built up as a series of Unicode codepoints.

To support this, Panda3D now includes support for the HarfBuzz text shaping library, which works in concert with FreeType to lay out and rework the text. HarfBuzz also improves English text, by replacing certain letter pairs with ligatures to improve readability.

Combined with Python 3’s unicode-by-default representation of text, supporting international languages in Panda3D is now something that “just works” without any additional developer attention required.

.flac and .opus support

Panda3D 1.9.0 added non-LGPL support for loading .wav and OGG/Vorbis audio files, for those that don’t wish to rely on the LGPL-licensed FFmpeg to load sound assets. Panda3D 1.10.0 goes a step further by adding support for loading .opus files (via libopus) and .flac files (through built-in code). Sounds like good news for those who prefer the open Xiph.Org audio formats!

General cleanup

This isn’t as interesting in a blog post, but we’ve done a lot of work in the codebase as well to keep everything clean, tidy, and free of bloat. This kind of work helps us work more quickly, attract the attention of other developers, and keep the project as bug-free as possible. A few things which we’ve done since the 1.9.0 release are:

Added an automated test suite, which will help catch bugs earlier in the development cycle and make Panda3D more stable overall by preventing regressions from sneaking in.

Removed several files which haven’t been used in years. Less code means less maintenance!

The Python support code has been completely removed from libpanda.dll and is fully self-contained within the .pyd extensions themselves.

Panda headers no longer contain using namespace std;

Many other various stylistic improvements and fixes!

We’ve only just scratched the surface of all of the new goodies this release brings. Want to hear more? Go read the release notes! Want to get started? Head on over to our new download page and try out v1.10.0 for yourself!