Commit d89db52b authored by Frédéric Larue's avatar Frédéric Larue

Support of floating point double precision added for the management of uniforms in Shaders.

parent d0cb86e7
......@@ -402,6 +402,10 @@ void GPU::Shader::SetUniform( const std::string& name,
case GL_FLOAT_VEC2_ARB: gpuAssert( glUniform2fvARB( u.location, u.size, (GLfloat*) value ) ); break;
case GL_FLOAT_VEC3_ARB: gpuAssert( glUniform3fvARB( u.location, u.size, (GLfloat*) value ) ); break;
case GL_FLOAT_VEC4_ARB: gpuAssert( glUniform4fvARB( u.location, u.size, (GLfloat*) value ) ); break;
case GL_DOUBLE: gpuAssert( glUniform1dv( u.location, u.size, (GLdouble*) value ) ); break;
case GL_DOUBLE_VEC2: gpuAssert( glUniform2dv( u.location, u.size, (GLdouble*) value ) ); break;
case GL_DOUBLE_VEC3: gpuAssert( glUniform3dv( u.location, u.size, (GLdouble*) value ) ); break;
case GL_DOUBLE_VEC4: gpuAssert( glUniform4dv( u.location, u.size, (GLdouble*) value ) ); break;
case GL_INT: gpuAssert( glUniform1ivARB( u.location, u.size, (GLint*) value ) ); break;
case GL_INT_VEC2_ARB: gpuAssert( glUniform2ivARB( u.location, u.size, (GLint*) value ) ); break;
case GL_INT_VEC3_ARB: gpuAssert( glUniform3ivARB( u.location, u.size, (GLint*) value ) ); break;
......@@ -413,6 +417,9 @@ void GPU::Shader::SetUniform( const std::string& name,
case GL_FLOAT_MAT2_ARB: gpuAssert( glUniformMatrix2fvARB( u.location, u.size, GL_FALSE, (GLfloat*) value ) ); break;
case GL_FLOAT_MAT3_ARB: gpuAssert( glUniformMatrix3fvARB( u.location, u.size, GL_FALSE, (GLfloat*) value ) ); break;
case GL_FLOAT_MAT4_ARB: gpuAssert( glUniformMatrix4fvARB( u.location, u.size, GL_FALSE, (GLfloat*) value ) ); break;
case GL_DOUBLE_MAT2: gpuAssert( glUniformMatrix2dv( u.location, u.size, GL_FALSE, (GLdouble*) value ) ); break;
case GL_DOUBLE_MAT3: gpuAssert( glUniformMatrix3dv( u.location, u.size, GL_FALSE, (GLdouble*) value ) ); break;
case GL_DOUBLE_MAT4: gpuAssert( glUniformMatrix4dv( u.location, u.size, GL_FALSE, (GLdouble*) value ) ); break;
}
gpuAssert( glUseProgramObjectARB( activeProgBackup ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment