diff --git a/modules/gfx/src/impl/fast_spheres.cc b/modules/gfx/src/impl/fast_spheres.cc index 325742d75ce41b465bbebe2391da46f8e346fefe..905791c34a539d691885c10f2ce7a07cf1e20af6 100644 --- a/modules/gfx/src/impl/fast_spheres.cc +++ b/modules/gfx/src/impl/fast_spheres.cc @@ -78,8 +78,8 @@ namespace ost { namespace gfx { namespace impl { Shader::Instance().GetCurrentName()=="hf") { Shader::Instance().Activate("fast_sphere_hf"); GLuint cpr=Shader::Instance().GetCurrentProgram(); - GLuint loc=glGetUniformLocation(cpr,"hemi_param"); - if(loc>0) { + GLint loc=glGetUniformLocation(cpr,"hemi_param"); + if(loc>=0) { geom::Vec4 hp=Scene::Instance().GetHemiParams(); glUniform4f(loc,hp[0],hp[1],hp[2],hp[3]); } diff --git a/modules/gfx/src/scene.cc b/modules/gfx/src/scene.cc index dc2183f27b1cd066266a81893c6af05aaee284ec..5c96c47ad84bdbd9cc1198c0531f4669567e2a9a 100644 --- a/modules/gfx/src/scene.cc +++ b/modules/gfx/src/scene.cc @@ -846,8 +846,8 @@ void Scene::RenderGL() #if OST_SHADER_SUPPORT_ENABLED { GLuint cpr=Shader::Instance().GetCurrentProgram(); - GLuint loc=glGetUniformLocation(cpr,"hemi_param"); - if(loc>0) { + GLint loc=glGetUniformLocation(cpr,"hemi_param"); + if(loc>=0) { glUniform4f(loc,hemi_param_[0],hemi_param_[1],hemi_param_[2],hemi_param_[3]); } }