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/windowmanager/intern/wm_playanim.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/windowmanager/intern/wm_playanim.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_playanim.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c index 9d472ed4597..86d3f7f35dc 100644 --- a/source/blender/windowmanager/intern/wm_playanim.c +++ b/source/blender/windowmanager/intern/wm_playanim.c @@ -310,8 +310,7 @@ static void playanim_toscreen( CLAMP(offs_x, 0.0f, 1.0f); CLAMP(offs_y, 0.0f, 1.0f); - GPU_clear_color(0.1, 0.1, 0.1, 0.0); - GPU_clear(GPU_COLOR_BIT); + GPU_clear_color(0.1f, 0.1f, 0.1f, 0.0f); /* checkerboard for case alpha */ if (ibuf->planes == 32) { @@ -1313,8 +1312,7 @@ static char *wm_main_playanim_intern(int argc, const char **argv) maxwiny = ibuf->y * (1 + (maxwiny / ibuf->y)); } - GPU_clear_color(0.1, 0.1, 0.1, 0.0); - GPU_clear(GPU_COLOR_BIT); + GPU_clear_color(0.1f, 0.1f, 0.1f, 0.0f); int win_x, win_y; playanim_window_get_size(&win_x, &win_y); |