PyDoc: use glClearColor before glClear in gpu docs
ref T79491 Maniphest Tasks: T79491 Differential Revision: https://developer.blender.org/D8471
This commit is contained in:
@@ -20,6 +20,7 @@ from gpu_extras.presets import draw_circle_2d
|
|||||||
offscreen = gpu.types.GPUOffScreen(512, 512)
|
offscreen = gpu.types.GPUOffScreen(512, 512)
|
||||||
|
|
||||||
with offscreen.bind():
|
with offscreen.bind():
|
||||||
|
bgl.glClearColor(0.0, 0.0, 0.0, 0.0)
|
||||||
bgl.glClear(bgl.GL_COLOR_BUFFER_BIT)
|
bgl.glClear(bgl.GL_COLOR_BUFFER_BIT)
|
||||||
with gpu.matrix.push_pop():
|
with gpu.matrix.push_pop():
|
||||||
# reset matrices -> use normalized device coordinates [-1, 1]
|
# reset matrices -> use normalized device coordinates [-1, 1]
|
||||||
|
@@ -25,6 +25,7 @@ RING_AMOUNT = 10
|
|||||||
offscreen = gpu.types.GPUOffScreen(WIDTH, HEIGHT)
|
offscreen = gpu.types.GPUOffScreen(WIDTH, HEIGHT)
|
||||||
|
|
||||||
with offscreen.bind():
|
with offscreen.bind():
|
||||||
|
bgl.glClearColor(0.0, 0.0, 0.0, 0.0)
|
||||||
bgl.glClear(bgl.GL_COLOR_BUFFER_BIT)
|
bgl.glClear(bgl.GL_COLOR_BUFFER_BIT)
|
||||||
with gpu.matrix.push_pop():
|
with gpu.matrix.push_pop():
|
||||||
# reset matrices -> use normalized device coordinates [-1, 1]
|
# reset matrices -> use normalized device coordinates [-1, 1]
|
||||||
|
Reference in New Issue
Block a user