mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-25 23:01:09 -05:00
Faster and better outline (#17111)
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
This commit is contained in:
1 parent
8cdc68a6a0
commit
670db4b772
32 files changed
+1499
-674
No files matched your search
@@ -2171,7 +2171,7 @@ GCodeViewer::ImexMarkerPlan GCodeViewer::resolve_imex_marker_plan(const DynamicP
|
||||
void GCodeViewer::render_scene(int canvas_width, int canvas_height)
|
||||
{
|
||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||
render_shells(canvas_width, canvas_height);
|
||||
render_shells();
|
||||
|
||||
if (m_viewer.get_extrusion_roles_count() == 0)
|
||||
return;
|
||||
@@ -3391,7 +3391,7 @@ void GCodeViewer::render_toolpaths()
|
||||
#endif // ENABLE_NEW_GCODE_VIEWER_DEBUG
|
||||
}
|
||||
|
||||
void GCodeViewer::render_shells(int canvas_width, int canvas_height)
|
||||
void GCodeViewer::render_shells()
|
||||
{
|
||||
//BBS: add shell previewing logic
|
||||
if ((!m_shells.previewing && !m_shells.visible) || m_shells.volumes.empty())
|
||||
@@ -3409,7 +3409,7 @@ void GCodeViewer::render_shells(int canvas_width, int canvas_height)
|
||||
const Camera& camera = wxGetApp().plater()->get_camera();
|
||||
shader->set_uniform("z_far", camera.get_far_z());
|
||||
shader->set_uniform("z_near", camera.get_near_z());
|
||||
m_shells.volumes.render(GLVolumeCollection::ERenderType::Transparent, false, camera.get_view_matrix(), camera.get_projection_matrix(), {canvas_width, canvas_height});
|
||||
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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user