Add debug option to display picking pass to screen
This commit is contained in:
parent
2f806dedc7
commit
d818d1b429
3 changed files with 8 additions and 0 deletions
|
@ -15,6 +15,8 @@
|
||||||
#define ENABLE_RENDER_STATISTICS 0
|
#define ENABLE_RENDER_STATISTICS 0
|
||||||
// Shows an imgui dialog with camera related data
|
// Shows an imgui dialog with camera related data
|
||||||
#define ENABLE_CAMERA_STATISTICS 0
|
#define ENABLE_CAMERA_STATISTICS 0
|
||||||
|
// Render the picking pass instead of the main scene
|
||||||
|
#define ENABLE_RENDER_PICKING_PASS 0
|
||||||
|
|
||||||
|
|
||||||
//====================
|
//====================
|
||||||
|
|
|
@ -1625,6 +1625,7 @@ void GLCanvas3D::render()
|
||||||
_picking_pass();
|
_picking_pass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !ENABLE_RENDER_PICKING_PASS
|
||||||
// draw scene
|
// draw scene
|
||||||
glsafe(::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));
|
glsafe(::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));
|
||||||
_render_background();
|
_render_background();
|
||||||
|
@ -1654,6 +1655,7 @@ void GLCanvas3D::render()
|
||||||
|
|
||||||
_render_current_gizmo();
|
_render_current_gizmo();
|
||||||
_render_selection_sidebar_hints();
|
_render_selection_sidebar_hints();
|
||||||
|
#endif // !ENABLE_RENDER_PICKING_PASS
|
||||||
|
|
||||||
#if ENABLE_SHOW_CAMERA_TARGET
|
#if ENABLE_SHOW_CAMERA_TARGET
|
||||||
_render_camera_target();
|
_render_camera_target();
|
||||||
|
|
|
@ -259,6 +259,10 @@ void GLGizmoSlaSupports::render_clipping_plane(const Selection& selection) const
|
||||||
|
|
||||||
void GLGizmoSlaSupports::on_render_for_picking(const Selection& selection) const
|
void GLGizmoSlaSupports::on_render_for_picking(const Selection& selection) const
|
||||||
{
|
{
|
||||||
|
#if ENABLE_RENDER_PICKING_PASS
|
||||||
|
m_z_shift = selection.get_volume(*selection.get_volume_idxs().begin())->get_sla_shift_z();
|
||||||
|
#endif
|
||||||
|
|
||||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||||
render_points(selection, true);
|
render_points(selection, true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue