From f18e53745151eee946dcc01bc4b526994971daef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sun, 23 Aug 2020 11:11:27 +0200 Subject: 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. --- source/blender/editors/render/render_opengl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/render') diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 52a7b92217b..940ca963fc6 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -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); -- cgit v1.2.3