[Bf-blender-cvs] [2ab5ca81a53] master: Fix T68413: gpu module example in docs produces unexpected results
mano-wii
noreply at git.blender.org
Mon Jan 27 14:29:10 CET 2020
Commit: 2ab5ca81a5379cb99dfc134efffe070d4851d311
Author: mano-wii
Date: Mon Jan 27 10:29:00 2020 -0300
Branches: master
https://developer.blender.org/rB2ab5ca81a5379cb99dfc134efffe070d4851d311
Fix T68413: gpu module example in docs produces unexpected results
===================================================================
M doc/python_api/examples/gpu.5.py
===================================================================
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')
More information about the Bf-blender-cvs
mailing list