diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-05-09 16:09:39 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-05-09 16:23:33 +0300 |
commit | 65ebb668ec8d1fed282d59eea47da6dd47b699db (patch) | |
tree | 69fd13e5ae63bfd400112c8b954b586c8a5ae496 /source/blender/editors/sculpt_paint | |
parent | 86c299c6a48036258096eb0c3447cad86369d4de (diff) |
glPushAttrib/Pop change implementation to use a stack
The original implementation (cbd78c81268f) broke depth of field.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 976c27ee7a4..d48b6f86831 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -782,8 +782,7 @@ static void paint_draw_alpha_overlay(UnifiedPaintSettings *ups, Brush *brush, /* color means that primary brush texture is colured and secondary is used for alpha/mask control */ bool col = ELEM(mode, ePaintTextureProjective, ePaintTexture2D, ePaintVertex) ? true : false; OverlayControlFlags flags = BKE_paint_get_overlay_flags(); - GPUStateValues attribs; - gpuSaveState(&attribs, GPU_DEPTH_BUFFER_BIT | GPU_BLEND_BIT); + gpuPushAttrib(GPU_DEPTH_BUFFER_BIT | GPU_BLEND_BIT); /* coloured overlay should be drawn separately */ if (col) { @@ -801,7 +800,7 @@ static void paint_draw_alpha_overlay(UnifiedPaintSettings *ups, Brush *brush, paint_draw_cursor_overlay(ups, brush, vc, x, y, zoom); } - gpuRestoreState(&attribs); + gpuPopAttrib(); } |