Removed last GLU call, removed libGLU from CMakeLists
This commit is contained in:
parent
fd024eadcd
commit
846afdf7f3
@ -240,7 +240,7 @@ add_library(libslic3r_gui STATIC ${SLIC3R_GUI_SOURCES})
|
|||||||
|
|
||||||
encoding_check(libslic3r_gui)
|
encoding_check(libslic3r_gui)
|
||||||
|
|
||||||
target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL OpenGL::GLU hidapi libcurl ${wxWidgets_LIBRARIES})
|
target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES})
|
target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES})
|
||||||
|
@ -115,20 +115,8 @@ Selection::Selection()
|
|||||||
, m_scale_factor(1.0f)
|
, m_scale_factor(1.0f)
|
||||||
{
|
{
|
||||||
this->set_bounding_boxes_dirty();
|
this->set_bounding_boxes_dirty();
|
||||||
#if ENABLE_RENDER_SELECTION_CENTER
|
|
||||||
m_quadric = ::gluNewQuadric();
|
|
||||||
if (m_quadric != nullptr)
|
|
||||||
::gluQuadricDrawStyle(m_quadric, GLU_FILL);
|
|
||||||
#endif // ENABLE_RENDER_SELECTION_CENTER
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_RENDER_SELECTION_CENTER
|
|
||||||
Selection::~Selection()
|
|
||||||
{
|
|
||||||
if (m_quadric != nullptr)
|
|
||||||
::gluDeleteQuadric(m_quadric);
|
|
||||||
}
|
|
||||||
#endif // ENABLE_RENDER_SELECTION_CENTER
|
|
||||||
|
|
||||||
void Selection::set_volumes(GLVolumePtrs* volumes)
|
void Selection::set_volumes(GLVolumePtrs* volumes)
|
||||||
{
|
{
|
||||||
@ -141,6 +129,11 @@ bool Selection::init()
|
|||||||
{
|
{
|
||||||
m_arrow.init_from(straight_arrow(10.0f, 5.0f, 5.0f, 10.0f, 1.0f));
|
m_arrow.init_from(straight_arrow(10.0f, 5.0f, 5.0f, 10.0f, 1.0f));
|
||||||
m_curved_arrow.init_from(circular_arrow(16, 10.0f, 5.0f, 10.0f, 5.0f, 1.0f));
|
m_curved_arrow.init_from(circular_arrow(16, 10.0f, 5.0f, 10.0f, 5.0f, 1.0f));
|
||||||
|
|
||||||
|
#if ENABLE_RENDER_SELECTION_CENTER
|
||||||
|
m_vbo_sphere.init_from(make_sphere(0.75, 2*PI/24));
|
||||||
|
#endif // ENABLE_RENDER_SELECTION_CENTER
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1177,6 +1170,7 @@ void Selection::render(float scale_factor) const
|
|||||||
void Selection::render_center(bool gizmo_is_dragging) const
|
void Selection::render_center(bool gizmo_is_dragging) const
|
||||||
{
|
{
|
||||||
if (!m_valid || is_empty() || m_quadric == nullptr)
|
if (!m_valid || is_empty() || m_quadric == nullptr)
|
||||||
|
if (!m_valid || is_empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const Vec3d center = gizmo_is_dragging ? m_cache.dragging_center : get_bounding_box().center();
|
const Vec3d center = gizmo_is_dragging ? m_cache.dragging_center : get_bounding_box().center();
|
||||||
@ -1188,7 +1182,7 @@ void Selection::render_center(bool gizmo_is_dragging) const
|
|||||||
glsafe(::glColor3f(1.0f, 1.0f, 1.0f));
|
glsafe(::glColor3f(1.0f, 1.0f, 1.0f));
|
||||||
glsafe(::glPushMatrix());
|
glsafe(::glPushMatrix());
|
||||||
glsafe(::glTranslated(center(0), center(1), center(2)));
|
glsafe(::glTranslated(center(0), center(1), center(2)));
|
||||||
glsafe(::gluSphere(m_quadric, 0.75, 32, 32));
|
m_vbo_sphere.render();
|
||||||
glsafe(::glPopMatrix());
|
glsafe(::glPopMatrix());
|
||||||
|
|
||||||
glsafe(::glDisable(GL_LIGHTING));
|
glsafe(::glDisable(GL_LIGHTING));
|
||||||
|
@ -5,11 +5,6 @@
|
|||||||
#include "libslic3r/Geometry.hpp"
|
#include "libslic3r/Geometry.hpp"
|
||||||
#include "GLModel.hpp"
|
#include "GLModel.hpp"
|
||||||
|
|
||||||
#if ENABLE_RENDER_SELECTION_CENTER
|
|
||||||
class GLUquadric;
|
|
||||||
typedef class GLUquadric GLUquadricObj;
|
|
||||||
#endif // ENABLE_RENDER_SELECTION_CENTER
|
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
class Shader;
|
class Shader;
|
||||||
@ -216,7 +211,7 @@ private:
|
|||||||
bool m_scaled_instance_bounding_box_dirty;
|
bool m_scaled_instance_bounding_box_dirty;
|
||||||
|
|
||||||
#if ENABLE_RENDER_SELECTION_CENTER
|
#if ENABLE_RENDER_SELECTION_CENTER
|
||||||
GLUquadricObj* m_quadric;
|
GLModel m_vbo_sphere;
|
||||||
#endif // ENABLE_RENDER_SELECTION_CENTER
|
#endif // ENABLE_RENDER_SELECTION_CENTER
|
||||||
|
|
||||||
GLModel m_arrow;
|
GLModel m_arrow;
|
||||||
@ -226,9 +221,6 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Selection();
|
Selection();
|
||||||
#if ENABLE_RENDER_SELECTION_CENTER
|
|
||||||
~Selection();
|
|
||||||
#endif // ENABLE_RENDER_SELECTION_CENTER
|
|
||||||
|
|
||||||
void set_volumes(GLVolumePtrs* volumes);
|
void set_volumes(GLVolumePtrs* volumes);
|
||||||
bool init();
|
bool init();
|
||||||
|
Loading…
Reference in New Issue
Block a user