Commit 91b3f25d authored by Anakin's avatar Anakin

fixed wireframe bug

parent 47c73ed8
......@@ -195,7 +195,12 @@ void GeometryEngine::drawGeometry(QOpenGLShaderProgram *program, bool wireframe)
program->setUniformValue("b_transparent", tmp_transparent);
// Draw cube geometry using indices from VBO 1
glDrawElements(wireframe? GL_LINES : GL_TRIANGLES, it.size, GL_UNSIGNED_INT, (void*)(it.offset * sizeof(GLuint)));
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);
}
}
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