diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2019-11-28 13:51:00 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2019-11-28 13:51:00 +0300 |
commit | 3537f74936ca2768eee77d02648468ca0b088fc4 (patch) | |
tree | bdf75f13b1677a1f5c3031219fbcf57224a3becf /src/slic3r/GUI/3DBed.cpp | |
parent | a3ff1b4282049aefe2852ceeff18f5362f238293 (diff) |
Printbed axes renderable on demand
Diffstat (limited to 'src/slic3r/GUI/3DBed.cpp')
-rw-r--r-- | src/slic3r/GUI/3DBed.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/slic3r/GUI/3DBed.cpp b/src/slic3r/GUI/3DBed.cpp index d0bab50c6..dce7c4c99 100644 --- a/src/slic3r/GUI/3DBed.cpp +++ b/src/slic3r/GUI/3DBed.cpp @@ -171,6 +171,7 @@ void Bed3D::Axes::render() const glsafe(::glPopMatrix()); glsafe(::glDisable(GL_LIGHTING)); + glsafe(::glDisable(GL_DEPTH_TEST)); } void Bed3D::Axes::render_axis(double length) const @@ -264,11 +265,14 @@ Point Bed3D::point_projection(const Point& point) const return m_polygon.point_projection(point); } -void Bed3D::render(GLCanvas3D& canvas, float theta, float scale_factor) const +void Bed3D::render(GLCanvas3D& canvas, float theta, float scale_factor, bool show_axes) const { m_scale_factor = scale_factor; - render_axes(); + if (show_axes) + render_axes(); + + glsafe(::glEnable(GL_DEPTH_TEST)); switch (m_type) { @@ -280,6 +284,8 @@ void Bed3D::render(GLCanvas3D& canvas, float theta, float scale_factor) const default: case Custom: { render_custom(canvas, theta > 90.0f); break; } } + + glsafe(::glDisable(GL_DEPTH_TEST)); } void Bed3D::calc_bounding_boxes() const |