Try to fix linux compilation.

This commit is contained in:
hiker 2015-05-17 00:56:42 +10:00
parent 1a09a09dd9
commit f0f230b042
2 changed files with 6 additions and 1 deletions

View File

@ -94,6 +94,11 @@ public:
// ------------------------------------------------------------------------
/** Activates the shader calling glUseProgram. */
void use() { glUseProgram(m_program); }
// ------------------------------------------------------------------------
GLuint getUniformLocation(const char *name)
{
return glGetUniformLocation(m_program, name);
} // getUniformLocation
}; // ShaderBase
// ============================================================================

View File

@ -122,7 +122,7 @@ private:
assert(sampler_type >= ST_MIN && sampler_type <= ST_MAX);
m_texture_type.push_back(m_all_texture_types[sampler_type]);
GLuint location = glGetUniformLocation(m_program, name);
GLuint location = getUniformLocation(name);
m_texture_location.push_back(location);
glUniform1i(location, tex_unit);
m_texture_units.push_back(tex_unit);