From 6bd78aa9c4e829f108c1388c0686be94fdd791ee Mon Sep 17 00:00:00 2001 From: Filip Sykala Date: Thu, 30 Sep 2021 09:23:04 +0200 Subject: [PATCH] Add call for render --- src/slic3r/GUI/GLCanvas3D.cpp | 3 ++- src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp | 4 ++++ src/slic3r/GUI/Gizmos/GLGizmoSimplify.hpp | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 869f48a01..d42bc26dc 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -5137,7 +5137,8 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type) GLGizmosManager::EType type = gm.get_current_type(); if (type == GLGizmosManager::FdmSupports || type == GLGizmosManager::Seam - || type == GLGizmosManager::MmuSegmentation) { + || type == GLGizmosManager::MmuSegmentation + || type == GLGizmosManager::Simplify ) { shader->stop_using(); gm.render_painter_gizmo(); shader->start_using(); diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp index 2f7df2395..1ae422b82 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp @@ -358,6 +358,10 @@ void GLGizmoSimplify::on_set_state() } } +void GLGizmoSimplify::render_painter_gizmo() const { + +} + void GLGizmoSimplify::create_gui_cfg() { if (m_gui_cfg.has_value()) return; int space_size = m_imgui->calc_text_size(":MM").x; diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSimplify.hpp b/src/slic3r/GUI/Gizmos/GLGizmoSimplify.hpp index 8ed725cde..eb6058eb0 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSimplify.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSimplify.hpp @@ -4,6 +4,7 @@ // Include GLGizmoBase.hpp before I18N.hpp as it includes some libigl code, // which overrides our localization "L" macro. #include "GLGizmoBase.hpp" +#include "GLGizmoPainterBase.hpp" // for render wireframe #include "admesh/stl.h" // indexed_triangle_set #include #include @@ -16,7 +17,7 @@ class ModelVolume; namespace GUI { -class GLGizmoSimplify : public GLGizmoBase +class GLGizmoSimplify : public GLGizmoPainterBase // GLGizmoBase { public: GLGizmoSimplify(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id); @@ -31,6 +32,8 @@ protected: virtual bool on_is_selectable() const override { return false; } virtual void on_set_state() override; + // render wire frame + virtual void render_painter_gizmo() const override; private: void after_apply(); void close();