From 229fe01a152124308ad8552e6b792b9ebdaeec5a Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 5 Aug 2020 11:58:29 +0200 Subject: PyDoc: use glClearColor before glClear in gpu docs ref T79491 Maniphest Tasks: T79491 Differential Revision: https://developer.blender.org/D8471 --- doc/python_api/examples/gpu.7.py | 1 + doc/python_api/examples/gpu.8.py | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/python_api/examples/gpu.7.py b/doc/python_api/examples/gpu.7.py index 56cbb93c61a..d6055898807 100644 --- a/doc/python_api/examples/gpu.7.py +++ b/doc/python_api/examples/gpu.7.py @@ -20,6 +20,7 @@ from gpu_extras.presets import draw_circle_2d offscreen = gpu.types.GPUOffScreen(512, 512) with offscreen.bind(): + bgl.glClearColor(0.0, 0.0, 0.0, 0.0) bgl.glClear(bgl.GL_COLOR_BUFFER_BIT) with gpu.matrix.push_pop(): # reset matrices -> use normalized device coordinates [-1, 1] diff --git a/doc/python_api/examples/gpu.8.py b/doc/python_api/examples/gpu.8.py index 470bd8a2dad..e67c601def9 100644 --- a/doc/python_api/examples/gpu.8.py +++ b/doc/python_api/examples/gpu.8.py @@ -25,6 +25,7 @@ RING_AMOUNT = 10 offscreen = gpu.types.GPUOffScreen(WIDTH, HEIGHT) with offscreen.bind(): + bgl.glClearColor(0.0, 0.0, 0.0, 0.0) bgl.glClear(bgl.GL_COLOR_BUFFER_BIT) with gpu.matrix.push_pop(): # reset matrices -> use normalized device coordinates [-1, 1] -- cgit v1.2.3