Painting gizmos: show painted triangles inside modifier meshes

This commit is contained in:
Lukas Matena 2020-10-05 16:27:16 +02:00
parent 8bcdbb7a60
commit b155e58a9d
8 changed files with 42 additions and 6 deletions

View file

@ -5461,6 +5461,20 @@ void GLCanvas3D::_render_objects() const
});
}
// In case a painting gizmo is open, it should render the painted triangles
// before transparent objects are rendered. Otherwise they would not be
// visible when inside modifier meshes etc.
{
const GLGizmosManager& gm = get_gizmos_manager();
GLGizmosManager::EType type = gm.get_current_type();
if (type == GLGizmosManager::FdmSupports
|| type == GLGizmosManager::Seam) {
shader->stop_using();
gm.render_painter_gizmo();
shader->start_using();
}
}
m_volumes.render(GLVolumeCollection::Transparent, false, wxGetApp().plater()->get_camera().get_view_matrix());
shader->stop_using();
}