mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix many formspec menu bugs
This commit is contained in:
parent
7e73b7cae9
commit
88d43af276
13 changed files with 377 additions and 116 deletions
|
@ -362,7 +362,7 @@ ShaderInfo generate_shader(std::string name, IrrlichtDevice *device,
|
|||
Load shader programs
|
||||
*/
|
||||
void load_shaders(std::string name, SourceShaderCache *sourcecache,
|
||||
video::E_DRIVER_TYPE drivertype, s32 enable_shaders,
|
||||
video::E_DRIVER_TYPE drivertype, bool enable_shaders,
|
||||
std::string &vertex_program, std::string &pixel_program,
|
||||
std::string &geometry_program, bool &is_highlevel);
|
||||
|
||||
|
@ -625,8 +625,8 @@ ShaderInfo generate_shader(std::string name, IrrlichtDevice *device,
|
|||
}
|
||||
|
||||
// 0 = off, 1 = assembly shaders only, 2 = highlevel or assembly
|
||||
s32 enable_shaders = g_settings->getS32("enable_shaders");
|
||||
if(enable_shaders <= 0)
|
||||
bool enable_shaders = g_settings->getBool("enable_shaders");
|
||||
if(!enable_shaders)
|
||||
return shaderinfo;
|
||||
|
||||
video::IVideoDriver* driver = device->getVideoDriver();
|
||||
|
@ -748,7 +748,7 @@ ShaderInfo generate_shader(std::string name, IrrlichtDevice *device,
|
|||
}
|
||||
|
||||
void load_shaders(std::string name, SourceShaderCache *sourcecache,
|
||||
video::E_DRIVER_TYPE drivertype, s32 enable_shaders,
|
||||
video::E_DRIVER_TYPE drivertype, bool enable_shaders,
|
||||
std::string &vertex_program, std::string &pixel_program,
|
||||
std::string &geometry_program, bool &is_highlevel)
|
||||
{
|
||||
|
@ -757,7 +757,7 @@ void load_shaders(std::string name, SourceShaderCache *sourcecache,
|
|||
geometry_program = "";
|
||||
is_highlevel = false;
|
||||
|
||||
if(enable_shaders >= 2){
|
||||
if(enable_shaders){
|
||||
// Look for high level shaders
|
||||
if(drivertype == video::EDT_DIRECT3D9){
|
||||
// Direct3D 9: HLSL
|
||||
|
@ -778,7 +778,7 @@ void load_shaders(std::string name, SourceShaderCache *sourcecache,
|
|||
}
|
||||
}
|
||||
|
||||
if(enable_shaders >= 1){
|
||||
if(enable_shaders){
|
||||
// Look for assembly shaders
|
||||
if(drivertype == video::EDT_DIRECT3D8){
|
||||
// Direct3D 8 assembly shaders
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue