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.
This commit is contained in:
2020-08-23 11:11:27 +02:00
parent 846cac94db
commit f18e537451
33 changed files with 30 additions and 86 deletions

View File

@@ -339,7 +339,7 @@ static void screen_opengl_render_doit(const bContext *C, OGLRender *oglrender, R
GPU_offscreen_bind(oglrender->ofs, true);
GPU_clear_color(0.0f, 0.0f, 0.0f, 0.0f);
GPU_clear(GPU_COLOR_BIT | GPU_DEPTH_BIT);
GPU_clear_depth(1.0f);
GPU_matrix_reset();
wmOrtho2(0, scene->r.xsch, 0, scene->r.ysch);