aboutsummaryrefslogtreecommitdiff
path: root/src/shader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader.cpp')
-rw-r--r--src/shader.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shader.cpp b/src/shader.cpp
index 58042e651..19b8d7c9d 100644
--- a/src/shader.cpp
+++ b/src/shader.cpp
@@ -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