mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Tech ENABLE_RENDER_PICKING_PASS extended so that user can switch between picking pass texture rendering and regular rendering by pressing [T] key
This commit is contained in:
parent
d16c670ed1
commit
90d1ac2c8f
4 changed files with 26 additions and 3 deletions
|
@ -1224,6 +1224,9 @@ GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas, Bed3D& bed, Camera& camera, GLToolbar
|
|||
, m_cursor_type(Standard)
|
||||
, m_color_by("volume")
|
||||
, m_reload_delayed(false)
|
||||
#if ENABLE_RENDER_PICKING_PASS
|
||||
, m_show_picking_texture(false)
|
||||
#endif // ENABLE_RENDER_PICKING_PASS
|
||||
, m_render_sla_auxiliaries(true)
|
||||
{
|
||||
if (m_canvas != nullptr) {
|
||||
|
@ -1627,7 +1630,10 @@ void GLCanvas3D::render()
|
|||
_picking_pass();
|
||||
}
|
||||
|
||||
#if !ENABLE_RENDER_PICKING_PASS
|
||||
#if ENABLE_RENDER_PICKING_PASS
|
||||
if (!m_picking_enabled || !m_show_picking_texture)
|
||||
{
|
||||
#endif // ENABLE_RENDER_PICKING_PASS
|
||||
// draw scene
|
||||
glsafe(::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));
|
||||
_render_background();
|
||||
|
@ -1657,7 +1663,9 @@ void GLCanvas3D::render()
|
|||
|
||||
_render_current_gizmo();
|
||||
_render_selection_sidebar_hints();
|
||||
#endif // !ENABLE_RENDER_PICKING_PASS
|
||||
#if ENABLE_RENDER_PICKING_PASS
|
||||
}
|
||||
#endif // ENABLE_RENDER_PICKING_PASS
|
||||
|
||||
#if ENABLE_SHOW_CAMERA_TARGET
|
||||
_render_camera_target();
|
||||
|
@ -2399,6 +2407,14 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
|
|||
case 'k': { m_camera.select_next_type(); m_dirty = true; break; }
|
||||
case 'O':
|
||||
case 'o': { set_camera_zoom(-1.0); break; }
|
||||
#if ENABLE_RENDER_PICKING_PASS
|
||||
case 'T':
|
||||
case 't': {
|
||||
m_show_picking_texture = !m_show_picking_texture;
|
||||
m_dirty = true;
|
||||
break;
|
||||
}
|
||||
#endif // ENABLE_RENDER_PICKING_PASS
|
||||
case 'Z':
|
||||
case 'z': { m_selection.is_empty() ? zoom_to_volumes() : zoom_to_selection(); break; }
|
||||
default: { evt.Skip(); break; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue