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/curve/editcurve_paint.c
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/curve/editcurve_paint.c')
-rw-r--r--source/blender/editors/curve/editcurve_paint.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c
index e679b04f25d..5e3fec93340 100644
--- a/source/blender/editors/curve/editcurve_paint.c
+++ b/source/blender/editors/curve/editcurve_paint.c
@@ -373,7 +373,6 @@ static void curve_draw_stroke_3d(const struct bContext *UNUSED(C), ARegion *UNUS
return;
}
- View3D *v3d = cdd->vc.v3d;
Object *obedit = cdd->vc.obedit;
Curve *cu = obedit->data;
@@ -434,37 +433,29 @@ static void curve_draw_stroke_3d(const struct bContext *UNUSED(C), ARegion *UNUS
unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
+ GPU_depth_test(false);
GPU_blend(true);
GPU_line_smooth(true);
+ GPU_line_width(3.0f);
imm_cpack(0x0);
immBegin(GWN_PRIM_LINE_STRIP, stroke_len);
- GPU_line_width(3.0f);
-
- if (v3d->zbuf) {
- GPU_depth_test(false);
- }
-
for (int i = 0; i < stroke_len; i++) {
immVertex3fv(pos, coord_array[i]);
}
-
immEnd();
- imm_cpack(0xffffffff);
- immBegin(GWN_PRIM_LINE_STRIP, stroke_len);
GPU_line_width(1.0f);
+ imm_cpack(0xffffffff);
+ immBegin(GWN_PRIM_LINE_STRIP, stroke_len);
for (int i = 0; i < stroke_len; i++) {
immVertex3fv(pos, coord_array[i]);
}
-
immEnd();
- if (v3d->zbuf) {
- GPU_depth_test(true);
- }
-
+ /* Reset defaults */
+ GPU_depth_test(true);
GPU_blend(false);
GPU_line_smooth(false);