diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 40362ac87..0bb1df25d 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -507,6 +507,7 @@ void GLCanvas3D::Bed::_render_prusa(float theta) const if (triangles_vcount > 0) { ::glEnable(GL_DEPTH_TEST); + ::glDepthMask(GL_FALSE); ::glEnable(GL_BLEND); ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -535,6 +536,7 @@ void GLCanvas3D::Bed::_render_prusa(float theta) const ::glDisable(GL_TEXTURE_2D); ::glDisable(GL_BLEND); + ::glDepthMask(GL_TRUE); } } @@ -2357,7 +2359,6 @@ void GLCanvas3D::render() // draw scene _render_background(); - _render_current_gizmo(); if (is_custom_bed) // untextured bed needs to be rendered before objects { @@ -2373,6 +2374,7 @@ void GLCanvas3D::render() _render_bed(theta); } + _render_current_gizmo(); _render_cutting_plane(); // draw overlays diff --git a/xs/src/slic3r/GUI/GLGizmo.cpp b/xs/src/slic3r/GUI/GLGizmo.cpp index 0ff5909a0..212bf51a9 100644 --- a/xs/src/slic3r/GUI/GLGizmo.cpp +++ b/xs/src/slic3r/GUI/GLGizmo.cpp @@ -837,7 +837,7 @@ void GLGizmoScale3D::on_render(const BoundingBoxf3& box) const { ::glEnable(GL_DEPTH_TEST); - Vec3d offset_vec((double)Offset, (double)Offset, (double)Offset); + Vec3d offset_vec = (double)Offset * Vec3d::Ones(); m_box = BoundingBoxf3(box.min - offset_vec, box.max + offset_vec); const Vec3d& center = m_box.center();