Add wireframe toggle back

master
Jeremy Hu 2019-02-21 21:49:26 +09:30
parent 8053d3c3fb
commit 4922c669ba
3 changed files with 6 additions and 8 deletions

View File

@ -560,11 +560,11 @@ DocumentWindow::DocumentWindow() :
});
m_viewMenu->addAction(m_resetModelWidgetPosAction);
//m_toggleWireframeAction = new QAction(tr("Toggle Wireframe"), this);
//connect(m_toggleWireframeAction, &QAction::triggered, [=]() {
// m_modelRenderWidget->toggleWireframe();
//});
//m_viewMenu->addAction(m_toggleWireframeAction);
m_toggleWireframeAction = new QAction(tr("Toggle Wireframe"), this);
connect(m_toggleWireframeAction, &QAction::triggered, [=]() {
m_modelRenderWidget->toggleWireframe();
});
m_viewMenu->addAction(m_toggleWireframeAction);
//m_toggleSmoothNormalAction = new QAction(tr("Toggle Smooth Normal"), this);
//connect(m_toggleSmoothNormalAction, &QAction::triggered, [=]() {

View File

@ -147,7 +147,6 @@ MeshLoader::MeshLoader(Outcome &outcome) :
}
// Uncomment out to show wireframes
/*
size_t edgeCount = 0;
for (const auto &face: outcome.triangleAndQuads) {
edgeCount += face.size();
@ -175,7 +174,6 @@ MeshLoader::MeshLoader(Outcome &outcome) :
}
}
}
*/
}
MeshLoader::MeshLoader() :

View File

@ -14,7 +14,7 @@ ModelMeshBinder::ModelMeshBinder() :
m_renderTriangleVertexCount(0),
m_renderEdgeVertexCount(0),
m_newMeshComing(false),
m_showWireframes(true),
m_showWireframes(false),
m_hasTexture(false),
m_texture(nullptr),
m_hasNormalMap(false),