diff options
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 34 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 8 |
2 files changed, 0 insertions, 42 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index c97be078b60..b4098f17212 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -844,16 +844,9 @@ void ED_view3d_draw_depth(Depsgraph *depsgraph, ARegion *region, View3D *v3d, bo ED_view3d_draw_setup_view( G_MAIN->wm.first, NULL, depsgraph, scene, region, v3d, NULL, NULL, NULL); - GPU_clear(GPU_DEPTH_BIT); - - if (RV3D_CLIPPING_ENABLED(v3d, rv3d)) { - ED_view3d_clipping_set(rv3d); - } /* get surface depth without bias */ rv3d->rflag |= RV3D_ZOFFSET_DISABLED; - GPU_depth_test(true); - /* Needed in cases the view-port isn't already setup. */ WM_draw_region_viewport_ensure(region, SPACE_VIEW3D); WM_draw_region_viewport_bind(region); @@ -867,14 +860,8 @@ void ED_view3d_draw_depth(Depsgraph *depsgraph, ARegion *region, View3D *v3d, bo WM_draw_region_viewport_unbind(region); - if (RV3D_CLIPPING_ENABLED(v3d, rv3d)) { - ED_view3d_clipping_disable(); - } rv3d->rflag &= ~RV3D_ZOFFSET_DISABLED; - /* Reset default for UI */ - GPU_depth_test(false); - U.glalphaclip = glalphaclip; v3d->flag = flag; @@ -2114,27 +2101,6 @@ bool ED_view3d_clipping_test(const RegionView3D *rv3d, const float co[3], const return view3d_clipping_test(co, is_local ? rv3d->clip_local : rv3d->clip); } -void ED_view3d_clipping_set(RegionView3D *UNUSED(rv3d)) -{ - for (uint a = 0; a < 6; a++) { - glEnable(GL_CLIP_DISTANCE0 + a); - } -} - -/* Use these to temp disable/enable clipping when 'rv3d->rflag & RV3D_CLIPPING' is set. */ -void ED_view3d_clipping_disable(void) -{ - for (uint a = 0; a < 6; a++) { - glDisable(GL_CLIP_DISTANCE0 + a); - } -} -void ED_view3d_clipping_enable(void) -{ - for (uint a = 0; a < 6; a++) { - glEnable(GL_CLIP_DISTANCE0 + a); - } -} - /* *********************** backdraw for selection *************** */ /** diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 53c87d2b7e4..66efa5b5de3 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1104,10 +1104,6 @@ int view3d_opengl_select(ViewContext *vc, GPU_depth_test(true); } - if (RV3D_CLIPPING_ENABLED(vc->v3d, vc->rv3d)) { - ED_view3d_clipping_set(vc->rv3d); - } - /* If in xray mode, we select the wires in priority. */ if (XRAY_ACTIVE(v3d) && use_nearest) { /* We need to call "GPU_select_*" API's inside DRW_draw_select_loop @@ -1173,10 +1169,6 @@ int view3d_opengl_select(ViewContext *vc, GPU_depth_test(false); } - if (RV3D_CLIPPING_ENABLED(v3d, vc->rv3d)) { - ED_view3d_clipping_disable(); - } - DRW_opengl_context_disable(); finally: |