diff options
author | mano-wii <germano.costa@ig.com.br> | 2020-01-27 16:29:00 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2020-01-27 16:29:00 +0300 |
commit | 2ab5ca81a5379cb99dfc134efffe070d4851d311 (patch) | |
tree | 8c07b350bfaa0ad0d7e4ede2f1944388dc6148f1 /doc/python_api | |
parent | 5c82c9bae42c2fb3bf191e0100b88ec52930b1bd (diff) |
Fix T68413: gpu module example in docs produces unexpected results
Diffstat (limited to 'doc/python_api')
-rw-r--r-- | doc/python_api/examples/gpu.5.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/python_api/examples/gpu.5.py b/doc/python_api/examples/gpu.5.py index 855f9a28e44..e05290a9442 100644 --- a/doc/python_api/examples/gpu.5.py +++ b/doc/python_api/examples/gpu.5.py @@ -4,6 +4,7 @@ Mesh with Random Vertex Colors """ import bpy import gpu +import bgl import numpy as np from random import random from gpu_extras.batch import batch_for_shader @@ -30,7 +31,9 @@ batch = batch_for_shader( def draw(): + bgl.glEnable(bgl.GL_DEPTH_TEST) batch.draw(shader) + bgl.glDisable(bgl.GL_DEPTH_TEST) bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW') |