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
diff options
context:
space:
mode:
Diffstat (limited to 'doc/python_api/examples/gpu.10.py')
-rw-r--r--doc/python_api/examples/gpu.10.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/python_api/examples/gpu.10.py b/doc/python_api/examples/gpu.10.py
index aa5574c44bb..6e7a3f6db6f 100644
--- a/doc/python_api/examples/gpu.10.py
+++ b/doc/python_api/examples/gpu.10.py
@@ -3,7 +3,8 @@ Rendering the 3D View into a Texture
------------------------------------
The scene has to have a camera for this example to work.
-You could also make this independent of a specific camera, but Blender does not expose good functions to create view and projection matrices yet.
+You could also make this independent of a specific camera,
+but Blender does not expose good functions to create view and projection matrices yet.
"""
import bpy
import bgl
@@ -15,6 +16,7 @@ HEIGHT = 256
offscreen = gpu.types.GPUOffScreen(WIDTH, HEIGHT)
+
def draw():
context = bpy.context
scene = context.scene
@@ -35,4 +37,5 @@ def draw():
bgl.glDisable(bgl.GL_DEPTH_TEST)
draw_texture_2d(offscreen.color_texture, (10, 10), WIDTH, HEIGHT)
-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')