[Bf-blender-cvs] [229fe01a152] blender-v2.90-release: PyDoc: use glClearColor before glClear in gpu docs

Philipp Oeser noreply at git.blender.org
Wed Aug 5 14:09:36 CEST 2020


Commit: 229fe01a152124308ad8552e6b792b9ebdaeec5a
Author: Philipp Oeser
Date:   Wed Aug 5 11:58:29 2020 +0200
Branches: blender-v2.90-release
https://developer.blender.org/rB229fe01a152124308ad8552e6b792b9ebdaeec5a

PyDoc: use glClearColor before glClear in gpu docs

ref T79491

Maniphest Tasks: T79491

Differential Revision: https://developer.blender.org/D8471

===================================================================

M	doc/python_api/examples/gpu.7.py
M	doc/python_api/examples/gpu.8.py

===================================================================

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]



More information about the Bf-blender-cvs mailing list