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
|
||||
|
||||
//BBS: always render shells in preview window
|
||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||
render_shells();
|
||||
|
||||
m_legend_height = 0.0f;
|
||||
if (m_roles.empty())
|
||||
return;
|
||||
|
||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||
render_toolpaths();
|
||||
//render_shells();
|
||||
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())
|
||||
v->finalize_geometry(true);
|
||||
}
|
||||
|
||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||
// glsafe(::glDepthMask(GL_FALSE));
|
||||
glsafe(::glDepthMask(GL_FALSE));
|
||||
|
||||
shader->start_using();
|
||||
//BBS: reopen cul faces
|
||||
m_shells.volumes.render(GLVolumeCollection::ERenderType::Transparent, false, wxGetApp().plater()->get_camera().get_view_matrix());
|
||||
shader->stop_using();
|
||||
|
||||
// glsafe(::glDepthMask(GL_TRUE));
|
||||
glsafe(::glDepthMask(GL_TRUE));
|
||||
}
|
||||
|
||||
//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();
|
||||
bool sequential_print = (curr_print_seq == PrintSequence::ByObject);
|
||||
m_layers_slider->SetDrawMode(sequential_print);
|
||||
|
||||
|
||||
m_layers_slider->SetTicksValues(ticks_info_from_curr_plate);
|
||||
|
||||
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
|
||||
show_moves_sliders();
|
||||
|
||||
//BBS: turn off shells for preview
|
||||
m_canvas->set_shells_on_previewing(false);
|
||||
//BBS: keep shell preview on
|
||||
m_canvas->set_shells_on_previewing(true);
|
||||
Refresh();
|
||||
zs = m_canvas->get_gcode_layers_zs();
|
||||
//BBS: add m_loaded_print logic
|
||||
|
|
Loading…
Reference in New Issue