Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/examples/gpu.5.py3
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')