Py API Docs: another use case for offscreen rendering

This commit is contained in:
2018-11-12 17:53:45 +01:00
parent c34c688b47
commit 15a5cc6ca0
2 changed files with 53 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ offscreen.bind()
try:
bgl.glClear(bgl.GL_COLOR_BUFFER_BIT)
with gpu.matrix.push_pop():
# reset matrices -> use normalized device coordinates [-1, 1]
gpu.matrix.load_matrix(Matrix.Identity(4))
gpu.matrix.load_projection_matrix(Matrix.Identity(4))