ENH:always render shells in preview window
jira: none Change-Id: Id5a13f28b08e58a4c17f2731376cc7b76dc28b3d
This commit is contained in:
parent
2c6a6ae5f4
commit
b47342178e
|
@ -1291,13 +1291,13 @@ void GCodeViewer::render(int canvas_width, int canvas_height, int right_margin)
|
||||||
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
|
||||||
//BBS: always render shells in preview window
|
//BBS: always render shells in preview window
|
||||||
|
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||||
render_shells();
|
render_shells();
|
||||||
|
|
||||||
m_legend_height = 0.0f;
|
m_legend_height = 0.0f;
|
||||||
if (m_roles.empty())
|
if (m_roles.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
|
||||||
render_toolpaths();
|
render_toolpaths();
|
||||||
//render_shells();
|
//render_shells();
|
||||||
render_legend(m_legend_height, canvas_width, canvas_height, right_margin);
|
render_legend(m_legend_height, canvas_width, canvas_height, right_margin);
|
||||||
|
@ -4140,16 +4140,14 @@ void GCodeViewer::render_shells()
|
||||||
if (!v->indexed_vertex_array->has_VBOs())
|
if (!v->indexed_vertex_array->has_VBOs())
|
||||||
v->finalize_geometry(true);
|
v->finalize_geometry(true);
|
||||||
}
|
}
|
||||||
|
glsafe(::glDepthMask(GL_FALSE));
|
||||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
|
||||||
// glsafe(::glDepthMask(GL_FALSE));
|
|
||||||
|
|
||||||
shader->start_using();
|
shader->start_using();
|
||||||
//BBS: reopen cul faces
|
//BBS: reopen cul faces
|
||||||
m_shells.volumes.render(GLVolumeCollection::ERenderType::Transparent, false, wxGetApp().plater()->get_camera().get_view_matrix());
|
m_shells.volumes.render(GLVolumeCollection::ERenderType::Transparent, false, wxGetApp().plater()->get_camera().get_view_matrix());
|
||||||
shader->stop_using();
|
shader->stop_using();
|
||||||
|
|
||||||
// glsafe(::glDepthMask(GL_TRUE));
|
glsafe(::glDepthMask(GL_TRUE));
|
||||||
}
|
}
|
||||||
|
|
||||||
//BBS
|
//BBS
|
||||||
|
|
|
@ -603,7 +603,7 @@ void Preview::update_layers_slider(const std::vector<double>& layers_z, bool kee
|
||||||
auto curr_print_seq = curr_plate->get_real_print_seq();
|
auto curr_print_seq = curr_plate->get_real_print_seq();
|
||||||
bool sequential_print = (curr_print_seq == PrintSequence::ByObject);
|
bool sequential_print = (curr_print_seq == PrintSequence::ByObject);
|
||||||
m_layers_slider->SetDrawMode(sequential_print);
|
m_layers_slider->SetDrawMode(sequential_print);
|
||||||
|
|
||||||
m_layers_slider->SetTicksValues(ticks_info_from_curr_plate);
|
m_layers_slider->SetTicksValues(ticks_info_from_curr_plate);
|
||||||
|
|
||||||
auto print_mode_stat = m_gcode_result->print_statistics.modes.front();
|
auto print_mode_stat = m_gcode_result->print_statistics.modes.front();
|
||||||
|
@ -734,8 +734,8 @@ void Preview::load_print_as_fff(bool keep_z_range, bool only_gcode)
|
||||||
//BBS show sliders
|
//BBS show sliders
|
||||||
show_moves_sliders();
|
show_moves_sliders();
|
||||||
|
|
||||||
//BBS: turn off shells for preview
|
//BBS: keep shell preview on
|
||||||
m_canvas->set_shells_on_previewing(false);
|
m_canvas->set_shells_on_previewing(true);
|
||||||
Refresh();
|
Refresh();
|
||||||
zs = m_canvas->get_gcode_layers_zs();
|
zs = m_canvas->get_gcode_layers_zs();
|
||||||
//BBS: add m_loaded_print logic
|
//BBS: add m_loaded_print logic
|
||||||
|
|
Loading…
Reference in New Issue