1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Dynamic shadows: whitelist the 'opengl3' driver

This commit is contained in:
SmallJoker 2024-11-02 15:52:29 +01:00 committed by sfan5
parent 58dd42166d
commit 87ac32edea
2 changed files with 8 additions and 4 deletions

View file

@ -694,9 +694,13 @@ std::string ShadowRenderer::readShaderFile(const std::string &path)
ShadowRenderer *createShadowRenderer(IrrlichtDevice *device, Client *client)
{
// disable if unsupported
if (g_settings->getBool("enable_dynamic_shadows") &&
device->getVideoDriver()->getDriverType() != video::EDT_OPENGL) {
g_settings->setBool("enable_dynamic_shadows", false);
if (g_settings->getBool("enable_dynamic_shadows")) {
// See also checks in builtin/mainmenu/settings/dlg_settings.lua
const video::E_DRIVER_TYPE type = device->getVideoDriver()->getDriverType();
if (type != video::EDT_OPENGL && type != video::EDT_OPENGL3) {
warningstream << "Shadows: disabled dynamic shadows due to being unsupported" << std::endl;
g_settings->setBool("enable_dynamic_shadows", false);
}
}
if (g_settings->getBool("enable_dynamic_shadows")) {