mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-10-31 15:35:21 +01:00 
			
		
		
		
	Dynamic shadows: whitelist the 'opengl3' driver
This commit is contained in:
		| @@ -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")) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user