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:
enricoturri1966 2023-10-22 22:26:55 +08:00 committed by Noisyfox
parent 874f39aac1
commit b7989e3b2f
5 changed files with 21 additions and 28 deletions

View file

@ -149,8 +149,7 @@ void GLGizmoBase::set_icon_filename(const std::string &filename) {
void GLGizmoBase::set_hover_id(int id)
{
if (m_grabbers.empty() || (id < (int)m_grabbers.size()))
{
if (m_grabbers.empty() || id < (int)m_grabbers.size()) {
m_hover_id = id;
on_set_hover_id();
}