mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
Follow-up of 6b2fea5f8bb67a38bdcb7e3fb43c06a12a6d7798 - Fixed warnings
(cherry picked from commit prusa3d/PrusaSlicer@9701d3b01d)
This commit is contained in:
parent
cabb8fcf6e
commit
7081ebddfa
1 changed files with 2 additions and 11 deletions
|
@ -3745,16 +3745,8 @@ m_no_render_path = false;
|
|||
|
||||
void GCodeViewer::render_toolpaths()
|
||||
{
|
||||
#if ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS
|
||||
const float point_size = 20.0f;
|
||||
#else
|
||||
const float point_size = 0.8f;
|
||||
#endif // ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS
|
||||
const Camera& camera = wxGetApp().plater()->get_camera();
|
||||
const double zoom = camera.get_zoom();
|
||||
const std::array<int, 4>& viewport = camera.get_viewport();
|
||||
const float near_plane_height = camera.get_type() == Camera::EType::Perspective ? static_cast<float>(viewport[3]) / (2.0f * static_cast<float>(2.0 * std::tan(0.5 * Geometry::deg2rad(camera.get_fov())))) :
|
||||
static_cast<float>(viewport[3]) * 0.0005;
|
||||
|
||||
auto render_as_lines = [
|
||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||
|
@ -3971,9 +3963,9 @@ void GCodeViewer::render_toolpaths()
|
|||
}
|
||||
|
||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||
auto render_sequential_range_cap = [this]
|
||||
auto render_sequential_range_cap = [this, &camera]
|
||||
#else
|
||||
auto render_sequential_range_cap = []
|
||||
auto render_sequential_range_cap = [&camera]
|
||||
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||
(const SequentialRangeCap& cap) {
|
||||
const TBuffer* buffer = cap.buffer;
|
||||
|
@ -3983,7 +3975,6 @@ void GCodeViewer::render_toolpaths()
|
|||
|
||||
shader->start_using();
|
||||
|
||||
const Camera& camera = wxGetApp().plater()->get_camera();
|
||||
const Transform3d& view_matrix = camera.get_view_matrix();
|
||||
shader->set_uniform("view_model_matrix", view_matrix);
|
||||
shader->set_uniform("projection_matrix", camera.get_projection_matrix());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue