mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
ENH: wireframe: refine the rendering logic under paint
1. remove wireframe in 3d view, only keep in paint; 2. pass barycentric_coordinates from outside 3. add shortcut hints Change-Id: I911e5cdf3475926d9527dc0839fdce072ed54746 (cherry picked from commit 6e16d0ccfb71741e55daabd757be9f9e7613e695)
This commit is contained in:
parent
79b5c94f4f
commit
a9a228d071
9 changed files with 137 additions and 39 deletions
|
@ -731,8 +731,8 @@ bool GLCanvas3D::init()
|
|||
Bed3D::load_render_colors();
|
||||
#endif
|
||||
|
||||
if (wxGetApp().is_gl_version_greater_or_equal_to(3, 0))
|
||||
wxGetApp().plater()->enable_wireframe(true);
|
||||
//if (!wxGetApp().is_gl_version_greater_or_equal_to(3, 0))
|
||||
// wxGetApp().plater()->enable_wireframe(false);
|
||||
m_initialized = true;
|
||||
|
||||
return true;
|
||||
|
@ -5762,12 +5762,12 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type, bool with
|
|||
// GLGizmosManager::EType type = gm.get_current_type();
|
||||
if (dynamic_cast<GLGizmoPainterBase*>(gm.get_current()) == nullptr)
|
||||
{
|
||||
if (wxGetApp().plater()->is_wireframe_enabled()) {
|
||||
/*if (wxGetApp().plater()->is_wireframe_enabled()) {
|
||||
if (wxGetApp().plater()->is_show_wireframe())
|
||||
shader->set_uniform("show_wireframe", true);
|
||||
else
|
||||
shader->set_uniform("show_wireframe", false);
|
||||
}
|
||||
}*/
|
||||
//BBS:add assemble view related logic
|
||||
// do not cull backfaces to show broken geometry, if any
|
||||
m_volumes.render(type, m_picking_enabled, wxGetApp().plater()->get_camera().get_view_matrix(), [this, canvas_type](const GLVolume& volume) {
|
||||
|
@ -5795,12 +5795,12 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type, bool with
|
|||
}
|
||||
case GLVolumeCollection::ERenderType::Transparent:
|
||||
{
|
||||
if (wxGetApp().plater()->is_wireframe_enabled()) {
|
||||
/*if (wxGetApp().plater()->is_wireframe_enabled()) {
|
||||
if (wxGetApp().plater()->is_show_wireframe())
|
||||
shader->set_uniform("show_wireframe", true);
|
||||
else
|
||||
shader->set_uniform("show_wireframe", false);
|
||||
}
|
||||
}*/
|
||||
//BBS:add assemble view related logic
|
||||
m_volumes.render(type, false, wxGetApp().plater()->get_camera().get_view_matrix(), [this, canvas_type](const GLVolume& volume) {
|
||||
if (canvas_type == ECanvasType::CanvasAssembleView) {
|
||||
|
@ -5820,9 +5820,9 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type, bool with
|
|||
}
|
||||
}
|
||||
|
||||
if (wxGetApp().plater()->is_wireframe_enabled()) {
|
||||
/*if (wxGetApp().plater()->is_wireframe_enabled()) {
|
||||
shader->set_uniform("show_wireframe", false);
|
||||
}
|
||||
}*/
|
||||
|
||||
shader->stop_using();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue