aboutsummaryrefslogtreecommitdiff
path: root/src/shader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader.cpp')
-rw-r--r--src/shader.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shader.cpp b/src/shader.cpp
index 8c572ed49..8a5fd417b 100644
--- a/src/shader.cpp
+++ b/src/shader.cpp
@@ -196,7 +196,7 @@ public:
virtual void OnSetConstants(video::IMaterialRendererServices *services, s32 userData)
{
video::IVideoDriver *driver = services->getVideoDriver();
- assert(driver);
+ sanity_check(driver != NULL);
bool is_highlevel = userData;
@@ -219,7 +219,7 @@ public:
bool is_highlevel)
{
video::IVideoDriver *driver = services->getVideoDriver();
- assert(driver);
+ sanity_check(driver);
// set inverted world matrix
core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD);
@@ -364,7 +364,7 @@ void load_shaders(std::string name, SourceShaderCache *sourcecache,
ShaderSource::ShaderSource(IrrlichtDevice *device):
m_device(device)
{
- assert(m_device);
+ assert(m_device); // Pre-condition
m_shader_callback = new ShaderCallback(this, "default");
@@ -505,7 +505,7 @@ void ShaderSource::insertSourceShader(const std::string &name_of_shader,
"name_of_shader=\""<<name_of_shader<<"\", "
"filename=\""<<filename<<"\""<<std::endl;*/
- assert(get_current_thread_id() == m_main_thread);
+ sanity_check(get_current_thread_id() == m_main_thread);
m_sourcecache.insert(name_of_shader, filename, program, true);
}
@@ -578,7 +578,7 @@ ShaderInfo generate_shader(std::string name, u8 material_type, u8 drawtype,
return shaderinfo;
video::IVideoDriver* driver = device->getVideoDriver();
- assert(driver);
+ sanity_check(driver);
video::IGPUProgrammingServices *gpu = driver->getGPUProgrammingServices();
if(!gpu){