From 3c8c9760865d14c8dffa3a4cd091e4027b1501e3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 20 Nov 2018 07:32:49 +1100 Subject: Cleanup: gpu docs --- doc/python_api/examples/gpu.6.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc/python_api/examples/gpu.6.py') diff --git a/doc/python_api/examples/gpu.6.py b/doc/python_api/examples/gpu.6.py index df28d801960..2edde46a364 100644 --- a/doc/python_api/examples/gpu.6.py +++ b/doc/python_api/examples/gpu.6.py @@ -14,11 +14,13 @@ indices = ( (0, 1, 2), (2, 1, 3)) shader = gpu.shader.from_builtin('2D_UNIFORM_COLOR') -batch = batch_for_shader(shader, 'TRIS', {"pos" : vertices}, indices=indices) +batch = batch_for_shader(shader, 'TRIS', {"pos": vertices}, indices=indices) + def draw(): shader.bind() shader.uniform_float("color", (0, 0.5, 0.5, 1.0)) batch.draw(shader) -bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL') \ No newline at end of file + +bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL') -- cgit v1.2.3