Fixed build when ENABLE_GCODE_VIEWER is disabled
This commit is contained in:
parent
73b885fc37
commit
6fbb3db79c
@ -369,7 +369,6 @@ void Bed3D::calc_bounding_boxes() const
|
|||||||
m_extended_bounding_box.merge(model_bb);
|
m_extended_bounding_box.merge(model_bb);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
m_extended_bounding_box.merge(m_axes.get_total_length() * Vec3d::Ones());
|
|
||||||
m_extended_bounding_box.merge(m_axes.length + Axes::ArrowLength * Vec3d::Ones());
|
m_extended_bounding_box.merge(m_axes.length + Axes::ArrowLength * Vec3d::Ones());
|
||||||
// extend to contain model, if any
|
// extend to contain model, if any
|
||||||
if (!m_model.get_filename().empty())
|
if (!m_model.get_filename().empty())
|
||||||
@ -694,11 +693,11 @@ void Bed3D::render_default(bool bottom) const
|
|||||||
{
|
{
|
||||||
// draw background
|
// draw background
|
||||||
glsafe(::glDepthMask(GL_FALSE));
|
glsafe(::glDepthMask(GL_FALSE));
|
||||||
#if ENABLE_LAYOUT_NO_RESTART
|
#if ENABLE_GCODE_VIEWER
|
||||||
glsafe(::glColor4fv(m_model_color.data()));
|
glsafe(::glColor4fv(m_model_color.data()));
|
||||||
#else
|
#else
|
||||||
glsafe(::glColor4f(0.35f, 0.35f, 0.35f, 0.4f));
|
glsafe(::glColor4f(0.35f, 0.35f, 0.35f, 0.4f));
|
||||||
#endif // ENABLE_LAYOUT_NO_RESTART
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
glsafe(::glNormal3d(0.0f, 0.0f, 1.0f));
|
glsafe(::glNormal3d(0.0f, 0.0f, 1.0f));
|
||||||
glsafe(::glVertexPointer(3, GL_FLOAT, m_triangles.get_vertex_data_size(), (GLvoid*)m_triangles.get_vertices_data()));
|
glsafe(::glVertexPointer(3, GL_FLOAT, m_triangles.get_vertex_data_size(), (GLvoid*)m_triangles.get_vertices_data()));
|
||||||
glsafe(::glDrawArrays(GL_TRIANGLES, 0, (GLsizei)triangles_vcount));
|
glsafe(::glDrawArrays(GL_TRIANGLES, 0, (GLsizei)triangles_vcount));
|
||||||
|
@ -482,9 +482,11 @@ void MainFrame::shutdown()
|
|||||||
#endif // ENABLE_LAYOUT_NO_RESTART
|
#endif // ENABLE_LAYOUT_NO_RESTART
|
||||||
|
|
||||||
if (m_plater != nullptr) {
|
if (m_plater != nullptr) {
|
||||||
|
#if ENABLE_GCODE_VIEWER_AS_STATE
|
||||||
// restore sidebar if it was hidden when switching to gcode viewer mode
|
// restore sidebar if it was hidden when switching to gcode viewer mode
|
||||||
if (m_restore_from_gcode_viewer.collapsed_sidebar)
|
if (m_restore_from_gcode_viewer.collapsed_sidebar)
|
||||||
m_plater->collapse_sidebar(false);
|
m_plater->collapse_sidebar(false);
|
||||||
|
#endif // ENABLE_GCODE_VIEWER_AS_STATE
|
||||||
// Stop the background thread (Windows and Linux).
|
// Stop the background thread (Windows and Linux).
|
||||||
// Disconnect from a 3DConnextion driver (OSX).
|
// Disconnect from a 3DConnextion driver (OSX).
|
||||||
m_plater->get_mouse3d_controller().shutdown();
|
m_plater->get_mouse3d_controller().shutdown();
|
||||||
|
@ -2039,11 +2039,19 @@ void Selection::render_sidebar_scale_hints(const std::string& sidebar_field) con
|
|||||||
shader->set_uniform("uniform_color", uniform_scale ? UNIFORM_SCALE_COLOR : AXES_COLOR[axis], 4);
|
shader->set_uniform("uniform_color", uniform_scale ? UNIFORM_SCALE_COLOR : AXES_COLOR[axis], 4);
|
||||||
|
|
||||||
glsafe(::glTranslated(0.0, 5.0, 0.0));
|
glsafe(::glTranslated(0.0, 5.0, 0.0));
|
||||||
|
#if ENABLE_GCODE_VIEWER
|
||||||
m_arrow.render();
|
m_arrow.render();
|
||||||
|
#else
|
||||||
|
m_arrow->render();
|
||||||
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
|
|
||||||
glsafe(::glTranslated(0.0, -10.0, 0.0));
|
glsafe(::glTranslated(0.0, -10.0, 0.0));
|
||||||
glsafe(::glRotated(180.0, 0.0, 0.0, 1.0));
|
glsafe(::glRotated(180.0, 0.0, 0.0, 1.0));
|
||||||
|
#if ENABLE_GCODE_VIEWER
|
||||||
m_arrow.render();
|
m_arrow.render();
|
||||||
|
#else
|
||||||
|
m_arrow->render();
|
||||||
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
};
|
};
|
||||||
|
|
||||||
if (boost::ends_with(sidebar_field, "x") || uniform_scale)
|
if (boost::ends_with(sidebar_field, "x") || uniform_scale)
|
||||||
|
Loading…
Reference in New Issue
Block a user