ENH: Revert "remove the sinking logic"

This reverts commit 17dded5d4aa54a330174788f3d6fbd583f63f8e1.

Change-Id: I51816d8357076a07c500a1bd006b08c15d7467e6
This commit is contained in:
chunmao.guo 2023-03-10 14:07:18 +08:00 committed by Lane.Wei
parent 00a815e507
commit 0ce72dfcb7
2 changed files with 15 additions and 29 deletions

View file

@ -1272,14 +1272,13 @@ void GLVolumeCollection::render(GLVolumeCollection::ERenderType type, bool disab
#endif // ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
// render sinking contours of non-hovered volumes
//BBS: remove sinking logic
/*if (m_show_sinking_contours)
if (m_show_sinking_contours)
if (volume.first->is_sinking() && !volume.first->is_below_printbed() &&
volume.first->hover == GLVolume::HS_None && !volume.first->force_sinking_contours) {
shader->stop_using();
volume.first->render_sinking_contours();
shader->start_using();
}*/
}
glsafe(::glEnableClientState(GL_VERTEX_ARRAY));
glsafe(::glEnableClientState(GL_NORMAL_ARRAY));
@ -1335,8 +1334,7 @@ void GLVolumeCollection::render(GLVolumeCollection::ERenderType type, bool disab
glsafe(::glDisableClientState(GL_NORMAL_ARRAY));
}
//BBS: remove sinking logic
/*if (m_show_sinking_contours) {
if (m_show_sinking_contours) {
for (GLVolumeWithIdAndZ& volume : to_render) {
// render sinking contours of hovered/displaced volumes
if (volume.first->is_sinking() && !volume.first->is_below_printbed() &&
@ -1348,7 +1346,7 @@ void GLVolumeCollection::render(GLVolumeCollection::ERenderType type, bool disab
shader->start_using();
}
}
}*/
}
if (disable_cullface)
glsafe(::glEnable(GL_CULL_FACE));