added harmless casts to avoid mac opengl errors

This commit is contained in:
Paolo Cignoni cignoni 2009-01-27 23:15:34 +00:00
parent 664747a3fb
commit d2d0153bf1

View File

@ -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