glUniform4fv() wants a count of 1 for a vec4 update

This commit is contained in:
Josh Holtrop committed 2011-05-05 13:45:20 -04:00
1 parent 0d70153bf9
commit 2e2b8225be
1 file changed
+3 -3
+3 -3
View File
@@ -341,11 +341,11 @@ void Viewer::renderMaterial(const WFObj::Material & m)
if (m.flags & WFObj::Material::SHININESS_BIT)
glUniform1f(m_shininess_loc, m.shininess);
if (m.flags & WFObj::Material::AMBIENT_BIT)
glUniform4fv(m_ambient_loc, 4, &m.ambient[0]);
glUniform4fv(m_ambient_loc, 1, &m.ambient[0]);
if (m.flags & WFObj::Material::DIFFUSE_BIT)
glUniform4fv(m_diffuse_loc, 4, &m.diffuse[0]);
glUniform4fv(m_diffuse_loc, 1, &m.diffuse[0]);
if (m.flags & WFObj::Material::SPECULAR_BIT)
glUniform4fv(m_specular_loc, 4, &m.specular[0]);
glUniform4fv(m_specular_loc, 1, &m.specular[0]);
if (m.flags & WFObj::Material::TEXTURE_BIT)
{
cerr << "error: textured materials not implemented yet" << endl;