Code in previous commit was incorrect, no idea why it even compiled for me
This commit is contained in:
parent
476d6eda02
commit
14080e602a
@ -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);
|
||||
}
|
||||
|
@ -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...);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user