Commit 0f5dfb05 by Philipp Adolf

Draw regular triangles in blue

parent 55d42e89
......@@ -454,7 +454,11 @@ void Mesh::renderMesh(QOpenGLShaderProgram *shader, int index, int subdivision,
if (MaterialIndex < materials.size()) {
// qDebug()<<materials[MaterialIndex].Diffuse<<materials[MaterialIndex].Specular<<materials[MaterialIndex].Shininess<<materials[MaterialIndex].hasTexture;
shader->setUniformValue("materialInfo.Diffuse",materials[MaterialIndex].Diffuse);
if (regular) {
shader->setUniformValue("materialInfo.Diffuse", QVector3D(0.0f, 0.0f, 1.0f));
} else {
shader->setUniformValue("materialInfo.Diffuse", materials[MaterialIndex].Diffuse);
}
shader->setUniformValue("materialInfo.Specular",materials[MaterialIndex].Specular);
shader->setUniformValue("materialInfo.Shininess",materials[MaterialIndex].Shininess);
shader->setUniformValue("materialInfo.hasTexture",materials[MaterialIndex].hasTexture);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment