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-08-17 00:20:59 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-18 22:30:10 +0300
commitd10f000322914edf83ace36ee2abb2479c2b533b (patch)
treeb33d453cf2e1c5364cea88998103a7008ab31763 /source/blender/editors/sculpt_paint/paint_cursor.c
parentf30df15edc0b5bfce98809cfa8c2ca96cfe03e97 (diff)
GPUState: Remove gpuPushAttr/gpuPopAttr
And use manual save/restore mechanism. The stack method is not used so much to be considered useful.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 4115b5e51d6..0e38340d3bc 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -775,7 +775,8 @@ static bool paint_draw_alpha_overlay(UnifiedPaintSettings *ups,
bool alpha_overlay_active = false;
ePaintOverlayControlFlags flags = BKE_paint_get_overlay_flags();
- gpuPushAttr(GPU_DEPTH_BUFFER_BIT | GPU_BLEND_BIT);
+ eGPUBlend blend_state = GPU_blend_get();
+ bool depth_test = GPU_depth_test_enabled();
/* Translate to region. */
GPU_matrix_push();
@@ -805,7 +806,8 @@ static bool paint_draw_alpha_overlay(UnifiedPaintSettings *ups,
}
GPU_matrix_pop();
- gpuPopAttr();
+ GPU_blend(blend_state);
+ GPU_depth_test(depth_test);
return alpha_overlay_active;
}