fixed backface culling bug,
todo: connect headligh
This commit is contained in:
@@ -51,7 +51,7 @@ void GeometryEngine::clearData()
|
||||
m_drawList.clear();
|
||||
}
|
||||
|
||||
void GeometryEngine::drawGeometry(QOpenGLShaderProgram *program, bool wireframe)
|
||||
void GeometryEngine::drawGeometry(QOpenGLShaderProgram *program)
|
||||
{
|
||||
if (!m_arrayBuf.isCreated() || !m_indexBuf.isCreated())
|
||||
return;
|
||||
@@ -133,12 +133,8 @@ void GeometryEngine::drawGeometry(QOpenGLShaderProgram *program, bool wireframe)
|
||||
program->setUniformValue("materialSpecularColor", specularColor);
|
||||
|
||||
// Draw cube geometry using indices from VBO 1
|
||||
if (wireframe)
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
|
||||
glDrawElements(GL_TRIANGLES, it.size, GL_UNSIGNED_INT, (void*)(it.offset * sizeof(GLuint)));
|
||||
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user