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>2018-07-03 20:22:00 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-07-03 20:22:15 +0300
commitbb9355e7031404a4e0374ad49928e0fcad1f0aaa (patch)
tree7750e6d58dea5b8cb0e841b751bbb5d31d315b51 /source/blender/editors/mesh
parent79152371c3c259fed9d1106aa8003beef28168e6 (diff)
View3D: Remove v3d->zbuf
This is because depth test is set before drawing anything now. There is no case where we want to draw without depth test that is not selection and this case is not handle by v3d->zbuf anymore. UI assume depth test is off by default. The DRWManager assume it's on. This should fix T55623.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c8
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c10
2 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index a511100ff4e..8f8400e2d20 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1037,12 +1037,11 @@ static void knife_init_colors(KnifeColors *colors)
}
/* modal loop selection drawing callback */
-static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
+static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *arg)
{
- View3D *v3d = CTX_wm_view3d(C);
const KnifeTool_OpData *kcd = arg;
- if (v3d->zbuf) GPU_depth_test(false);
+ GPU_depth_test(false);
glPolygonOffset(1.0f, 1.0f);
@@ -1196,7 +1195,8 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
gpuPopMatrix();
- if (v3d->zbuf) GPU_depth_test(true);
+ /* Reset default */
+ GPU_depth_test(true);
}
/**
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index 8493d15a3b1..b437bdca111 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -106,14 +106,12 @@ typedef struct RingSelOpData {
} RingSelOpData;
/* modal loop selection drawing callback */
-static void ringsel_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
+static void ringsel_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *arg)
{
- View3D *v3d = CTX_wm_view3d(C);
RingSelOpData *lcd = arg;
if ((lcd->totedge > 0) || (lcd->totpoint > 0)) {
- if (v3d && v3d->zbuf)
- GPU_depth_test(false);
+ GPU_depth_test(false);
gpuPushMatrix();
gpuMultMatrix(lcd->ob->obmat);
@@ -150,8 +148,8 @@ static void ringsel_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
gpuPopMatrix();
- if (v3d && v3d->zbuf)
- GPU_depth_test(true);
+ /* Reset default */
+ GPU_depth_test(true);
}
}