diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-19 23:32:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-19 23:38:20 +0300 |
commit | 3c8c9760865d14c8dffa3a4cd091e4027b1501e3 (patch) | |
tree | 50639787a78d9bc592d8235c14655bc535ca0349 /doc/python_api/examples/gpu.2.py | |
parent | 5f21030a81fa306f807be5bee8bb1df8dd93a98e (diff) |
Cleanup: gpu docs
Diffstat (limited to 'doc/python_api/examples/gpu.2.py')
-rw-r--r-- | doc/python_api/examples/gpu.2.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/python_api/examples/gpu.2.py b/doc/python_api/examples/gpu.2.py index 8188110d096..d1e8ac32589 100644 --- a/doc/python_api/examples/gpu.2.py +++ b/doc/python_api/examples/gpu.2.py @@ -8,12 +8,13 @@ from gpu_extras.batch import batch_for_shader coords = [(1, 1, 1), (-2, 0, 0), (-2, -1, 3), (0, 1, 1)] shader = gpu.shader.from_builtin('3D_UNIFORM_COLOR') -batch = batch_for_shader(shader, 'LINES', {"pos" : coords}) +batch = batch_for_shader(shader, 'LINES', {"pos": coords}) + def draw(): shader.bind() shader.uniform_float("color", (1, 1, 0, 1)) batch.draw(shader) -bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW') +bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW') |