mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-09 07:56:24 -06:00
Fix preview shell rendering
This commit is contained in:
parent
03daf61862
commit
8f49be40b7
1 changed files with 6 additions and 9 deletions
|
@ -1236,15 +1236,12 @@ void GCodeViewer::render(int canvas_width, int canvas_height, int right_margin)
|
||||||
m_statistics.total_instances_gpu_size = 0;
|
m_statistics.total_instances_gpu_size = 0;
|
||||||
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
|
||||||
render_shells();
|
|
||||||
// Orca: add shell overlay effect
|
|
||||||
glsafe(::glClear(GL_DEPTH_BUFFER_BIT));
|
|
||||||
|
|
||||||
if (m_roles.empty())
|
if (m_roles.empty())
|
||||||
return;
|
return;
|
||||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
|
||||||
|
|
||||||
|
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||||
render_toolpaths();
|
render_toolpaths();
|
||||||
|
render_shells();
|
||||||
float legend_height = 0.0f;
|
float legend_height = 0.0f;
|
||||||
render_legend(legend_height, canvas_width, canvas_height, right_margin);
|
render_legend(legend_height, canvas_width, canvas_height, right_margin);
|
||||||
|
|
||||||
|
@ -4115,16 +4112,16 @@ void GCodeViewer::render_shells()
|
||||||
if (shader == nullptr)
|
if (shader == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
|
||||||
// glsafe(::glDepthMask(GL_FALSE));
|
// glsafe(::glDepthMask(GL_FALSE));
|
||||||
|
|
||||||
shader->start_using();
|
shader->start_using();
|
||||||
|
shader->set_uniform("emission_factor", 0.1f);
|
||||||
const Camera& camera = wxGetApp().plater()->get_camera();
|
const Camera& camera = wxGetApp().plater()->get_camera();
|
||||||
//BBS: reopen cul faces
|
m_shells.volumes.render(GLVolumeCollection::ERenderType::Transparent, true, camera.get_view_matrix(), camera.get_projection_matrix());
|
||||||
m_shells.volumes.render(GLVolumeCollection::ERenderType::Transparent, false, camera.get_view_matrix(), camera.get_projection_matrix());
|
shader->set_uniform("emission_factor", 0.0f);
|
||||||
shader->stop_using();
|
shader->stop_using();
|
||||||
|
|
||||||
// glsafe(::glDepthMask(GL_TRUE));
|
// glsafe(::glDepthMask(GL_TRUE));
|
||||||
}
|
}
|
||||||
|
|
||||||
//BBS
|
//BBS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue