diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-23 12:11:27 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-23 13:04:24 +0300 |
commit | f18e53745151eee946dcc01bc4b526994971daef (patch) | |
tree | 4694ed04ee9c9a4a509e6850ca1b65370c9a8444 /source/blender/editors/space_image/space_image.c | |
parent | 846cac94db56ec1a51dea9f9e6d3138840741952 (diff) |
Cleanup: GPU: Use explicit clear value in GPU_clear* commands
This replace `GPU_clear()` by `GPU_clear_color()` and `GPU_clear_depth()`.
Since we always set the clear value before clearing, it is unecessary
to track the clear color state.
Moreover, it makes it clearer what we clear the framebuffer to.
Diffstat (limited to 'source/blender/editors/space_image/space_image.c')
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 1f7929cea7b..a806e3e25d1 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -650,7 +650,6 @@ static void image_main_region_draw(const bContext *C, ARegion *region) GPU_framebuffer_bind(framebuffer_default); GPU_clear_color(0.0f, 0.0f, 0.0f, 0.0f); - GPU_clear(GPU_COLOR_BIT); GPU_framebuffer_bind(framebuffer_overlay); @@ -661,7 +660,6 @@ static void image_main_region_draw(const bContext *C, ARegion *region) UI_GetThemeColor3fv(TH_BACK, col); srgb_to_linearrgb_v3_v3(col, col); GPU_clear_color(col[0], col[1], col[2], 1.0f); - GPU_clear(GPU_COLOR_BIT); GPU_depth_test(GPU_DEPTH_NONE); image_user_refresh_scene(C, sima); |