Repository navigation
Troubleshooting BGFX
Some older hardware (generally pre-2016) may encounter issues when launching the game, including the infamous "Null Object Reference" error.
This usually happens because older GPUs either do not properly support the backend or behave unpredictably.
To resolve this, you can manually set or change the LIME_BGFX_PLATFORM environment variable to force a different rendering backend.
BGFX currently supports seven backends:
-
vulkan(default on non-Apple platforms) -
metal(default on Apple platforms) -
opengl(non-Apple platforms only) -
opengles(non-Apple platforms only) -
d3d11(Windows only) -
d3d12(Windows only) software
You can manually select a backend on each platform as follows:
Windows
In Windows, we set a Environment Variable through the System Properties.
So we providing step by step instructions for that:
-
Press
Win + Ror go to the Start menu, typesysdm.cpl, and press Enter to open System Properties. -
In the System Properties window, navigate to the "Advanced" tab and click on the "Environment Variables..." button.,
- In the Environment Variables window, click "New" under "User variables" to create a new variable called
LIME_BGFX_PLATFORMand set its value to one of the backends you want to use (e.g.,d3d11,opengl) and Click to OK button to save.
Linux:
export LIME_BGFX_PLATFORM=(backend)macOS:
launchctl setenv LIME_BGFX_PLATFORM (backend)