Fixed incorrect fix for linux compilation done by me:

Shader::getInstance<Shader>()->Program
does not compile on some gnu compiler, proper way is:
  Shader::template getInstance<Shader>()->Program
Thanks to auria!
This commit is contained in:
hiker 2014-07-16 16:38:41 +10:00
parent d0784f3fcd
commit a39efe7b3f
2 changed files with 5 additions and 5 deletions

View File

@ -61,7 +61,7 @@ void apply_instance(const T *Shader, const std::tuple<TupleType...> &arg)
template<typename Shader, enum E_VERTEX_TYPE VertexType, typename... TupleType>
void renderMeshes1stPass(const std::vector<GLuint> &TexUnits, std::vector<std::tuple<TupleType...> > &meshes)
{
glUseProgram(Shader::getInstance()->Program);
glUseProgram(Shader::template getInstance<Shader>()->Program);
glBindVertexArray(getVAO(VertexType));
for (unsigned i = 0; i < meshes.size(); i++)
{
@ -80,7 +80,7 @@ void renderMeshes1stPass(const std::vector<GLuint> &TexUnits, std::vector<std::t
#endif
continue;
}
apply_instance(Shader::getInstance(), meshes[i]);
apply_instance(Shader::template getInstance<Shader>(), meshes[i]);
}
}
@ -120,7 +120,7 @@ void IrrDriver::renderSolidFirstPass()
template<typename Shader, enum E_VERTEX_TYPE VertexType, typename... TupleType>
void renderMeshes2ndPass(const std::vector<GLuint> &TexUnits, std::vector<std::tuple<TupleType...> > &meshes)
{
glUseProgram(Shader::getInstance()->Program);
glUseProgram(Shader::template getInstance<Shader>()->Program);
glBindVertexArray(getVAO(VertexType));
for (unsigned i = 0; i < meshes.size(); i++)
{
@ -150,7 +150,7 @@ void renderMeshes2ndPass(const std::vector<GLuint> &TexUnits, std::vector<std::t
#endif
continue;
}
apply_instance(Shader::getInstance(), meshes[i]);
apply_instance(Shader::template getInstance<Shader>(), meshes[i]);
}
}

View File

@ -225,7 +225,7 @@ void STKMeshSceneNode::render()
glDisable(GL_CULL_FACE);
if (update_each_frame)
updatevbo();
glUseProgram(MeshShader::ObjectPass1Shader::getInstance()->Program);
glUseProgram(MeshShader::ObjectPass1Shader::template getInstance<MeshShader::ObjectPass1Shader>()->Program);
// Only untextured
for (unsigned i = 0; i < GLmeshes.size(); i++)
{