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/windowmanager/xr/intern/wm_xr_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/windowmanager/xr') diff --git a/source/blender/windowmanager/xr/intern/wm_xr_draw.c b/source/blender/windowmanager/xr/intern/wm_xr_draw.c index 6f96d2ea6a0..5630d294e8d 100644 --- a/source/blender/windowmanager/xr/intern/wm_xr_draw.c +++ b/source/blender/windowmanager/xr/intern/wm_xr_draw.c @@ -126,7 +126,7 @@ void wm_xr_draw_view(const GHOST_XrDrawViewInfo *draw_view, void *customdata) /* In case a framebuffer is still bound from drawing the last eye. */ GPU_framebuffer_restore(); /* Some systems have drawing glitches without this. */ - GPU_clear(GPU_DEPTH_BIT); + GPU_clear_depth(1.0f); /* Draws the view into the surface_data->viewport's framebuffers */ ED_view3d_draw_offscreen_simple(draw_data->depsgraph, -- cgit v1.2.3