fixed wireframe bug
This commit is contained in:
parent
47c73ed881
commit
91b3f25dbb
|
@ -195,7 +195,12 @@ void GeometryEngine::drawGeometry(QOpenGLShaderProgram *program, bool wireframe)
|
||||||
program->setUniformValue("b_transparent", tmp_transparent);
|
program->setUniformValue("b_transparent", tmp_transparent);
|
||||||
|
|
||||||
// Draw cube geometry using indices from VBO 1
|
// 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue