diff options
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 6704fc9908f..d092de4fcce 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1947,45 +1947,23 @@ 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); } -/* Legacy 2.7x, now use shaders that use clip distance instead. - * Remove once clipping is working properly. */ -#define USE_CLIP_PLANES - -void ED_view3d_clipping_set(RegionView3D *rv3d) +void ED_view3d_clipping_set(RegionView3D *UNUSED(rv3d)) { -#ifdef USE_CLIP_PLANES - double plane[4]; - const uint tot = (rv3d->viewlock & RV3D_BOXCLIP) ? 4 : 6; - - for (unsigned a = 0; a < tot; a++) { - copy_v4db_v4fl(plane, rv3d->clip[a]); - glClipPlane(GL_CLIP_PLANE0 + a, plane); - glEnable(GL_CLIP_PLANE0 + a); - glEnable(GL_CLIP_DISTANCE0 + a); - } -#else - for (unsigned a = 0; a < 6; a++) { + for (uint a = 0; a < 6; a++) { glEnable(GL_CLIP_DISTANCE0 + a); } -#endif } /* Use these to temp disable/enable clipping when 'rv3d->rflag & RV3D_CLIPPING' is set. */ void ED_view3d_clipping_disable(void) { - for (unsigned a = 0; a < 6; a++) { -#ifdef USE_CLIP_PLANES - glDisable(GL_CLIP_PLANE0 + a); -#endif + for (uint a = 0; a < 6; a++) { glDisable(GL_CLIP_DISTANCE0 + a); } } void ED_view3d_clipping_enable(void) { - for (unsigned a = 0; a < 6; a++) { -#ifdef USE_CLIP_PLANES - glEnable(GL_CLIP_PLANE0 + a); -#endif + for (uint a = 0; a < 6; a++) { glEnable(GL_CLIP_DISTANCE0 + a); } } |