Code in previous commit was incorrect, no idea why it even compiled for me

This commit is contained in:
Marianne Gagnon 2014-07-20 18:18:35 -04:00
parent 476d6eda02
commit 14080e602a
2 changed files with 6 additions and 7 deletions

View File

@ -28,7 +28,7 @@
using namespace video;
GLuint UniformHelper::getUniformLocation(GLuint program, const char* name)
GLuint getUniformLocation(GLuint program, const char* name)
{
return glGetUniformLocation(program, name);
}

View File

@ -56,8 +56,6 @@ void glUniform1fWrapper(GLuint, float);
struct UniformHelper
{
GLuint getUniformLocation(GLuint program, const char* name);
template<unsigned N = 0>
static void setUniformsHelper(const std::vector<GLuint> &uniforms)
{
@ -105,6 +103,7 @@ struct UniformHelper
};
void bypassUBO(GLuint Program);
GLuint getUniformLocation(GLuint program, const char* name);
template<typename... Args>
class ShaderHelper
@ -114,13 +113,13 @@ protected:
void AssignUniforms(const char* name)
{
uniforms.push_back(UniformHelper::getUniformLocation(Program, name));
uniforms.push_back(getUniformLocation(Program, name));
}
template<typename... T>
void AssignUniforms(const char* name, T... rest)
{
uniforms.push_back(UniformHelper::getUniformLocation(Program, name));
uniforms.push_back(getUniformLocation(Program, name));
AssignUniforms(rest...);
}
@ -143,13 +142,13 @@ protected:
void AssignUniforms(const char* name)
{
uniforms.push_back(UniformHelper::getUniformLocation(Program, name));
uniforms.push_back(getUniformLocation(Program, name));
}
template<typename... U>
void AssignUniforms(const char* name, U... rest)
{
uniforms.push_back(UniformHelper::getUniformLocation(Program, name));
uniforms.push_back(getUniformLocation(Program, name));
AssignUniforms(rest...);
}