Apply color to ambient material property, too.

This commit is contained in:
Andrzej Kapolka 2013-10-04 17:04:50 -07:00
parent 5f26177560
commit 325ac73d0a

View file

@ -120,6 +120,7 @@ bool BlendFace::render(float alpha) {
// apply material properties
glm::vec4 diffuse = glm::vec4(mesh.diffuseColor, alpha);
glm::vec4 specular = glm::vec4(mesh.specularColor, alpha);
glMaterialfv(GL_FRONT, GL_AMBIENT, (const float*)&diffuse);
glMaterialfv(GL_FRONT, GL_DIFFUSE, (const float*)&diffuse);
glMaterialfv(GL_FRONT, GL_SPECULAR, (const float*)&specular);
glMaterialf(GL_FRONT, GL_SHININESS, mesh.shininess);