Fixed warnings
This commit is contained in:
parent
93610ebb02
commit
545056bf7c
1 changed files with 3 additions and 1 deletions
|
@ -1324,9 +1324,9 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
||||||
|
|
||||||
// format data into the buffers to be rendered as lines
|
// format data into the buffers to be rendered as lines
|
||||||
auto add_vertices_as_line = [](const GCodeProcessorResult::MoveVertex& prev, const GCodeProcessorResult::MoveVertex& curr, VertexBuffer& vertices) {
|
auto add_vertices_as_line = [](const GCodeProcessorResult::MoveVertex& prev, const GCodeProcessorResult::MoveVertex& curr, VertexBuffer& vertices) {
|
||||||
|
#if !ENABLE_GLBEGIN_GLEND_SHADERS_ATTRIBUTES
|
||||||
// x component of the normal to the current segment (the normal is parallel to the XY plane)
|
// x component of the normal to the current segment (the normal is parallel to the XY plane)
|
||||||
const Vec3f dir = (curr.position - prev.position).normalized();
|
const Vec3f dir = (curr.position - prev.position).normalized();
|
||||||
#if !ENABLE_GLBEGIN_GLEND_SHADERS_ATTRIBUTES
|
|
||||||
Vec3f normal(dir.y(), -dir.x(), 0.0);
|
Vec3f normal(dir.y(), -dir.x(), 0.0);
|
||||||
normal.normalize();
|
normal.normalize();
|
||||||
#endif // !ENABLE_GLBEGIN_GLEND_SHADERS_ATTRIBUTES
|
#endif // !ENABLE_GLBEGIN_GLEND_SHADERS_ATTRIBUTES
|
||||||
|
@ -2973,7 +2973,9 @@ void GCodeViewer::render_toolpaths()
|
||||||
#else
|
#else
|
||||||
const float point_size = 0.8f;
|
const float point_size = 0.8f;
|
||||||
#endif // ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS
|
#endif // ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS
|
||||||
|
#if !ENABLE_GLBEGIN_GLEND_SHADERS_ATTRIBUTES
|
||||||
const std::array<float, 4> light_intensity = { 0.25f, 0.70f, 0.75f, 0.75f };
|
const std::array<float, 4> light_intensity = { 0.25f, 0.70f, 0.75f, 0.75f };
|
||||||
|
#endif // !ENABLE_GLBEGIN_GLEND_SHADERS_ATTRIBUTES
|
||||||
const Camera& camera = wxGetApp().plater()->get_camera();
|
const Camera& camera = wxGetApp().plater()->get_camera();
|
||||||
const double zoom = camera.get_zoom();
|
const double zoom = camera.get_zoom();
|
||||||
const std::array<int, 4>& viewport = camera.get_viewport();
|
const std::array<int, 4>& viewport = camera.get_viewport();
|
||||||
|
|
Loading…
Reference in a new issue