mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 00:07:52 -06:00
Gizmos refactoring - Removed GLModels defined into GLGizmoBase, and mostly unused, to avoid wasting GPU memory. Use a shared GLModel for Gizmos inheriting from GLGizmoPainterBase. Initialization of GLModels moved from constructor to render methods
(cherry picked from commit prusa3d/PrusaSlicer@e3d5cd445c)
This commit is contained in:
parent
874f39aac1
commit
b7989e3b2f
5 changed files with 21 additions and 28 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <cereal/types/vector.hpp>
|
||||
#include <GL/glew.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
||||
namespace Slic3r::GUI {
|
||||
|
@ -217,7 +218,7 @@ private:
|
|||
void on_render_for_picking() override {}
|
||||
public:
|
||||
GLGizmoPainterBase(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id);
|
||||
~GLGizmoPainterBase() override = default;
|
||||
virtual ~GLGizmoPainterBase() override;
|
||||
virtual void set_painter_gizmo_data(const Selection& selection);
|
||||
virtual bool gizmo_event(SLAGizmoEventType action, const Vec2d& mouse_position, bool shift_down, bool alt_down, bool control_down);
|
||||
|
||||
|
@ -341,7 +342,7 @@ private:
|
|||
const Camera& camera,
|
||||
const std::vector<Transform3d>& trafo_matrices) const;
|
||||
|
||||
GLIndexedVertexArray m_vbo_sphere;
|
||||
static std::shared_ptr<GLIndexedVertexArray> s_sphere;
|
||||
|
||||
bool m_internal_stack_active = false;
|
||||
bool m_schedule_update = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue