From 59f1c349fcf580b57c3e1a2d42d149b40746a5b5 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Tue, 25 Oct 2022 08:25:31 +0200 Subject: [PATCH] Measuring - Gizmo measure - Show dimensioning while the user pans/rotates the 3D view --- src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp b/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp index 86fa9ff5c3..0e9b33b26b 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp @@ -438,9 +438,9 @@ void GLGizmoMeasure::on_render() render_debug_dialog(); #endif // ENABLE_MEASURE_GIZMO_DEBUG - // do not render if the user is panning/rotating the 3d scene - if (m_parent.is_mouse_dragging()) - return; +// // do not render if the user is panning/rotating the 3d scene +// if (m_parent.is_mouse_dragging()) +// return; const Selection& selection = m_parent.get_selection(); @@ -610,6 +610,8 @@ void GLGizmoMeasure::on_render() glsafe(::glClear(GL_DEPTH_BUFFER_BIT)); glsafe(::glEnable(GL_DEPTH_TEST)); + const bool old_cullface = ::glIsEnabled(GL_CULL_FACE); + glsafe(::glDisable(GL_CULL_FACE)); const Transform3d& view_matrix = camera.get_view_matrix(); @@ -795,6 +797,9 @@ void GLGizmoMeasure::on_render() } shader->stop_using(); + + if (old_cullface) + glsafe(::glEnable(GL_CULL_FACE)); } render_dimensioning();