From d2d0153bf12e21d4cdf481b724849ce5b3664c80 Mon Sep 17 00:00:00 2001 From: Paolo Cignoni cignoni Date: Tue, 27 Jan 2009 23:15:34 +0000 Subject: [PATCH] added harmless casts to avoid mac opengl errors --- src/meshlabplugins/render_splatting/splatrenderer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/meshlabplugins/render_splatting/splatrenderer.cpp b/src/meshlabplugins/render_splatting/splatrenderer.cpp index 8186d3608..a1b564f43 100644 --- a/src/meshlabplugins/render_splatting/splatrenderer.cpp +++ b/src/meshlabplugins/render_splatting/splatrenderer.cpp @@ -298,14 +298,14 @@ void SplatRendererPlugin::Render(QAction *a, MeshModel &m, RenderMode &rm, QGLWi glLoadIdentity(); mShaders[2].prog.Uniform("viewport",float(mCachedVP[0]),float(mCachedVP[1]),float(mCachedVP[2]),float(mCachedVP[3])); - mShaders[2].prog.Uniform("ColorWeight",0); // this is a texture unit + mShaders[2].prog.Uniform("ColorWeight",0.f); // this is a texture unit glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_RECTANGLE_ARB,mRenderBuffer->texture()); if (mFlags&DEFERRED_SHADING_BIT) { mShaders[2].prog.Uniform("unproj", mCachedProj[10], mCachedProj[14]); - mShaders[2].prog.Uniform("NormalWeight",1); // this is a texture unit + mShaders[2].prog.Uniform("NormalWeight",1.0f); // this is a texture unit glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_RECTANGLE_ARB,mNormalTextureID); GL_TEST_ERR @@ -313,7 +313,7 @@ void SplatRendererPlugin::Render(QAction *a, MeshModel &m, RenderMode &rm, QGLWi if (mFlags&OUTPUT_DEPTH_BIT) { - mShaders[2].prog.Uniform("Depth",2); // this is a texture unit + mShaders[2].prog.Uniform("Depth",2.0f); // this is a texture unit glActiveTexture(GL_TEXTURE2);GL_TEST_ERR glBindTexture(GL_TEXTURE_RECTANGLE_ARB,mDepthTextureID);GL_TEST_ERR GL_TEST_ERR