Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-07-18 00:00:55 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-07-18 04:43:52 +0300
commit4c28b1c74ec2a96055fcc393920f3967666dd735 (patch)
treeb85643f0b470eb092c0c3706cb10f56dddc2cade /source/blender/editors/space_view3d/view3d_draw.c
parent59975b0adf42cfbc51a90c02caaed49085abafa2 (diff)
Cleanup: GPU: Encapsulate clipDistances
This also remove some non functionnal state changes that were left from legacy code.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c34
1 files changed, 0 insertions, 34 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 *************** */
/**