diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-07-17 20:21:33 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-07-18 04:43:52 +0300 |
commit | 1f2edba1fbf39a40b07bdf37276d2650655a4edd (patch) | |
tree | 8a4421f5b3eeede0cc37cd1dde19d3c9983dfb45 /source/blender/editors | |
parent | d19b3019d9aee026b7aab738624795da162f6a8b (diff) |
Cleanup: GPU: Encapsulate scissor test
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/screen/screen_draw.c | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/screen/screen_draw.c b/source/blender/editors/screen/screen_draw.c index 3700deb8d77..1608e842376 100644 --- a/source/blender/editors/screen/screen_draw.c +++ b/source/blender/editors/screen/screen_draw.c @@ -404,7 +404,7 @@ void ED_screen_draw_edges(wmWindow *win) /* It seems that all areas gets smaller when pixelsize is > 1. * So in order to avoid missing pixels we just disable de scissors. */ if (U.pixelsize <= 1.0f) { - glEnable(GL_SCISSOR_TEST); + GPU_scissor_test(true); } UI_GetThemeColor4fv(TH_EDITOR_OUTLINE, col); @@ -429,7 +429,7 @@ void ED_screen_draw_edges(wmWindow *win) GPU_blend(false); if (U.pixelsize <= 1.0f) { - glDisable(GL_SCISSOR_TEST); + GPU_scissor_test(false); } } diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 6b32d879c8d..d0082769575 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -615,8 +615,7 @@ static bool paint_draw_tex_overlay(UnifiedPaintSettings *ups, if (load_tex(brush, vc, zoom, col, primary)) { GPU_color_mask(true, true, true, true); - GPU_depth_mask(false); - glDepthFunc(GL_ALWAYS); + GPU_depth_test(false); if (mtex->brush_map_mode == MTEX_MAP_MODE_VIEW) { GPU_matrix_push(); |