more information for the InfoWindow,
set correct values for cloth material, enable specular map
This commit is contained in:
@@ -177,6 +177,7 @@ void GeometryEngine::drawGeometry(QOpenGLShaderProgram *program, bool wireframe)
|
||||
for (auto& it : m_drawList)
|
||||
{
|
||||
bool tmp_transparent(false);
|
||||
bool tmp_specular(false);
|
||||
float shininess;
|
||||
QVector3D specularColor;
|
||||
|
||||
@@ -185,6 +186,7 @@ void GeometryEngine::drawGeometry(QOpenGLShaderProgram *program, bool wireframe)
|
||||
{
|
||||
m_materials->at(it.textureIndex).texture->bind();
|
||||
tmp_transparent = m_materials->at(it.textureIndex).transparent;
|
||||
tmp_specular = m_materials->at(it.textureIndex).flags[7];
|
||||
shininess = m_materials->at(it.textureIndex).shininess;
|
||||
specularColor = m_materials->at(it.textureIndex).specularColor.toVector3D();
|
||||
}
|
||||
@@ -199,8 +201,9 @@ void GeometryEngine::drawGeometry(QOpenGLShaderProgram *program, bool wireframe)
|
||||
// Set normal matrix
|
||||
program->setUniformValue("n_matrix", (normMatrix * it.modelMatrix).normalMatrix());
|
||||
|
||||
// decide if this is transparent
|
||||
// set some more values
|
||||
program->setUniformValue("b_transparent", tmp_transparent);
|
||||
program->setUniformValue("b_specular", tmp_specular);
|
||||
|
||||
// set some material attributes
|
||||
program->setUniformValue("materialShininess", shininess);
|
||||
|
||||
Reference in New Issue
Block a user