update correct uniforms
This commit is contained in:
parent
b2fdaedf70
commit
0d70153bf9
@ -343,9 +343,9 @@ void Viewer::renderMaterial(const WFObj::Material & m)
|
|||||||
if (m.flags & WFObj::Material::AMBIENT_BIT)
|
if (m.flags & WFObj::Material::AMBIENT_BIT)
|
||||||
glUniform4fv(m_ambient_loc, 4, &m.ambient[0]);
|
glUniform4fv(m_ambient_loc, 4, &m.ambient[0]);
|
||||||
if (m.flags & WFObj::Material::DIFFUSE_BIT)
|
if (m.flags & WFObj::Material::DIFFUSE_BIT)
|
||||||
glUniform4fv(m_diffuse_loc, 4, &m.ambient[0]);
|
glUniform4fv(m_diffuse_loc, 4, &m.diffuse[0]);
|
||||||
if (m.flags & WFObj::Material::SPECULAR_BIT)
|
if (m.flags & WFObj::Material::SPECULAR_BIT)
|
||||||
glUniform4fv(m_specular_loc, 4, &m.ambient[0]);
|
glUniform4fv(m_specular_loc, 4, &m.specular[0]);
|
||||||
if (m.flags & WFObj::Material::TEXTURE_BIT)
|
if (m.flags & WFObj::Material::TEXTURE_BIT)
|
||||||
{
|
{
|
||||||
cerr << "error: textured materials not implemented yet" << endl;
|
cerr << "error: textured materials not implemented yet" << endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user