mirror of
https://github.com/minetest/minetest.git
synced 2024-12-23 06:32:23 +01:00
Dynamic shadows: whitelist the 'opengl3' driver
This commit is contained in:
parent
58dd42166d
commit
87ac32edea
@ -351,7 +351,7 @@ local function check_requirements(name, requires)
|
|||||||
-- be used, so we show settings for both.
|
-- be used, so we show settings for both.
|
||||||
touchscreen = touch_support and (touch_controls == "auto" or core.is_yes(touch_controls)),
|
touchscreen = touch_support and (touch_controls == "auto" or core.is_yes(touch_controls)),
|
||||||
keyboard_mouse = not touch_support or (touch_controls == "auto" or not core.is_yes(touch_controls)),
|
keyboard_mouse = not touch_support or (touch_controls == "auto" or not core.is_yes(touch_controls)),
|
||||||
opengl = video_driver == "opengl",
|
opengl = (video_driver == "opengl" or video_driver == "opengl3"),
|
||||||
gles = video_driver:sub(1, 5) == "ogles",
|
gles = video_driver:sub(1, 5) == "ogles",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -694,9 +694,13 @@ std::string ShadowRenderer::readShaderFile(const std::string &path)
|
|||||||
ShadowRenderer *createShadowRenderer(IrrlichtDevice *device, Client *client)
|
ShadowRenderer *createShadowRenderer(IrrlichtDevice *device, Client *client)
|
||||||
{
|
{
|
||||||
// disable if unsupported
|
// disable if unsupported
|
||||||
if (g_settings->getBool("enable_dynamic_shadows") &&
|
if (g_settings->getBool("enable_dynamic_shadows")) {
|
||||||
device->getVideoDriver()->getDriverType() != video::EDT_OPENGL) {
|
// See also checks in builtin/mainmenu/settings/dlg_settings.lua
|
||||||
g_settings->setBool("enable_dynamic_shadows", false);
|
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")) {
|
if (g_settings->getBool("enable_dynamic_shadows")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user