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/doxygen/doxygen.source.h4
-rw-r--r--doc/python_api/examples/aud.py1
-rw-r--r--doc/python_api/examples/bge.texture.1.py1
-rw-r--r--doc/python_api/examples/bpy.app.handlers.py1
-rw-r--r--doc/python_api/examples/bpy.ops.1.py5
-rw-r--r--doc/python_api/examples/bpy.ops.py22
-rw-r--r--doc/python_api/examples/bpy.types.AddonPreferences.1.py3
-rw-r--r--doc/python_api/examples/bpy.types.Menu.1.py1
-rw-r--r--doc/python_api/examples/bpy.types.Menu.2.py1
-rw-r--r--doc/python_api/examples/bpy.types.Menu.py1
-rw-r--r--doc/python_api/examples/bpy.types.Mesh.py8
-rw-r--r--doc/python_api/examples/bpy.types.NodeTree.py1
-rw-r--r--doc/python_api/examples/bpy.types.Object.py1
-rw-r--r--doc/python_api/examples/bpy.types.Operator.1.py3
-rw-r--r--doc/python_api/examples/bpy.types.Operator.2.py2
-rw-r--r--doc/python_api/examples/bpy.types.Operator.3.py1
-rw-r--r--doc/python_api/examples/bpy.types.Operator.4.py1
-rw-r--r--doc/python_api/examples/bpy.types.Operator.5.py7
-rw-r--r--doc/python_api/examples/bpy.types.Operator.py1
-rw-r--r--doc/python_api/examples/bpy.types.Panel.1.py1
-rw-r--r--doc/python_api/examples/bpy.types.Panel.py1
-rw-r--r--doc/python_api/examples/bpy.types.UIList.2.py3
-rw-r--r--doc/python_api/examples/bpy.types.bpy_struct.keyframe_insert.1.py2
-rw-r--r--doc/python_api/examples/gpu.offscreen.1.py192
-rw-r--r--doc/python_api/rst/bge.logic.rst25
-rw-r--r--doc/python_api/rst/bge.render.rst61
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_CharacterWrapper.rst2
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst13
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst16
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_WorldInfo.rst6
-rw-r--r--doc/python_api/rst/bgl.rst292
-rw-r--r--doc/python_api/rst/gpu.rst486
-rw-r--r--doc/python_api/rst/info_gotcha.rst10
-rw-r--r--doc/python_api/rst/info_quickstart.rst2
-rw-r--r--doc/python_api/rst/info_tips_and_tricks.rst4
-rw-r--r--doc/python_api/rst_from_bmesh_opdefines.py3
-rw-r--r--doc/python_api/sphinx_doc_gen.py24
37 files changed, 830 insertions, 378 deletions
diff --git a/doc/doxygen/doxygen.source.h b/doc/doxygen/doxygen.source.h
index 1a77a374009..3ef20466664 100644
--- a/doc/doxygen/doxygen.source.h
+++ b/doc/doxygen/doxygen.source.h
@@ -94,6 +94,10 @@
/** \defgroup blender Blender */
+/** \defgroup blt BlenTranslation
+ * \ingroup blender
+ */
+
/** \defgroup blf BlenFont
* \ingroup blender
*/
diff --git a/doc/python_api/examples/aud.py b/doc/python_api/examples/aud.py
index 2c74d6a0eb1..bbe97168efe 100644
--- a/doc/python_api/examples/aud.py
+++ b/doc/python_api/examples/aud.py
@@ -1,6 +1,7 @@
"""
Basic Sound Playback
++++++++++++++++++++
+
This script shows how to use the classes: :class:`Device`, :class:`Factory` and
:class:`Handle`.
"""
diff --git a/doc/python_api/examples/bge.texture.1.py b/doc/python_api/examples/bge.texture.1.py
index bee1f251afa..732c786c667 100644
--- a/doc/python_api/examples/bge.texture.1.py
+++ b/doc/python_api/examples/bge.texture.1.py
@@ -1,6 +1,7 @@
"""
Texture Replacement
+++++++++++++++++++
+
Example of how to replace a texture in game with an external image.
``createTexture()`` and ``removeTexture()`` are to be called from a
module Python Controller.
diff --git a/doc/python_api/examples/bpy.app.handlers.py b/doc/python_api/examples/bpy.app.handlers.py
index 57b209e15f0..078f9df77f2 100644
--- a/doc/python_api/examples/bpy.app.handlers.py
+++ b/doc/python_api/examples/bpy.app.handlers.py
@@ -1,6 +1,7 @@
"""
Basic Handler Example
+++++++++++++++++++++
+
This script shows the most simple example of adding a handler.
"""
diff --git a/doc/python_api/examples/bpy.ops.1.py b/doc/python_api/examples/bpy.ops.1.py
index a00dbdafb90..b4137e5c740 100644
--- a/doc/python_api/examples/bpy.ops.1.py
+++ b/doc/python_api/examples/bpy.ops.1.py
@@ -7,8 +7,9 @@ act on specified rather than the selected or active data, or to execute an
operator in the different part of the user interface.
The context overrides are passed as a dictionary, with keys matching the context
-member names in bpy.context. For example to override bpy.context.active_object,
-you would pass {'active_object': object}.
+member names in bpy.context.
+For example to override ``bpy.context.active_object``,
+you would pass ``{'active_object': object}``.
"""
# remove all objects in scene rather than the selected ones
diff --git a/doc/python_api/examples/bpy.ops.py b/doc/python_api/examples/bpy.ops.py
index 9964ad915bf..76c494ad4f5 100644
--- a/doc/python_api/examples/bpy.ops.py
+++ b/doc/python_api/examples/bpy.ops.py
@@ -3,21 +3,21 @@ Calling Operators
-----------------
Provides python access to calling operators, this includes operators written in
-C, Python or Macros.
+C, Python or macros.
Only keyword arguments can be used to pass operator properties.
-Operators don't have return values as you might expect, instead they return a
-set() which is made up of: {'RUNNING_MODAL', 'CANCELLED', 'FINISHED',
-'PASS_THROUGH'}.
-Common return values are {'FINISHED'} and {'CANCELLED'}.
+Operators don't have return values as you might expect,
+instead they return a set() which is made up of:
+``{'RUNNING_MODAL', 'CANCELLED', 'FINISHED', 'PASS_THROUGH'}``.
+Common return values are ``{'FINISHED'}`` and ``{'CANCELLED'}``.
-Calling an operator in the wrong context will raise a RuntimeError,
+Calling an operator in the wrong context will raise a ``RuntimeError``,
there is a poll() method to avoid this problem.
-Note that the operator ID (bl_idname) in this example is 'mesh.subdivide',
-'bpy.ops' is just the access path for python.
+Note that the operator ID (bl_idname) in this example is ``mesh.subdivide``,
+``bpy.ops`` is just the access path for python.
Keywords and Positional Arguments
@@ -32,9 +32,9 @@ There are 3 optional positional arguments (documented in detail below).
bpy.ops.test.operator(override_context, execution_context, undo)
-* override_context - dict type
-* execution_context - string (enum)
-* undo - boolean
+- override_context - ``dict`` type.
+- execution_context - ``str`` (enum).
+- undo - ``bool`` type.
Each of these arguments is optional, but must be given in the order above.
diff --git a/doc/python_api/examples/bpy.types.AddonPreferences.1.py b/doc/python_api/examples/bpy.types.AddonPreferences.1.py
index 73f90acb3fa..7a065dbf6a5 100644
--- a/doc/python_api/examples/bpy.types.AddonPreferences.1.py
+++ b/doc/python_api/examples/bpy.types.AddonPreferences.1.py
@@ -8,7 +8,8 @@ bl_info = {
"warning": "",
"wiki_url": "",
"tracker_url": "",
- "category": "Object"}
+ "category": "Object",
+ }
import bpy
diff --git a/doc/python_api/examples/bpy.types.Menu.1.py b/doc/python_api/examples/bpy.types.Menu.1.py
index e82bf398e35..8ccc1123c35 100644
--- a/doc/python_api/examples/bpy.types.Menu.1.py
+++ b/doc/python_api/examples/bpy.types.Menu.1.py
@@ -1,6 +1,7 @@
"""
Submenus
++++++++
+
This menu demonstrates some different functions.
"""
import bpy
diff --git a/doc/python_api/examples/bpy.types.Menu.2.py b/doc/python_api/examples/bpy.types.Menu.2.py
index 26409f12f45..86288b5b1c5 100644
--- a/doc/python_api/examples/bpy.types.Menu.2.py
+++ b/doc/python_api/examples/bpy.types.Menu.2.py
@@ -1,6 +1,7 @@
"""
Extending Menus
+++++++++++++++
+
When creating menus for addons you can't reference menus in Blender's default
scripts.
Instead, the addon can add menu items to existing menus.
diff --git a/doc/python_api/examples/bpy.types.Menu.py b/doc/python_api/examples/bpy.types.Menu.py
index e10e44f108e..c2162444055 100644
--- a/doc/python_api/examples/bpy.types.Menu.py
+++ b/doc/python_api/examples/bpy.types.Menu.py
@@ -1,6 +1,7 @@
"""
Basic Menu Example
++++++++++++++++++
+
Here is an example of a simple menu. Menus differ from panels in that they must
reference from a header, panel or another menu.
diff --git a/doc/python_api/examples/bpy.types.Mesh.py b/doc/python_api/examples/bpy.types.Mesh.py
index 19ccd177d64..68cc42ec6bf 100644
--- a/doc/python_api/examples/bpy.types.Mesh.py
+++ b/doc/python_api/examples/bpy.types.Mesh.py
@@ -7,10 +7,10 @@ for more flexible mesh editing from python see :mod:`bmesh`.
Blender stores 4 main arrays to define mesh geometry.
-* :class:`Mesh.vertices` (3 points in space)
-* :class:`Mesh.edges` (reference 2 vertices)
-* :class:`Mesh.loops` (reference a single vertex and edge)
-* :class:`Mesh.polygons`: (reference a range of loops)
+- :class:`Mesh.vertices` (3 points in space)
+- :class:`Mesh.edges` (reference 2 vertices)
+- :class:`Mesh.loops` (reference a single vertex and edge)
+- :class:`Mesh.polygons`: (reference a range of loops)
Each polygon reference a slice in the loop array, this way, polygons do not store vertices or corner data such as UV's directly,
diff --git a/doc/python_api/examples/bpy.types.NodeTree.py b/doc/python_api/examples/bpy.types.NodeTree.py
index 401b3a01ae0..da2986636ea 100644
--- a/doc/python_api/examples/bpy.types.NodeTree.py
+++ b/doc/python_api/examples/bpy.types.NodeTree.py
@@ -1,6 +1,7 @@
"""
Poll Function
+++++++++++++++
+
The :class:`NodeTree.poll` function determines if a node tree is visible
in the given context (similar to how :class:`Panel.poll`
and :class:`Menu.poll` define visibility). If it returns False,
diff --git a/doc/python_api/examples/bpy.types.Object.py b/doc/python_api/examples/bpy.types.Object.py
index 2ddce248a5b..90c50bcfad7 100644
--- a/doc/python_api/examples/bpy.types.Object.py
+++ b/doc/python_api/examples/bpy.types.Object.py
@@ -1,6 +1,7 @@
"""
Basic Object Operations Example
+++++++++++++++++++++++++++++++
+
This script demonstrates basic operations on object like creating new
object, placing it into scene, selecting it and making it active.
"""
diff --git a/doc/python_api/examples/bpy.types.Operator.1.py b/doc/python_api/examples/bpy.types.Operator.1.py
index fc016508d39..1ba13c040ba 100644
--- a/doc/python_api/examples/bpy.types.Operator.1.py
+++ b/doc/python_api/examples/bpy.types.Operator.1.py
@@ -1,6 +1,7 @@
"""
Invoke Function
+++++++++++++++
+
:class:`Operator.invoke` is used to initialize the operator from the context
at the moment the operator is called.
invoke() is typically used to assign properties which are then used by
@@ -31,7 +32,7 @@ class SimpleMouseOperator(bpy.types.Operator):
y = bpy.props.IntProperty()
def execute(self, context):
- # rather then printing, use the report function,
+ # rather than printing, use the report function,
# this way the message appears in the header,
self.report({'INFO'}, "Mouse coords are %d %d" % (self.x, self.y))
return {'FINISHED'}
diff --git a/doc/python_api/examples/bpy.types.Operator.2.py b/doc/python_api/examples/bpy.types.Operator.2.py
index 39ff5caae8a..e2f9a3a84c4 100644
--- a/doc/python_api/examples/bpy.types.Operator.2.py
+++ b/doc/python_api/examples/bpy.types.Operator.2.py
@@ -4,7 +4,7 @@ Calling a File Selector
This example shows how an operator can use the file selector.
Notice the invoke function calls a window manager method and returns
-RUNNING_MODAL, this means the file selector stays open and the operator does not
+``{'RUNNING_MODAL'}``, this means the file selector stays open and the operator does not
exit immediately after invoke finishes.
The file selector runs the operator, calling :class:`Operator.execute` when the
diff --git a/doc/python_api/examples/bpy.types.Operator.3.py b/doc/python_api/examples/bpy.types.Operator.3.py
index 7fdccd81379..d59c816319d 100644
--- a/doc/python_api/examples/bpy.types.Operator.3.py
+++ b/doc/python_api/examples/bpy.types.Operator.3.py
@@ -1,6 +1,7 @@
"""
Dialog Box
++++++++++
+
This operator uses its :class:`Operator.invoke` function to call a popup.
"""
import bpy
diff --git a/doc/python_api/examples/bpy.types.Operator.4.py b/doc/python_api/examples/bpy.types.Operator.4.py
index 885ed857842..e5bc6e5c70d 100644
--- a/doc/python_api/examples/bpy.types.Operator.4.py
+++ b/doc/python_api/examples/bpy.types.Operator.4.py
@@ -1,6 +1,7 @@
"""
Custom Drawing
++++++++++++++
+
By default operator properties use an automatic user interface layout.
If you need more control you can create your own layout with a
:class:`Operator.draw` function.
diff --git a/doc/python_api/examples/bpy.types.Operator.5.py b/doc/python_api/examples/bpy.types.Operator.5.py
index 78030c7d7c4..310eeceadf3 100644
--- a/doc/python_api/examples/bpy.types.Operator.5.py
+++ b/doc/python_api/examples/bpy.types.Operator.5.py
@@ -1,8 +1,9 @@
"""
Modal Execution
+++++++++++++++
+
This operator defines a :class:`Operator.modal` function which running,
-handling events until it returns {'FINISHED'} or {'CANCELLED'}.
+handling events until it returns ``{'FINISHED'}`` or ``{'CANCELLED'}``.
Grab, Rotate, Scale and Fly-Mode are examples of modal operators.
They are especially useful for interactive tools,
@@ -10,9 +11,9 @@ your operator can have its own state where keys toggle options as the operator
runs.
:class:`Operator.invoke` is used to initialize the operator as being by
-returning {'RUNNING_MODAL'}, initializing the modal loop.
+returning ``{'RUNNING_MODAL'}``, initializing the modal loop.
-Notice __init__() and __del__() are declared.
+Notice ``__init__()`` and ``__del__()`` are declared.
For other operator types they are not useful but for modal operators they will
be called before the :class:`Operator.invoke` and after the operator finishes.
"""
diff --git a/doc/python_api/examples/bpy.types.Operator.py b/doc/python_api/examples/bpy.types.Operator.py
index 0981712e1ff..4baa9380aa6 100644
--- a/doc/python_api/examples/bpy.types.Operator.py
+++ b/doc/python_api/examples/bpy.types.Operator.py
@@ -1,6 +1,7 @@
"""
Basic Operator Example
++++++++++++++++++++++
+
This script shows simple operator which prints a message.
Since the operator only has an :class:`Operator.execute` function it takes no
diff --git a/doc/python_api/examples/bpy.types.Panel.1.py b/doc/python_api/examples/bpy.types.Panel.1.py
index fbcdae8baeb..13a9f53fa7b 100644
--- a/doc/python_api/examples/bpy.types.Panel.1.py
+++ b/doc/python_api/examples/bpy.types.Panel.1.py
@@ -1,6 +1,7 @@
"""
Simple Object Panel
+++++++++++++++++++
+
This panel has a :class:`Panel.poll` and :class:`Panel.draw_header` function,
even though the contents is basic this closely resembles blenders panels.
"""
diff --git a/doc/python_api/examples/bpy.types.Panel.py b/doc/python_api/examples/bpy.types.Panel.py
index 1f64b953786..98187832b56 100644
--- a/doc/python_api/examples/bpy.types.Panel.py
+++ b/doc/python_api/examples/bpy.types.Panel.py
@@ -1,6 +1,7 @@
"""
Basic Panel Example
+++++++++++++++++++
+
This script is a simple panel which will draw into the object properties
section.
diff --git a/doc/python_api/examples/bpy.types.UIList.2.py b/doc/python_api/examples/bpy.types.UIList.2.py
index feed263b2e7..a02a0530a66 100644
--- a/doc/python_api/examples/bpy.types.UIList.2.py
+++ b/doc/python_api/examples/bpy.types.UIList.2.py
@@ -1,7 +1,8 @@
"""
Advanced UIList Example - Filtering and Reordering
++++++++++++++++++++++++++++++++++++++++++++++++++
-This script is an extended version of the UIList subclass used to show vertex groups. It is not used 'as is',
+
+This script is an extended version of the ``UIList`` subclass used to show vertex groups. It is not used 'as is',
because iterating over all vertices in a 'draw' function is a very bad idea for UI performances! However, it's a good
example of how to create/use filtering/reordering callbacks.
"""
diff --git a/doc/python_api/examples/bpy.types.bpy_struct.keyframe_insert.1.py b/doc/python_api/examples/bpy.types.bpy_struct.keyframe_insert.1.py
index faf3b121ec6..6889fe75277 100644
--- a/doc/python_api/examples/bpy.types.bpy_struct.keyframe_insert.1.py
+++ b/doc/python_api/examples/bpy.types.bpy_struct.keyframe_insert.1.py
@@ -1,7 +1,7 @@
"""
Note that when keying data paths which contain nested properties this must be
done from the :class:`ID` subclass, in this case the :class:`Armature` rather
-then the bone.
+than the bone.
"""
import bpy
diff --git a/doc/python_api/examples/gpu.offscreen.1.py b/doc/python_api/examples/gpu.offscreen.1.py
new file mode 100644
index 00000000000..06f0d915361
--- /dev/null
+++ b/doc/python_api/examples/gpu.offscreen.1.py
@@ -0,0 +1,192 @@
+# Draws an off-screen buffer and display it in the corner of the view.
+import bpy
+from bgl import *
+
+
+class OffScreenDraw(bpy.types.Operator):
+ bl_idname = "view3d.offscreen_draw"
+ bl_label = "View3D Offscreen Draw"
+
+ _handle_calc = None
+ _handle_draw = None
+ is_enabled = False
+
+ # manage draw handler
+ @staticmethod
+ def draw_callback_px(self, context):
+ scene = context.scene
+ aspect_ratio = scene.render.resolution_x / scene.render.resolution_y
+
+ self._update_offscreen(context, self._offscreen)
+ self._opengl_draw(context, self._texture, aspect_ratio, 0.2)
+
+ @staticmethod
+ def handle_add(self, context):
+ OffScreenDraw._handle_draw = bpy.types.SpaceView3D.draw_handler_add(
+ self.draw_callback_px, (self, context),
+ 'WINDOW', 'POST_PIXEL',
+ )
+
+ @staticmethod
+ def handle_remove():
+ if OffScreenDraw._handle_draw is not None:
+ bpy.types.SpaceView3D.draw_handler_remove(OffScreenDraw._handle_draw, 'WINDOW')
+
+ OffScreenDraw._handle_draw = None
+
+ # off-screen buffer
+ @staticmethod
+ def _setup_offscreen(context):
+ import gpu
+ scene = context.scene
+ aspect_ratio = scene.render.resolution_x / scene.render.resolution_y
+
+ try:
+ offscreen = gpu.offscreen.new(512, int(512 / aspect_ratio))
+ except Exception as e:
+ print(e)
+ offscreen = None
+
+ return offscreen
+
+ @staticmethod
+ def _update_offscreen(context, offscreen):
+ scene = context.scene
+ render = scene.render
+ camera = scene.camera
+
+ modelview_matrix = camera.matrix_world.inverted()
+ projection_matrix = camera.calc_matrix_camera(
+ render.resolution_x,
+ render.resolution_y,
+ render.pixel_aspect_x,
+ render.pixel_aspect_y,
+ )
+
+
+ offscreen.draw_view3d(
+ scene,
+ context.space_data,
+ context.region,
+ projection_matrix,
+ modelview_matrix,
+ )
+
+ @staticmethod
+ def _opengl_draw(context, texture, aspect_ratio, scale):
+ """
+ OpenGL code to draw a rectangle in the viewport
+ """
+
+ glDisable(GL_DEPTH_TEST)
+
+ # view setup
+ glMatrixMode(GL_PROJECTION)
+ glPushMatrix()
+ glLoadIdentity()
+
+ glMatrixMode(GL_MODELVIEW)
+ glPushMatrix()
+ glLoadIdentity()
+
+ glOrtho(-1, 1, -1, 1, -15, 15)
+ gluLookAt(0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0)
+
+ act_tex = Buffer(GL_INT, 1)
+ glGetIntegerv(GL_TEXTURE_2D, act_tex)
+
+ viewport = Buffer(GL_INT, 4)
+ glGetIntegerv(GL_VIEWPORT, viewport)
+
+ width = int(scale * viewport[2])
+ height = int(width / aspect_ratio)
+
+ glViewport(viewport[0], viewport[1], width, height)
+ glScissor(viewport[0], viewport[1], width, height)
+
+ # draw routine
+ glEnable(GL_TEXTURE_2D)
+ glActiveTexture(GL_TEXTURE0)
+
+ glBindTexture(GL_TEXTURE_2D, texture)
+
+ texco = [(1, 1), (0, 1), (0, 0), (1, 0)]
+ verco = [(1.0, 1.0), (-1.0, 1.0), (-1.0, -1.0), (1.0, -1.0)]
+
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)
+
+ glColor4f(1.0, 1.0, 1.0, 1.0)
+
+ glBegin(GL_QUADS)
+ for i in range(4):
+ glTexCoord3f(texco[i][0], texco[i][1], 0.0)
+ glVertex2f(verco[i][0], verco[i][1])
+ glEnd()
+
+ # restoring settings
+ glBindTexture(GL_TEXTURE_2D, act_tex[0])
+
+ glDisable(GL_TEXTURE_2D)
+
+ # reset view
+ glMatrixMode(GL_PROJECTION)
+ glPopMatrix()
+
+ glMatrixMode(GL_MODELVIEW)
+ glPopMatrix()
+
+ glViewport(viewport[0], viewport[1], viewport[2], viewport[3])
+ glScissor(viewport[0], viewport[1], viewport[2], viewport[3])
+
+ # operator functions
+ @classmethod
+ def poll(cls, context):
+ return context.area.type == 'VIEW_3D'
+
+ def modal(self, context, event):
+ if context.area:
+ context.area.tag_redraw()
+
+ return {'PASS_THROUGH'}
+
+ def invoke(self, context, event):
+ if OffScreenDraw.is_enabled:
+ self.cancel(context)
+
+ return {'FINISHED'}
+
+ else:
+ self._offscreen = OffScreenDraw._setup_offscreen(context)
+ if self._offscreen:
+ self._texture = self._offscreen.color_texture
+ else:
+ self.report({'ERROR'}, "Error initializing offscreen buffer. More details in the console")
+ return {'CANCELLED'}
+
+ OffScreenDraw.handle_add(self, context)
+ OffScreenDraw.is_enabled = True
+
+ if context.area:
+ context.area.tag_redraw()
+
+ context.window_manager.modal_handler_add(self)
+ return {'RUNNING_MODAL'}
+
+ def cancel(self, context):
+ OffScreenDraw.handle_remove()
+ OffScreenDraw.is_enabled = False
+
+ if context.area:
+ context.area.tag_redraw()
+
+
+def register():
+ bpy.utils.register_class(OffScreenDraw)
+
+
+def unregister():
+ bpy.utils.unregister_class(OffScreenDraw)
+
+
+if __name__ == "__main__":
+ register()
diff --git a/doc/python_api/rst/bge.logic.rst b/doc/python_api/rst/bge.logic.rst
index ab1f647f7c8..b119bdd1ba1 100644
--- a/doc/python_api/rst/bge.logic.rst
+++ b/doc/python_api/rst/bge.logic.rst
@@ -258,7 +258,8 @@ General functions
Sets the world gravity.
- :type gravity: list [fx, fy, fz]
+ :arg gravity: gravity vector
+ :type gravity: Vector((fx, fy, fz))
.. function:: getSpectrum()
@@ -337,6 +338,28 @@ General functions
.. warning: Not implimented yet
+.. function:: getAnimRecordFrame()
+
+ Gets the current frame number used for recording animations. This
+ number is incremented automatically by Blender when the "Record
+ animation" feature is turned on.
+
+ :rtype: int
+
+.. function:: setAnimRecordFrame(framenr)
+
+ Sets the current frame number used for recording animations. This
+ number is automatically incremented by Blender when the "Record
+ animation" feature is turned on.
+
+ The frame number Must be non-negative, unless Blender has
+ :attr:`bpy.types.UserPreferencesEdit.use_negative_frames` enabled
+ in its user preferences. Only use non-negative numbers to be on
+ the safe side, unless you know what you are doing.
+
+ :arg framenr: The new frame number.
+ :type framenr: int
+
.. function:: getExitKey()
Gets the key used to exit the game engine
diff --git a/doc/python_api/rst/bge.render.rst b/doc/python_api/rst/bge.render.rst
index 1748ae14fc8..3b565e294dd 100644
--- a/doc/python_api/rst/bge.render.rst
+++ b/doc/python_api/rst/bge.render.rst
@@ -8,7 +8,8 @@ Intro
.. module:: bge.render
-Example of using a :class:`bge.types.SCA_MouseSensor`, and two :class:`bge.types.KX_ObjectActuator` to implement MouseLook:
+Example of using a :class:`bge.types.SCA_MouseSensor`,
+and two :class:`bge.types.KX_ObjectActuator` to implement MouseLook:
.. note::
This can also be achieved with the :class:`bge.types.KX_MouseActuator`.
@@ -77,7 +78,9 @@ Constants
.. DATA:: VSYNC_ADAPTIVE
- Enables adaptive vsync if supported. Adaptive vsync enables vsync if the framerate is above the monitors refresh rate. Otherwise, vsync is diabled if the framerate is too low.
+ Enables adaptive vsync if supported.
+ Adaptive vsync enables vsync if the framerate is above the monitors refresh rate.
+ Otherwise, vsync is diabled if the framerate is too low.
.. data:: LEFT_EYE
@@ -108,40 +111,55 @@ Functions
Set the width and height of the window (in pixels). This also works for fullscreen applications.
+ .. note:: Only works in the standalone player, not the Blender-embedded player.
+
+ :arg width: width in pixels
:type width: integer
+ :arg height: height in pixels
:type height: integer
.. function:: setFullScreen(enable)
Set whether or not the window should be fullscreen.
+ .. note:: Only works in the standalone player, not the Blender-embedded player.
+
+ :arg enable: ``True`` to set full screen, ``False`` to set windowed.
:type enable: bool
.. function:: getFullScreen()
Returns whether or not the window is fullscreen.
+ .. note:: Only works in the standalone player, not the Blender-embedded player; there it always returns False.
+
:rtype: bool
.. function:: getDisplayDimensions()
- Get the actual display dimensions, in pixels, of the physical display (e.g., the monitor).
+ Get the display dimensions, in pixels, of the display (e.g., the
+ monitor). Can return the size of the entire view, so the
+ combination of all monitors; for example, ``(3840, 1080)`` for two
+ side-by-side 1080p monitors.
- :type dimension: list [width,heigh]
+ :rtype: tuple (width, height)
.. function:: makeScreenshot(filename)
Writes an image file with the current displayed frame.
- The image is written to *'filename'*. The path may be absolute (eg. "/home/foo/image") or relative when started with
- "//" (eg. "//image"). Note that absolute paths are not portable between platforms.
- If the filename contains a "#", it will be replaced by an incremental index so that screenshots can be taken multiple
- times without overwriting the previous ones (eg. "image-#").
+ The image is written to *'filename'*.
+ The path may be absolute (eg. ``/home/foo/image``) or relative when started with
+ ``//`` (eg. ``//image``). Note that absolute paths are not portable between platforms.
+ If the filename contains a ``#``,
+ it will be replaced by an incremental index so that screenshots can be taken multiple
+ times without overwriting the previous ones (eg. ``image-#``).
- Settings for the image are taken from the render settings (file format and respective settings, gamma and colospace
- conversion, etc). The image resolution matches the framebuffer, meaning, the window size and aspect ratio.
- When running from the standalone player, instead of the embedded player, only PNG files are supported. Additional
- color conversions are also not supported.
+ Settings for the image are taken from the render settings (file format and respective settings,
+ gamma and colospace conversion, etc).
+ The image resolution matches the framebuffer, meaning, the window size and aspect ratio.
+ When running from the standalone player, instead of the embedded player, only PNG files are supported.
+ Additional color conversions are also not supported.
:arg filename: path and name of the file to write
:type filename: string
@@ -149,13 +167,14 @@ Functions
.. function:: enableVisibility(visible)
- Doesn't really do anything...
+ Deprecated; doesn't do anything.
.. function:: showMouse(visible)
Enables or disables the operating system mouse cursor.
+ :arg visible:
:type visible: boolean
@@ -163,15 +182,15 @@ Functions
Sets the mouse cursor position.
+ :arg x: X-coordinate in screen pixel coordinates.
:type x: integer
+ :arg y: Y-coordinate in screen pixel coordinates.
:type y: integer
.. function:: setBackgroundColor(rgba)
- Sets the window background color. (Deprecated: use KX_WorldInfo.background_color)
-
- :type rgba: list [r, g, b, a]
+ Deprecated and no longer functional. Use :py:meth:`bge.types.KX_WorldInfo.backgroundColor` instead.
.. function:: setEyeSeparation(eyesep)
@@ -215,6 +234,7 @@ Functions
Set the material mode to use for OpenGL rendering.
+ :arg mode: material mode
:type mode: KX_TEXFACE_MATERIAL, KX_BLENDER_MULTITEX_MATERIAL, KX_BLENDER_GLSL_MATERIAL
.. note:: Changes will only affect newly created scenes.
@@ -231,14 +251,17 @@ Functions
Enables or disables a GLSL material setting.
+ :arg setting:
:type setting: string (lights, shaders, shadows, ramps, nodes, extra_textures)
+ :arg enable:
:type enable: boolean
-.. function:: getGLSLMaterialSetting(setting, enable)
+.. function:: getGLSLMaterialSetting(setting)
Get the state of a GLSL material setting.
+ :arg setting:
:type setting: string (lights, shaders, shadows, ramps, nodes, extra_textures)
:rtype: boolean
@@ -299,24 +322,28 @@ Functions
Show or hide the framerate.
+ :arg enable:
:type enable: boolean
.. function:: showProfile(enable)
Show or hide the profile.
+ :arg enable:
:type enable: boolean
.. function:: showProperties(enable)
Show or hide the debug properties.
+ :arg enable:
:type enable: boolean
.. function:: autoDebugList(enable)
Enable or disable auto adding debug properties to the debug list.
+ :arg enable:
:type enable: boolean
.. function:: clearDebugList()
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_CharacterWrapper.rst b/doc/python_api/rst/bge_types/bge.types.KX_CharacterWrapper.rst
index e326892a824..adff6e0a2ad 100644
--- a/doc/python_api/rst/bge_types/bge.types.KX_CharacterWrapper.rst
+++ b/doc/python_api/rst/bge_types/bge.types.KX_CharacterWrapper.rst
@@ -25,7 +25,7 @@ base class --- :class:`PyObjectPlus`
The maximum number of jumps a character can perform before having to touch the ground. By default this is set to 1. 2 allows for a double jump, etc.
- :type: int
+ :type: int in [0, 255], default 1
.. attribute:: jumpCount
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst b/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst
index 59bd836d90e..d9f03395c34 100644
--- a/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst
+++ b/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst
@@ -133,10 +133,11 @@ base class --- :class:`PyObjectPlus`
Returns the contraint type (read only)
:type: integer
- - 1 = :class:`~bge.constraints.POINTTOPOINT_CONSTRAINT`
- - 2 = :class:`~bge.constraints.LINEHINGE_CONSTRAINT`
- - 3 = :class:`~bge.constraints.ANGULAR_CONSTRAINT`
- - 4 = :class:`~bge.constraints.CONETWIST_CONSTRAINT`
- - 11 = :class:`~bge.constraints.VEHICLE_CONSTRAINT`
- - 12 = :class:`~bge.constraints.GENERIC_6DOF_CONSTRAINT`
+
+ - :class:`~bge.constraints.POINTTOPOINT_CONSTRAINT`
+ - :class:`~bge.constraints.LINEHINGE_CONSTRAINT`
+ - :class:`~bge.constraints.ANGULAR_CONSTRAINT`
+ - :class:`~bge.constraints.CONETWIST_CONSTRAINT`
+ - :class:`~bge.constraints.VEHICLE_CONSTRAINT`
+ - :class:`~bge.constraints.GENERIC_6DOF_CONSTRAINT`
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst b/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
index a24aa546cb9..d8cc5e45e83 100644
--- a/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
+++ b/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
@@ -137,7 +137,7 @@ base class --- :class:`SCA_IObject`
.. note::
- A value of 0.0 disables this option (rather then setting it stationary).
+ A value of 0.0 disables this option (rather than setting it stationary).
.. attribute:: angularVelocityMin
@@ -799,7 +799,7 @@ base class --- :class:`SCA_IObject`
:return: the first object hit or None if no object or object does not match prop
:rtype: :class:`KX_GameObject`
- .. method:: rayCast(objto, objfrom, dist, prop, face, xray, poly)
+ .. method:: rayCast(objto, objfrom, dist, prop, face, xray, poly, mask)
Look from a point/object to another point/object and find first object hit within dist that matches prop.
if poly is 0, returns a 3-tuple with object reference, hit point and hit normal or (None, None, None) if no hit.
@@ -851,6 +851,8 @@ base class --- :class:`SCA_IObject`
* 2: return value is a 5-tuple and the 5th element is a 2-tuple (u, v) with the UV mapping of the hit point or None if no hit, or the object doesn't use a mesh collision shape, or doesn't have a UV mapping.
:type poly: integer
+ :arg mask: collision mask: The collision mask (16 layers mapped to a 16-bit integer) is combined with each object's collision group, to hit only a subset of the objects in the scene. Only those objects for which ``collisionGroup & mask`` is true can be hit.
+ :type mask: bitfield
:return: (object, hitpoint, hitnormal) or (object, hitpoint, hitnormal, polygon) or (object, hitpoint, hitnormal, polygon, hituv).
* object, hitpoint and hitnormal are None if no hit.
@@ -972,6 +974,16 @@ base class --- :class:`SCA_IObject`
:return: The current frame of the action
:rtype: float
+ .. method:: getActionName(layer=0)
+
+ Gets the name of the current action playing in the supplied layer.
+
+ :arg layer: The layer that you want to get the action name from.
+ :type layer: integer
+
+ :return: The name of the current action
+ :rtype: string
+
.. method:: setActionFrame(frame, layer=0)
Set the current frame of the action playing in the supplied layer.
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_WorldInfo.rst b/doc/python_api/rst/bge_types/bge.types.KX_WorldInfo.rst
index a636af4f083..1501d85b86c 100644
--- a/doc/python_api/rst/bge_types/bge.types.KX_WorldInfo.rst
+++ b/doc/python_api/rst/bge_types/bge.types.KX_WorldInfo.rst
@@ -63,17 +63,17 @@ base class --- :class:`PyObjectPlus`
The color of the mist. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
Mist and background color sould always set to the same color.
- :type: :class:`mathutils.Vector`
+ :type: :class:`mathutils.Color`
.. attribute:: backgroundColor
The color of the background. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
Mist and background color sould always set to the same color.
- :type: :class:`mathutils.Vector`
+ :type: :class:`mathutils.Color`
.. attribute:: ambientColor
The color of the ambient light. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
- :type: :class:`mathutils.Vector`
+ :type: :class:`mathutils.Color`
diff --git a/doc/python_api/rst/bgl.rst b/doc/python_api/rst/bgl.rst
index 67d0c59aa32..8b0ad63abb4 100644
--- a/doc/python_api/rst/bgl.rst
+++ b/doc/python_api/rst/bgl.rst
@@ -12,8 +12,12 @@ contents: dir(bgl). A simple search on the web can point to more
than enough material to teach OpenGL programming, from books to many
collections of tutorials.
-Here is a comprehensive `list of books <http://www.opengl.org/documentation/books/>`_ (non free). The `arcsynthesis tutorials <http://www.arcsynthesis.org/gltut/>`_ is one of the best resources to learn modern OpenGL and `g-truc <http://www.g-truc.net/post-tech-content-sample.html>`_ offers a set of extensive examples, including advanced features.
-
+Here is a comprehensive `list of books <http://www.opengl.org/documentation/books/>`__ (non free).
+The `arcsynthesis tutorials <http://www.arcsynthesis.org/gltut/>`__
+is one of the best resources to learn modern OpenGL and
+`g-truc <http://www.g-truc.net/post-tech-content-sample.html>`__
+offers a set of extensive examples, including advanced features.
+
.. note::
You can use the :class:`Image` type to load and set textures.
@@ -25,7 +29,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Operate on the accumulation buffer.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glAccum.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glAccum.xml>`__
:type op: Enumerated constant
:arg op: The accumulation buffer operation.
@@ -37,7 +41,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify the alpha test function.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glAlphaFunc.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glAlphaFunc.xml>`__
:type func: Enumerated constant
:arg func: Specifies the alpha comparison function.
@@ -50,7 +54,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Determine if textures are loaded in texture memory
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glAreTexturesResident.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glAreTexturesResident.xml>`__
:type n: int
:arg n: Specifies the number of textures to be queried.
@@ -66,7 +70,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Delimit the vertices of a primitive or a group of like primatives
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glBegin.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glBegin.xml>`__
:type mode: Enumerated constant
:arg mode: Specifies the primitive that will be create from vertices between
@@ -77,7 +81,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Bind a named texture to a texturing target
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glBindTexture.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glBindTexture.xml>`__
:type target: Enumerated constant
:arg target: Specifies the target to which the texture is bound.
@@ -89,7 +93,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Draw a bitmap
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glBitmap.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glBitmap.xml>`__
:type width, height: int
:arg width, height: Specify the pixel width and height of the bitmap image.
@@ -107,7 +111,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify pixel arithmetic
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glBlendFunc.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glBlendFunc.xml>`__
:type sfactor: Enumerated constant
:arg sfactor: Specifies how the red, green, blue, and alpha source blending factors are
@@ -121,7 +125,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Execute a display list
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCallList.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCallList.xml>`__
:type list: unsigned int
:arg list: Specifies the integer name of the display list to be executed.
@@ -131,7 +135,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Execute a list of display lists
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCallLists.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCallLists.xml>`__
:type n: int
:arg n: Specifies the number of display lists to be executed.
@@ -147,7 +151,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Clear buffers to preset values
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glClear.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glClear.xml>`__
:type mask: Enumerated constant(s)
:arg mask: Bitwise OR of masks that indicate the buffers to be cleared.
@@ -157,7 +161,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify clear values for the accumulation buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glClearAccum.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glClearAccum.xml>`__
:type red, green, blue, alpha: float
:arg red, green, blue, alpha: Specify the red, green, blue, and alpha values used when the
@@ -168,7 +172,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify clear values for the color buffers
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glClearColor.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glClearColor.xml>`__
:type red, green, blue, alpha: float
:arg red, green, blue, alpha: Specify the red, green, blue, and alpha values used when the
@@ -179,7 +183,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify the clear value for the depth buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glClearDepth.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glClearDepth.xml>`__
:type depth: int
:arg depth: Specifies the depth value used when the depth buffer is cleared.
@@ -190,7 +194,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify the clear value for the color index buffers
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glClearIndex.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glClearIndex.xml>`__
:type c: float
:arg c: Specifies the index used when the color index buffers are cleared.
@@ -201,7 +205,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify the clear value for the stencil buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glClearStencil.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glClearStencil.xml>`__
:type s: int
:arg s: Specifies the index used when the stencil buffer is cleared. The initial value is 0.
@@ -211,7 +215,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify a plane against which all geometry is clipped
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glClipPlane.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glClipPlane.xml>`__
:type plane: Enumerated constant
:arg plane: Specifies which clipping plane is being positioned.
@@ -230,7 +234,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set a new color.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glColor.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glColor.xml>`__
:type red, green, blue, alpha: Depends on function prototype.
:arg red, green, blue: Specify new red, green, and blue values for the current color.
@@ -242,7 +246,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Enable and disable writing of frame buffer color components
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glColorMask.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glColorMask.xml>`__
:type red, green, blue, alpha: int (boolean)
:arg red, green, blue, alpha: Specify whether red, green, blue, and alpha can or cannot be
@@ -254,7 +258,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Cause a material color to track the current color
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glColorMaterial.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glColorMaterial.xml>`__
:type face: Enumerated constant
:arg face: Specifies whether front, back, or both front and back material parameters should
@@ -267,7 +271,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Copy pixels in the frame buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCopyPixels.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCopyPixels.xml>`__
:type x, y: int
:arg x, y: Specify the window coordinates of the lower left corner of the rectangular
@@ -283,7 +287,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Copy pixels into a 2D texture image
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCopyTexImage2D.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCopyTexImage2D.xml>`__
:type target: Enumerated constant
:arg target: Specifies the target texture.
@@ -312,7 +316,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify whether front- or back-facing facets can be culled
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCullFace.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCullFace.xml>`__
:type mode: Enumerated constant
:arg mode: Specifies whether front- or back-facing facets are candidates for culling.
@@ -322,7 +326,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Delete a contiguous group of display lists
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDeleteLists.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDeleteLists.xml>`__
:type list: unsigned int
:arg list: Specifies the integer name of the first display list to delete
@@ -334,7 +338,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Delete named textures
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDeleteTextures.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDeleteTextures.xml>`__
:type n: int
:arg n: Specifies the number of textures to be deleted
@@ -346,7 +350,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify the value used for depth buffer comparisons
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDepthFunc.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDepthFunc.xml>`__
:type func: Enumerated constant
:arg func: Specifies the depth comparison function.
@@ -356,7 +360,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Enable or disable writing into the depth buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDepthMask.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDepthMask.xml>`__
:type flag: int (boolean)
:arg flag: Specifies whether the depth buffer is enabled for writing. If flag is GL_FALSE,
@@ -368,7 +372,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify mapping of depth values from normalized device coordinates to window coordinates
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDepthRange.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDepthRange.xml>`__
:type zNear: int
:arg zNear: Specifies the mapping of the near clipping plane to window coordinates.
@@ -382,7 +386,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Disable server-side GL capabilities
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glEnable.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glEnable.xml>`__
:type cap: Enumerated constant
:arg cap: Specifies a symbolic constant indicating a GL capability.
@@ -392,7 +396,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify which color buffers are to be drawn into
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDrawBuffer.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDrawBuffer.xml>`__
:type mode: Enumerated constant
:arg mode: Specifies up to four color buffers to be drawn into.
@@ -402,7 +406,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Write a block of pixels to the frame buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDrawPixels.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDrawPixels.xml>`__
:type width, height: int
:arg width, height: Specify the dimensions of the pixel rectangle to be
@@ -421,7 +425,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Flag edges as either boundary or non-boundary
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glEdgeFlag.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glEdgeFlag.xml>`__
:type flag: Depends of function prototype
:arg flag: Specifies the current edge flag value.The initial value is GL_TRUE.
@@ -431,7 +435,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Enable server-side GL capabilities
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glEnable.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glEnable.xml>`__
:type cap: Enumerated constant
:arg cap: Specifies a symbolic constant indicating a GL capability.
@@ -441,14 +445,14 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Delimit the vertices of a primitive or group of like primitives
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glBegin.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glBegin.xml>`__
.. function:: glEndList():
Create or replace a display list
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glNewList.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glNewList.xml>`__
.. function:: glEvalCoord (u,v):
@@ -458,7 +462,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Evaluate enabled one- and two-dimensional maps
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glEvalCoord.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glEvalCoord.xml>`__
:type u: Depends on function prototype.
:arg u: Specifies a value that is the domain coordinate u to the basis function defined
@@ -476,7 +480,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Compute a one- or two-dimensional grid of points or lines
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glEvalMesh.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glEvalMesh.xml>`__
:type mode: Enumerated constant
:arg mode: In glEvalMesh1, specifies whether to compute a one-dimensional
@@ -491,7 +495,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Generate and evaluate a single point in a mesh
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glEvalPoint.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glEvalPoint.xml>`__
:type i: int
:arg i: Specifies the integer value for grid domain variable i.
@@ -503,7 +507,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Controls feedback mode
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glFeedbackBuffer.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glFeedbackBuffer.xml>`__
:type size: int
:arg size: Specifies the maximum number of values that can be written into buffer.
@@ -518,14 +522,14 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Block until all GL execution is complete
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glFinish.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glFinish.xml>`__
.. function:: glFlush():
Force Execution of GL commands in finite time
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glFlush.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glFlush.xml>`__
.. function:: glFog (pname, param):
@@ -534,7 +538,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify fog parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glFog.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glFog.xml>`__
:type pname: Enumerated constant
:arg pname: Specifies a single-valued fog parameter. If the function prototype
@@ -549,7 +553,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Define front- and back-facing polygons
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glFrontFace.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glFrontFace.xml>`__
:type mode: Enumerated constant
:arg mode: Specifies the orientation of front-facing polygons.
@@ -559,7 +563,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Multiply the current matrix by a perspective matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glFrustum.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glFrustum.xml>`__
:type left, right: double (float)
:arg left, right: Specify the coordinates for the left and right vertical
@@ -576,7 +580,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Generate a contiguous set of empty display lists
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGenLists.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGenLists.xml>`__
:type range: int
:arg range: Specifies the number of contiguous empty display lists to be generated.
@@ -586,7 +590,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Generate texture names
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGenTextures.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGenTextures.xml>`__
:type n: int
:arg n: Specifies the number of textures name to be generated.
@@ -600,7 +604,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Return the value or values of a selected parameter
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGet.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGet.xml>`__
:type pname: Enumerated constant
:arg pname: Specifies the parameter value to be returned.
@@ -612,7 +616,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Return the coefficients of the specified clipping plane
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetClipPlane.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetClipPlane.xml>`__
:type plane: Enumerated constant
:arg plane: Specifies a clipping plane. The number of clipping planes depends on the
@@ -627,7 +631,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Return error information
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetError.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetError.xml>`__
.. function:: glGetLight (light, pname, params):
@@ -636,7 +640,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Return light source parameter values
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetLight.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetLight.xml>`__
:type light: Enumerated constant
:arg light: Specifies a light source. The number of possible lights depends on the
@@ -670,7 +674,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Return material parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetMaterial.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetMaterial.xml>`__
:type face: Enumerated constant
:arg face: Specifies which of the two materials is being queried.
@@ -687,7 +691,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Return the specified pixel map
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetPixelMap.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetPixelMap.xml>`__
:type map: Enumerated constant
:arg map: Specifies the name of the pixel map to return.
@@ -699,7 +703,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Return the polygon stipple pattern
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetPolygonStipple.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetPolygonStipple.xml>`__
:type mask: :class:`bgl.Buffer` object I{type GL_BYTE}
:arg mask: Returns the stipple pattern. The initial value is all 1's.
@@ -709,7 +713,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Return a string describing the current GL connection
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetString.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetString.xml>`__
:type name: Enumerated constant
:arg name: Specifies a symbolic constant.
@@ -722,7 +726,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Return texture environment parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetTexEnv.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetTexEnv.xml>`__
:type target: Enumerated constant
:arg target: Specifies a texture environment. Must be GL_TEXTURE_ENV.
@@ -738,7 +742,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Return texture coordinate generation parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetTexGen.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetTexGen.xml>`__
:type coord: Enumerated constant
:arg coord: Specifies a texture coordinate.
@@ -752,7 +756,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Return a texture image
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetTexImage.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetTexImage.xml>`__
:type target: Enumerated constant
:arg target: Specifies which texture is to be obtained.
@@ -774,7 +778,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
return texture parameter values for a specific level of detail
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetTexLevelParameter.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetTexLevelParameter.xml>`__
:type target: Enumerated constant
:arg target: Specifies the symbolic name of the target texture.
@@ -793,7 +797,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Return texture parameter values
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetTexParameter.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetTexParameter.xml>`__
:type target: Enumerated constant
:arg target: Specifies the symbolic name of the target texture.
@@ -807,7 +811,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify implementation-specific hints
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glHint.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glHint.xml>`__
:type target: Enumerated constant
:arg target: Specifies a symbolic constant indicating the behavior to be
@@ -822,7 +826,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set the current color index
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glIndex.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glIndex.xml>`__
:type c: :class:`bgl.Buffer` object. Depends on function prototype.
:arg c: Specifies a pointer to a one element array that contains the new value for
@@ -833,7 +837,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Control the writing of individual bits in the color index buffers
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glIndexMask.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glIndexMask.xml>`__
:type mask: int
:arg mask: Specifies a bit mask to enable and disable the writing of individual bits
@@ -845,14 +849,14 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Initialize the name stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glInitNames.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glInitNames.xml>`__
.. function:: glIsEnabled(cap):
Test whether a capability is enabled
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glIsEnabled.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glIsEnabled.xml>`__
:type cap: Enumerated constant
:arg cap: Specifies a constant representing a GL capability.
@@ -862,7 +866,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Determine if a name corresponds to a display-list
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glIsList.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glIsList.xml>`__
:type list: unsigned int
:arg list: Specifies a potential display-list name.
@@ -872,7 +876,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Determine if a name corresponds to a texture
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glIsTexture.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glIsTexture.xml>`__
:type texture: unsigned int
:arg texture: Specifies a value that may be the name of a texture.
@@ -884,7 +888,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set the light source parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLight.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLight.xml>`__
:type light: Enumerated constant
:arg light: Specifies a light. The number of lights depends on the implementation,
@@ -904,7 +908,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set the lighting model parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLightModel.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLightModel.xml>`__
:type pname: Enumerated constant
:arg pname: Specifies a single-value light model parameter.
@@ -917,7 +921,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify the line stipple pattern
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLineStipple.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLineStipple.xml>`__
:type factor: int
:arg factor: Specifies a multiplier for each bit in the line stipple pattern.
@@ -934,7 +938,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify the width of rasterized lines.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLineWidth.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLineWidth.xml>`__
:type width: float
:arg width: Specifies the width of rasterized lines. The initial value is 1.
@@ -944,7 +948,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set the display-list base for glCallLists
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glListBase.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glListBase.xml>`__
:type base: unsigned int
:arg base: Specifies an integer offset that will be added to glCallLists
@@ -955,7 +959,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Replace the current matrix with the identity matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLoadIdentity.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLoadIdentity.xml>`__
.. function:: glLoadMatrix (m):
@@ -964,7 +968,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Replace the current matrix with the specified matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLoadMatrix.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLoadMatrix.xml>`__
:type m: :class:`bgl.Buffer` object. Depends on function prototype.
:arg m: Specifies a pointer to 16 consecutive values, which are used as the elements
@@ -975,7 +979,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Load a name onto the name stack.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLoadName.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLoadName.xml>`__
:type name: unsigned int
:arg name: Specifies a name that will replace the top value on the name stack.
@@ -985,7 +989,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify a logical pixel operation for color index rendering
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLogicOp.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLogicOp.xml>`__
:type opcode: Enumerated constant
:arg opcode: Specifies a symbolic constant that selects a logical operation.
@@ -997,7 +1001,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Define a one-dimensional evaluator
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glMap1.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glMap1.xml>`__
:type target: Enumerated constant
:arg target: Specifies the kind of values that are generated by the evaluator.
@@ -1022,7 +1026,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Define a two-dimensional evaluator
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glMap2.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glMap2.xml>`__
:type target: Enumerated constant
:arg target: Specifies the kind of values that are generated by the evaluator.
@@ -1063,7 +1067,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Define a one- or two-dimensional mesh
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glMapGrid.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glMapGrid.xml>`__
:type un: int
:arg un: Specifies the number of partitions in the grid range interval
@@ -1082,7 +1086,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify material parameters for the lighting model.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glMaterial.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glMaterial.xml>`__
:type face: Enumerated constant
:arg face: Specifies which face or faces are being updated. Must be one of:
@@ -1099,7 +1103,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify which matrix is the current matrix.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glMatrixMode.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glMatrixMode.xml>`__
:type mode: Enumerated constant
:arg mode: Specifies which matrix stack is the target for subsequent matrix operations.
@@ -1111,7 +1115,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Multiply the current matrix with the specified matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glMultMatrix.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glMultMatrix.xml>`__
:type m: :class:`bgl.Buffer` object. Depends on function prototype.
:arg m: Points to 16 consecutive values that are used as the elements of a 4x4 column
@@ -1122,7 +1126,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Create or replace a display list
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glNewList.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glNewList.xml>`__
:type list: unsigned int
:arg list: Specifies the display list name
@@ -1137,7 +1141,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set the current normal vector
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glNormal.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glNormal.xml>`__
:type nx, ny, nz: Depends on function prototype. (non - 'v' prototypes only)
:arg nx, ny, nz: Specify the x, y, and z coordinates of the new current normal.
@@ -1151,7 +1155,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Multiply the current matrix with an orthographic matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glOrtho.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glOrtho.xml>`__
:type left, right: double (float)
:arg left, right: Specify the coordinates for the left and
@@ -1168,7 +1172,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Place a marker in the feedback buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPassThrough.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPassThrough.xml>`__
:type token: float
:arg token: Specifies a marker value to be placed in the feedback
@@ -1181,7 +1185,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set up pixel transfer maps
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPixelMap.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPixelMap.xml>`__
:type map: Enumerated constant
:arg map: Specifies a symbolic map name.
@@ -1197,7 +1201,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set pixel storage modes
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPixelStore.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPixelStore.xml>`__
:type pname: Enumerated constant
:arg pname: Specifies the symbolic name of the parameter to be set.
@@ -1213,7 +1217,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set pixel transfer modes
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPixelTransfer.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPixelTransfer.xml>`__
:type pname: Enumerated constant
:arg pname: Specifies the symbolic name of the pixel transfer parameter to be set.
@@ -1225,7 +1229,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify the pixel zoom factors
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPixelZoom.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPixelZoom.xml>`__
:type xfactor, yfactor: float
:arg xfactor, yfactor: Specify the x and y zoom factors for pixel write operations.
@@ -1235,7 +1239,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify the diameter of rasterized points
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPointSize.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPointSize.xml>`__
:type size: float
:arg size: Specifies the diameter of rasterized points. The initial value is 1.
@@ -1245,7 +1249,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Select a polygon rasterization mode
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPolygonMode.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPolygonMode.xml>`__
:type face: Enumerated constant
:arg face: Specifies the polygons that mode applies to.
@@ -1260,7 +1264,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set the scale and units used to calculate depth values
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPolygonOffset.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPolygonOffset.xml>`__
:type factor: float
:arg factor: Specifies a scale factor that is used to create a variable depth
@@ -1274,7 +1278,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set the polygon stippling pattern
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPolygonStipple.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPolygonStipple.xml>`__
:type mask: :class:`bgl.Buffer` object I{type GL_BYTE}
:arg mask: Specifies a pointer to a 32x32 stipple pattern that will be unpacked
@@ -1285,35 +1289,35 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Pop the server attribute stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPopAttrib.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPopAttrib.xml>`__
.. function:: glPopClientAttrib():
Pop the client attribute stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPopClientAttrib.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPopClientAttrib.xml>`__
.. function:: glPopMatrix():
Pop the current matrix stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPopMatrix.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPopMatrix.xml>`__
.. function:: glPopName():
Pop the name stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPopName.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPopName.xml>`__
.. function:: glPrioritizeTextures(n, textures, priorities):
Set texture residence priority
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPrioritizeTextures.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPrioritizeTextures.xml>`__
:type n: int
:arg n: Specifies the number of textures to be prioritized.
@@ -1329,7 +1333,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Push the server attribute stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPushAttrib.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPushAttrib.xml>`__
:type mask: Enumerated constant(s)
:arg mask: Specifies a mask that indicates which attributes to save.
@@ -1339,7 +1343,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Push the client attribute stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPushClientAttrib.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPushClientAttrib.xml>`__
:type mask: Enumerated constant(s)
:arg mask: Specifies a mask that indicates which attributes to save.
@@ -1349,14 +1353,14 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Push the current matrix stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPushMatrix.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPushMatrix.xml>`__
.. function:: glPushName(name):
Push the name stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPushName.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glPushName.xml>`__
:type name: unsigned int
:arg name: Specifies a name that will be pushed onto the name stack.
@@ -1372,7 +1376,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify the raster position for pixel operations
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glRasterPos.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glRasterPos.xml>`__
:type x, y, z, w: Depends on function prototype. (z and w for '3' and '4' prototypes only)
:arg x, y, z, w: Specify the x,y,z, and w object coordinates (if present) for the
@@ -1404,7 +1408,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Select a color buffer source for pixels.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glReadBuffer.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glReadBuffer.xml>`__
:type mode: Enumerated constant
:arg mode: Specifies a color buffer.
@@ -1414,7 +1418,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Read a block of pixels from the frame buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glReadPixels.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glReadPixels.xml>`__
:type x, y: int
:arg x, y: Specify the window coordinates of the first pixel that is read
@@ -1437,7 +1441,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Draw a rectangle
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glRect.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glRect.xml>`__
:type x1, y1: Depends on function prototype. (for non 'v' prototypes only)
:arg x1, y1: Specify one vertex of a rectangle
@@ -1452,7 +1456,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set rasterization mode
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glRenderMode.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glRenderMode.xml>`__
:type mode: Enumerated constant
:arg mode: Specifies the rasterization mode.
@@ -1464,7 +1468,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Multiply the current matrix by a rotation matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glRotate.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glRotate.xml>`__
:type angle: Depends on function prototype.
:arg angle: Specifies the angle of rotation in degrees.
@@ -1478,7 +1482,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Multiply the current matrix by a general scaling matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glScale.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glScale.xml>`__
:type x, y, z: Depends on function prototype.
:arg x, y, z: Specify scale factors along the x, y, and z axes, respectively.
@@ -1488,7 +1492,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Define the scissor box
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glScissor.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glScissor.xml>`__
:type x, y: int
:arg x, y: Specify the lower left corner of the scissor box. Initially (0, 0).
@@ -1502,7 +1506,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Establish a buffer for selection mode values
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glSelectBuffer.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glSelectBuffer.xml>`__
:type size: int
:arg size: Specifies the size of buffer
@@ -1514,7 +1518,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Select flat or smooth shading
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glShadeModel.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glShadeModel.xml>`__
:type mode: Enumerated constant
:arg mode: Specifies a symbolic value representing a shading technique.
@@ -1524,7 +1528,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set function and reference value for stencil testing
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glStencilFuc.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glStencilFuc.xml>`__
:type func: Enumerated constant
:arg func: Specifies the test function.
@@ -1541,7 +1545,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Control the writing of individual bits in the stencil planes
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glStencilMask.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glStencilMask.xml>`__
:type mask: unsigned int
:arg mask: Specifies a bit mask to enable and disable writing of individual bits
@@ -1552,7 +1556,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set stencil test actions
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glStencilOp.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glStencilOp.xml>`__
:type fail: Enumerated constant
:arg fail: Specifies the action to take when the stencil test fails.
@@ -1580,7 +1584,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set the current texture coordinates
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glTexCoord.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glTexCoord.xml>`__
:type s, t, r, q: Depends on function prototype. (r and q for '3' and '4' prototypes only)
:arg s, t, r, q: Specify s, t, r, and q texture coordinates. Not all parameters are
@@ -1596,7 +1600,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set texture environment parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glTexEnv.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glTexEnv.xml>`__
:type target: Enumerated constant
:arg target: Specifies a texture environment. Must be GL_TEXTURE_ENV.
@@ -1615,7 +1619,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Control the generation of texture coordinates
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glTexGen.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glTexGen.xml>`__
:type coord: Enumerated constant
:arg coord: Specifies a texture coordinate.
@@ -1633,7 +1637,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify a one-dimensional texture image
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glTexImage1D.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glTexImage1D.xml>`__
:type target: Enumerated constant
:arg target: Specifies the target texture.
@@ -1660,7 +1664,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify a two-dimensional texture image
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glTexImage2D.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glTexImage2D.xml>`__
:type target: Enumerated constant
:arg target: Specifies the target texture.
@@ -1693,7 +1697,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set texture parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glTexParameter.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glTexParameter.xml>`__
:type target: Enumerated constant
:arg target: Specifies the target texture.
@@ -1710,7 +1714,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Multiply the current matrix by a translation matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glTranslate.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glTranslate.xml>`__
:type x, y, z: Depends on function prototype.
:arg x, y, z: Specify the x, y, and z coordinates of a translation vector.
@@ -1725,7 +1729,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Specify a vertex
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glVertex.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glVertex.xml>`__
:type x, y, z, w: Depends on function prototype (z and w for '3' and '4' prototypes only)
:arg x, y, z, w: Specify x, y, z, and w coordinates of a vertex. Not all parameters
@@ -1741,7 +1745,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Set the viewport
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glViewport.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glViewport.xml>`__
:type x, y: int
:arg x, y: Specify the lower left corner of the viewport rectangle,
@@ -1849,7 +1853,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Installs a program object as part of current rendering state
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glUseProgram.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glUseProgram.xml>`__
:type program: int
:arg program: Specifies the handle of the program object whose executables are to be used as part of current rendering state.
@@ -1859,7 +1863,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Validates a program object
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glValidateProgram.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glValidateProgram.xml>`__
:type program: int
:arg program: Specifies the handle of the program object to be validated.
@@ -1869,7 +1873,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Links a program object.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLinkProgram.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glLinkProgram.xml>`__
:type program: int
:arg program: Specifies the handle of the program object to be linked.
@@ -1879,7 +1883,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Select active texture unit.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glActiveTexture.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glActiveTexture.xml>`__
:type texture: int
:arg texture: Constant in ``GL_TEXTURE0`` 0 - 8
@@ -1889,7 +1893,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Attaches a shader object to a program object.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glAttachShader.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glAttachShader.xml>`__
:type program: int
:arg program: Specifies the program object to which a shader object will be attached.
@@ -1901,7 +1905,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Compiles a shader object.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCompileShader.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCompileShader.xml>`__
:type shader: int
:arg shader: Specifies the shader object to be compiled.
@@ -1911,7 +1915,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Creates a program object
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCreateProgram.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCreateProgram.xml>`__
:rtype: int
:return: The new program or zero if an error occurs.
@@ -1921,7 +1925,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Creates a shader object.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCreateShader.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glCreateShader.xml>`__
:type shaderType: Specifies the type of shader to be created.
Must be one of ``GL_VERTEX_SHADER``,
@@ -1938,7 +1942,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Deletes a program object.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDeleteProgram.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDeleteProgram.xml>`__
:type program: int
:arg program: Specifies the program object to be deleted.
@@ -1948,7 +1952,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Deletes a shader object.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDeleteShader.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDeleteShader.xml>`__
:type shader: int
:arg shader: Specifies the shader object to be deleted.
@@ -1958,7 +1962,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Detaches a shader object from a program object to which it is attached.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDetachShader.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glDetachShader.xml>`__
:type program: int
:arg program: Specifies the program object from which to detach the shader object.
@@ -1970,7 +1974,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Returns the handles of the shader objects attached to a program object.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetAttachedShaders.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetAttachedShaders.xml>`__
:type program: int
:arg program: Specifies the program object to be queried.
@@ -1986,7 +1990,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Returns the information log for a program object.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetProgramInfoLog.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetProgramInfoLog.xml>`__
:type program: int
:arg program: Specifies the program object whose information log is to be queried.
@@ -2002,7 +2006,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Returns the information log for a shader object.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetShaderInfoLog.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetShaderInfoLog.xml>`__
:type shader: int
:arg shader: Specifies the shader object whose information log is to be queried.
@@ -2018,7 +2022,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Returns a parameter from a program object.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetProgram.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetProgram.xml>`__
:type program: int
:arg program: Specifies the program object to be queried.
@@ -2032,7 +2036,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Determines if a name corresponds to a shader object.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glIsShader.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glIsShader.xml>`__
:type shader: int
:arg shader: Specifies a potential shader object.
@@ -2042,7 +2046,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Determines if a name corresponds to a program object
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glIsProgram.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glIsProgram.xml>`__
:type program: int
:arg program: Specifies a potential program object.
@@ -2052,7 +2056,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Returns the source code string from a shader object
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetShaderSource.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glGetShaderSource.xml>`__
:type shader: int
:arg shader: Specifies the shader object to be queried.
@@ -2068,7 +2072,7 @@ Here is a comprehensive `list of books <http://www.opengl.org/documentation/book
Replaces the source code in a shader object.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man2/xhtml/glShaderSource.xml>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/html/glShaderSource.xhtml>`__
:type shader: int
:arg shader: Specifies the handle of the shader object whose source code is to be replaced.
diff --git a/doc/python_api/rst/gpu.rst b/doc/python_api/rst/gpu.rst
index aaceb3ce32e..5e7486f22dd 100644
--- a/doc/python_api/rst/gpu.rst
+++ b/doc/python_api/rst/gpu.rst
@@ -16,24 +16,24 @@ and in the game engine.
.. warning::
- The API provided by this module should be consider unstable. The data exposed by the API
- are are closely related to Blender's internal GLSL code and may change if the GLSL code
- is modified (e.g. new uniform type).
+ The API provided by this module is subject to change.
+ The data exposed by the API are are closely related to Blender's internal GLSL code
+ and may change if the GLSL code is modified (e.g. new uniform type).
Constants
=========
-GLSL data type
+GLSL Data Type
--------------
.. _data-type:
Type of GLSL data.
-For shader uniforms, the data type determines which glUniform function
+For shader uniforms, the data type determines which ``glUniform`` function
variant to use to send the uniform value to the GPU.
-For vertex attributes, the data type determines which glVertexAttrib function
+For vertex attributes, the data type determines which ``glVertexAttrib`` function
variant to use to send the vertex attribute to the GPU.
See export_shader_
@@ -42,53 +42,37 @@ See export_shader_
one integer
- :value: 1
-
.. data:: GPU_DATA_1F
one float
- :value: 2
-
.. data:: GPU_DATA_2F
two floats
- :value: 3
-
.. data:: GPU_DATA_3F
three floats
- :value: 4
-
.. data:: GPU_DATA_4F
four floats
- :value: 5
-
.. data:: GPU_DATA_9F
matrix 3x3 in column-major order
- :value: 6
-
.. data:: GPU_DATA_16F
matrix 4x4 in column-major order
- :value: 7
-
.. data:: GPU_DATA_4UB
four unsigned byte
- :value: 8
-
-GLSL uniform type
------------------
+GLSL Uniform Types
+------------------
.. _uniform-type:
@@ -101,7 +85,7 @@ The calculation of some of the uniforms is based on matrices available in the sc
.. _mat4_cam_to_world:
.. _mat4_world_to_cam:
- *mat4_cam_to_world*
+ ``mat4_cam_to_world``
Model matrix of the camera. OpenGL 4x4 matrix that converts
camera local coordinates to world coordinates. In blender this is obtained from the
'matrix_world' attribute of the camera object.
@@ -112,7 +96,7 @@ The calculation of some of the uniforms is based on matrices available in the sc
.. _mat4_object_to_world:
.. _mat4_world_to_object:
- *mat4_object_to_world*
+ ``mat4_object_to_world``
Model matrix of the object that is being rendered. OpenGL 4x4 matric that converts
object local coordinates to world coordinates. In blender this is obtained from the
'matrix_world' attribute of the object.
@@ -122,7 +106,7 @@ The calculation of some of the uniforms is based on matrices available in the sc
.. _mat4_lamp_to_world:
.. _mat4_world_to_lamp:
- *mat4_lamp_to_world*
+ ``mat4_lamp_to_world``
Model matrix of the lamp lighting the object. OpenGL 4x4 matrix that converts lamp
local coordinates to world coordinates. In blender this is obtained from the
'matrix_world' attribute of the lamp object.
@@ -130,151 +114,305 @@ The calculation of some of the uniforms is based on matrices available in the sc
Some uniform will need the *mat4_world_to_lamp* matrix
computed as the inverse of this matrix.
+
+.. note::
+
+ Any uniforms used for view projections or transformations (object, lamp matrices for eg),
+ can only be set once per frame.
+
+
+GLSL Object Uniforms
+^^^^^^^^^^^^^^^^^^^^
+
+.. note::
+
+ - Object transformations and color must be set before drawing the object.
+ - There is at most one uniform of these types per shader.
+
.. data:: GPU_DYNAMIC_OBJECT_VIEWMAT
- The uniform is a 4x4 GL matrix that converts world coordinates to
- camera coordinates (see mat4_world_to_cam_). Can be set once per frame.
- There is at most one uniform of that type per shader.
+ A matrix that converts world coordinates to camera coordinates (see mat4_world_to_cam_).
- :value: 1
+ :type: matrix4x4
.. data:: GPU_DYNAMIC_OBJECT_MAT
- The uniform is a 4x4 GL matrix that converts object coordinates
- to world coordinates (see mat4_object_to_world_). Must be set before drawing the object.
- There is at most one uniform of that type per shader.
+ A matrix that converts object coordinates to world coordinates (see mat4_object_to_world_).
- :value: 2
+ :type: matrix4x4
.. data:: GPU_DYNAMIC_OBJECT_VIEWIMAT
The uniform is a 4x4 GL matrix that converts coordinates
in camera space to world coordinates (see mat4_cam_to_world_).
- Can be set once per frame.
- There is at most one uniform of that type per shader.
- :value: 3
+ :type: matrix4x4
.. data:: GPU_DYNAMIC_OBJECT_IMAT
The uniform is a 4x4 GL matrix that converts world coodinates
to object coordinates (see mat4_world_to_object_).
- Must be set before drawing the object.
- There is at most one uniform of that type per shader.
- :value: 4
+ :type: matrix4x4
.. data:: GPU_DYNAMIC_OBJECT_COLOR
- The uniform is a vector of 4 float representing a RGB color + alpha defined at object level.
- Each values between 0.0 and 1.0. In blender it corresponds to the 'color' attribute of the object.
- Must be set before drawing the object.
- There is at most one uniform of that type per shader.
+ An RGB color + alpha defined at object level.
+ Each values between 0.0 and 1.0.
- :value: 5
+ See :class:`bpy.types.Object.color`.
+
+ :type: float4
+
+.. data:: GPU_DYNAMIC_OBJECT_AUTOBUMPSCALE
+
+ Multiplier for bump-map scaling.
+
+ :type: float
-.. data:: GPU_DYNAMIC_LAMP_DYNVEC
- The uniform is a vector of 3 float representing the direction of light in camera space.
- In Blender, this is computed by
+GLSL Lamp Uniforms
+^^^^^^^^^^^^^^^^^^
- mat4_world_to_cam_ * (-vec3_lamp_Z_axis)
+.. note::
- as the lamp Z axis points to the opposite direction of light.
- The norm of the vector should be unity. Can be set once per frame.
There is one uniform of that type per lamp lighting the material.
- :value: 6
+.. data:: GPU_DYNAMIC_LAMP_DYNVEC
-.. data:: GPU_DYNAMIC_LAMP_DYNCO
+ Represents the direction of light in camera space.
- The uniform is a vector of 3 float representing the position of the light in camera space.
- Computed as
+ Computed as:
+ mat4_world_to_cam_ * (-vec3_lamp_Z_axis)
- mat4_world_to_cam_ * vec3_lamp_pos
+ .. note::
+ - The lamp Z axis points to the opposite direction of light.
+ - The norm of the vector should be unit length.
- Can be set once per frame.
- There is one uniform of that type per lamp lighting the material.
+ :type: float3
- :value: 7
+.. data:: GPU_DYNAMIC_LAMP_DYNCO
-.. data:: GPU_DYNAMIC_LAMP_DYNIMAT
+ Represents the position of the light in camera space.
- The uniform is a 4x4 GL matrix that converts vector in camera space to lamp space.
- Computed as
+ Computed as:
+ mat4_world_to_cam_ * vec3_lamp_pos
- mat4_world_to_lamp_ * mat4_cam_to_world_
+ :type: float3
- Can be set once per frame.
- There is one uniform of that type per lamp lighting the material.
+.. data:: GPU_DYNAMIC_LAMP_DYNIMAT
- :value: 8
+ Matrix that converts vector in camera space to lamp space.
+
+ Computed as:
+ mat4_world_to_lamp_ * mat4_cam_to_world_
+
+ :type: matrix4x4
.. data:: GPU_DYNAMIC_LAMP_DYNPERSMAT
- The uniform is a 4x4 GL matrix that converts a vector in camera space to shadow buffer depth space.
- Computed as
+ Matrix that converts a vector in camera space to shadow buffer depth space.
- mat4_perspective_to_depth_ * mat4_lamp_to_perspective_ * mat4_world_to_lamp_ * mat4_cam_to_world_.
+ Computed as:
+ mat4_perspective_to_depth_ * mat4_lamp_to_perspective_ * mat4_world_to_lamp_ * mat4_cam_to_world_.
.. _mat4_perspective_to_depth:
- *mat4_perspective_to_depth* is a fixed matrix defined as follow::
+ ``mat4_perspective_to_depth`` is a fixed matrix defined as follow::
0.5 0.0 0.0 0.5
0.0 0.5 0.0 0.5
0.0 0.0 0.5 0.5
0.0 0.0 0.0 1.0
- This uniform can be set once per frame. There is one uniform of that type per lamp casting shadow in the scene.
+ .. note::
- :value: 9
+ - There is one uniform of that type per lamp casting shadow in the scene.
+
+ :type: matrix4x4
.. data:: GPU_DYNAMIC_LAMP_DYNENERGY
- The uniform is a single float representing the lamp energy. In blender it corresponds
- to the 'energy' attribute of the lamp data block.
- There is one uniform of that type per lamp lighting the material.
+ See :class:`bpy.types.Lamp.energy`.
- :value: 10
+ :type: float
.. data:: GPU_DYNAMIC_LAMP_DYNCOL
- The uniform is a vector of 3 float representing the lamp color.
- Color elements are between 0.0 and 1.0. In blender it corresponds
- to the 'color' attribute of the lamp data block.
- There is one uniform of that type per lamp lighting the material.
+ See :class:`bpy.types.Lamp.color`.
+
+ :type: float3
+
+.. data:: GPU_DYNAMIC_LAMP_DISTANCE
+
+ See :class:`bpy.types.Lamp.distance`.
+
+ :type: float
+
+.. data:: GPU_DYNAMIC_LAMP_ATT1
+
+ See
+ :class:`bpy.types.PointLamp.linear_attenuation`,
+ :class:`bpy.types.SpotLamp.linear_attenuation`.
+
+ :type: float
+
+.. data:: GPU_DYNAMIC_LAMP_ATT2
+
+ See
+ :class:`bpy.types.PointLamp.quadratic_attenuation`,
+ :class:`bpy.types.SpotLamp.quadratic_attenuation`.
- :value: 11
+ :type: float
+
+.. data:: GPU_DYNAMIC_LAMP_SPOTSIZE
+
+ See :class:`bpy.types.SpotLamp.spot_size`.
+
+ :type: float
+
+.. data:: GPU_DYNAMIC_LAMP_SPOTBLEND
+
+ See :class:`bpy.types.SpotLamp.spot_blend`.
+
+ :type: float
+
+.. data:: GPU_DYNAMIC_LAMP_SPOTSCALE
+
+ Represents the SpotLamp local scale.
+
+ :type: float2
+
+
+GLSL Sampler Uniforms
+^^^^^^^^^^^^^^^^^^^^^
.. data:: GPU_DYNAMIC_SAMPLER_2DBUFFER
- The uniform is an integer representing an internal texture used for certain effect
+ Represents an internal texture used for certain effect
(color band, etc).
- :value: 12
+ :type: integer
.. data:: GPU_DYNAMIC_SAMPLER_2DIMAGE
- The uniform is an integer representing a texture loaded from an image file.
+ Represents a texture loaded from an image file.
- :value: 13
+ :type: integer
.. data:: GPU_DYNAMIC_SAMPLER_2DSHADOW
- The uniform is an float representing the bumpmap scaling.
+ Represents a texture loaded from a shadow buffer file.
- :value: 14
+ :type: integer
-.. data:: GPU_DYNAMIC_OBJECT_AUTOBUMPSCALE
- The uniform is an integer representing a shadow buffer corresponding to a lamp
- casting shadow.
+GLSL Mist Uniforms
+^^^^^^^^^^^^^^^^^^
+
+.. data:: GPU_DYNAMIC_MIST_ENABLE:
+
+ See :class:`bpy.types.WorldMistSettings.use_mist`.
- :value: 15
+ :type: float (0 or 1)
+.. data:: GPU_DYNAMIC_MIST_START
-GLSL attribute type
+ See :class:`bpy.types.WorldMistSettings.start`.
+
+ :type: float
+
+ See :class:`bpy.types.WorldMistSettings.depth`.
+
+.. data:: GPU_DYNAMIC_MIST_DISTANCE
+
+ :type: float
+
+ See :class:`bpy.types.WorldMistSettings.intensity`.
+
+.. data:: GPU_DYNAMIC_MIST_INTENSITY
+
+ :type: float
+
+.. data:: GPU_DYNAMIC_MIST_TYPE
+
+ See :class:`bpy.types.WorldMistSettings.falloff`.
+
+ :type: float (used as an index into the type)
+
+.. data:: GPU_DYNAMIC_MIST_COLOR
+
+
+GLSL World Uniforms
+^^^^^^^^^^^^^^^^^^^
+
+.. data:: GPU_DYNAMIC_HORIZON_COLOR
+
+ See :class:`bpy.types.World.horizon_color`.
+
+ :type: float3
+
+.. data:: GPU_DYNAMIC_AMBIENT_COLOR
+
+ See :class:`bpy.types.World.ambient_color`.
+
+ :type: float3
+
+
+GLSL Material Uniforms
+^^^^^^^^^^^^^^^^^^^^^^
+
+.. data:: GPU_DYNAMIC_MAT_DIFFRGB
+
+ See :class:`bpy.types.Material.diffuse_color`.
+
+ :type: float3
+
+.. data:: GPU_DYNAMIC_MAT_REF
+
+ See :class:`bpy.types.Material.diffuse_intensity`.
+
+ :type: float
+
+.. data:: GPU_DYNAMIC_MAT_SPECRGB
+
+ See :class:`bpy.types.Material.specular_color`.
+
+ :type: float3
+
+.. data:: GPU_DYNAMIC_MAT_SPEC
+
+ See :class:`bpy.types.Material.specular_intensity`.
+
+ :type: float
+
+.. data:: GPU_DYNAMIC_MAT_HARD
+
+ See :class:`bpy.types.Material.specular_hardness`.
+
+ :type: float
+
+.. data:: GPU_DYNAMIC_MAT_EMIT
+
+ See :class:`bpy.types.Material.emit`.
+
+ :type: float
+
+.. data:: GPU_DYNAMIC_MAT_AMB
+
+ See :class:`bpy.types.Material.ambient`.
+
+ :type: float
+
+.. data:: GPU_DYNAMIC_MAT_ALPHA
+
+ See :class:`bpy.types.Material.alpha`.
+
+ :type: float
+
+
+
+GLSL Attribute Type
-------------------
.. _attribute-type:
@@ -291,9 +429,7 @@ layer that contains the vertex attribute.
.. code-block:: python
- mesh.uv_textures[attribute["name"]]
-
- :value: 5
+ mesh.uv_layers[attribute["name"]]
.. data:: CD_MCOL
@@ -306,8 +442,6 @@ layer that contains the vertex attribute.
mesh.vertex_colors[attribute["name"]]
- :value: 6
-
.. data:: CD_ORCO
Vertex attribute is original coordinates. Data type is vector 3 float.
@@ -319,8 +453,6 @@ layer that contains the vertex attribute.
mesh.vertices
- :value: 14
-
.. data:: CD_TANGENT
Vertex attribute is the tangent vector. Data type is vector 4 float.
@@ -330,8 +462,6 @@ layer that contains the vertex attribute.
C function to compute the tangent layer from the other layers can be obtained from
blender.org.
- :value: 18
-
Functions
=========
@@ -341,8 +471,12 @@ Functions
.. function:: export_shader(scene,material)
Extracts the GLSL shader producing the visual effect of material in scene for the purpose of
- reusing the shader in an external engine. This function is meant to be used in material exporter
- so that the GLSL shader can be exported entirely. The return value is a dictionary containing the
+ reusing the shader in an external engine.
+
+ This function is meant to be used in material exporter
+ so that the GLSL shader can be exported entirely.
+
+ The return value is a dictionary containing the
shader source code and all associated data.
:arg scene: the scene in which the material in rendered.
@@ -354,76 +488,91 @@ Functions
The dictionary contains the following elements:
- * ["fragment"] : string
+ - ``["fragment"]``: string
fragment shader source code.
- * ["vertex"] : string
+ - ``["vertex"]``: string
vertex shader source code.
- * ["uniforms"] : sequence
+ - ``["uniforms"]``: sequence
list of uniforms used in fragment shader, can be empty list. Each element of the
sequence is a dictionary with the following elements:
- * ["varname"] : string
+ - ``["varname"]``: string
name of the uniform in the fragment shader. Always of the form 'unf<number>'.
- * ["datatype"] : integer
+ - ``["datatype"]``: integer
data type of the uniform variable. Can be one of the following:
- * :data:`gpu.GPU_DATA_1I` : use glUniform1i
- * :data:`gpu.GPU_DATA_1F` : use glUniform1fv
- * :data:`gpu.GPU_DATA_2F` : use glUniform2fv
- * :data:`gpu.GPU_DATA_3F` : use glUniform3fv
- * :data:`gpu.GPU_DATA_4F` : use glUniform4fv
- * :data:`gpu.GPU_DATA_9F` : use glUniformMatrix3fv
- * :data:`gpu.GPU_DATA_16F` : use glUniformMatrix4fv
+ .. hlist::
+ :columns: 2
+
+ - :data:`gpu.GPU_DATA_1I` : use ``glUniform1i``
+ - :data:`gpu.GPU_DATA_1F` : use ``glUniform1fv``
+ - :data:`gpu.GPU_DATA_2F` : use ``glUniform2fv``
+ - :data:`gpu.GPU_DATA_3F` : use ``glUniform3fv``
+ - :data:`gpu.GPU_DATA_4F` : use ``glUniform4fv``
+ - :data:`gpu.GPU_DATA_9F` : use ``glUniformMatrix3fv``
+ - :data:`gpu.GPU_DATA_16F` : use ``glUniformMatrix4fv``
- * ["type"] : integer
+ - ``["type"]``: integer
type of uniform, determines the origin and method of calculation. See uniform-type_.
Depending on the type, more elements will be be present.
- * ["lamp"] : :class:`bpy.types.Object`
- Reference to the lamp object from which the uniforms value are extracted. Set for the following uniforms types:
+ - ``["lamp"]``: :class:`bpy.types.Object`
+ Reference to the lamp object from which the uniforms value are extracted.
+ Set for the following uniforms types:
.. hlist::
- :columns: 3
+ :columns: 2
- * :data:`gpu.GPU_DYNAMIC_LAMP_DYNVEC`
- * :data:`gpu.GPU_DYNAMIC_LAMP_DYNCO`
- * :data:`gpu.GPU_DYNAMIC_LAMP_DYNIMAT`
- * :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT`
- * :data:`gpu.GPU_DYNAMIC_LAMP_DYNENERGY`
- * :data:`gpu.GPU_DYNAMIC_LAMP_DYNCOL`
- * :data:`gpu.GPU_DYNAMIC_SAMPLER_2DSHADOW`
+ - :data:`gpu.GPU_DYNAMIC_LAMP_DYNVEC`
+ - :data:`gpu.GPU_DYNAMIC_LAMP_DYNCO`
+ - :data:`gpu.GPU_DYNAMIC_LAMP_DYNIMAT`
+ - :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT`
+ - :data:`gpu.GPU_DYNAMIC_LAMP_DYNENERGY`
+ - :data:`gpu.GPU_DYNAMIC_LAMP_DYNCOL`
+ - :data:`gpu.GPU_DYNAMIC_SAMPLER_2DSHADOW`
Notes:
- * The uniforms :data:`gpu.GPU_DYNAMIC_LAMP_DYNVEC`, :data:`gpu.GPU_DYNAMIC_LAMP_DYNCO`, :data:`gpu.GPU_DYNAMIC_LAMP_DYNIMAT` and :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT`
- refer to the lamp object position and orientation, both of can be derived from the object world matrix:
+ - The uniforms
+ :data:`gpu.GPU_DYNAMIC_LAMP_DYNVEC`,
+ :data:`gpu.GPU_DYNAMIC_LAMP_DYNCO`,
+ :data:`gpu.GPU_DYNAMIC_LAMP_DYNIMAT` and
+ :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT`
+ refer to the lamp object position and orientation,
+ both of can be derived from the object world matrix:
.. code-block:: python
obmat = uniform["lamp"].matrix_world
where obmat is the mat4_lamp_to_world_ matrix of the lamp as a 2 dimensional array,
- the lamp world location location is in obmat[3].
+ the lamp world location location is in ``obmat[3]``.
- * The uniform types :data:`gpu.GPU_DYNAMIC_LAMP_DYNENERGY` and :data:`gpu.GPU_DYNAMIC_LAMP_DYNCOL` refer to the lamp data bloc that you get from:
+ - The uniform types
+ :data:`gpu.GPU_DYNAMIC_LAMP_DYNENERGY` and
+ :data:`gpu.GPU_DYNAMIC_LAMP_DYNCOL`
+ refer to the lamp data bloc that you get from:
.. code-block:: python
la = uniform["lamp"].data
- from which you get la.energy and la.color
+ from which you get ``lamp.energy`` and ``lamp.color``
- * Lamp duplication is not supported: if you have duplicated lamps in your scene
+ - Lamp duplication is not supported: if you have duplicated lamps in your scene
(i.e. lamp that are instantiated by dupligroup, etc), this element will only
give you a reference to the orignal lamp and you will not know which instance
of the lamp it is refering too. You can still handle that case in the exporter
by distributing the uniforms amongst the duplicated lamps.
- * ["image"] : :class:`bpy.types.Image`
- Reference to the image databloc. Set for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE`. You can get the image data from:
+ - ``["image"]``: :class:`bpy.types.Image`
+ Reference to the image databloc.
+ Set for uniform type
+ :data:`gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE`.
+ You can get the image data from:
.. code-block:: python
@@ -432,60 +581,63 @@ Functions
# image size as a 2-dimensional array of int
uniform["image"].size
- * ["texnumber"] : integer
+ - ``["texnumber"]``: integer
Channel number to which the texture is bound when drawing the object.
- Set for uniform types :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`, :data:`gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE` and :data:`gpu.GPU_DYNAMIC_SAMPLER_2DSHADOW`.
+ Set for uniform types
+ :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`,
+ :data:`gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE` and
+ :data:`gpu.GPU_DYNAMIC_SAMPLER_2DSHADOW`.
This is provided for information only: when reusing the shader outside blencer,
you are free to assign the textures to the channel of your choice and to pass
that number channel to the GPU in the uniform.
- * ["texpixels"] : byte array
- texture data for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`. Although
- the corresponding uniform is a 2D sampler, the texture is always a 1D texture
- of n x 1 pixel. The texture size n is provided in ["texsize"] element.
+ - ``["texpixels"]``: byte array
+ texture data for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`.
+ Although the corresponding uniform is a 2D sampler,
+ the texture is always a 1D texture of n x 1 pixel.
+ The texture size n is provided in ["texsize"] element.
These texture are only used for computer generated texture (colorband, etc).
- The texture data is provided so that you can make a real image out of it in the
- exporter.
+ The texture data is provided so that you can make a real image out of it in the exporter.
- * ["texsize"] : integer
+ - ``["texsize"]``: integer
horizontal size of texture for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`.
The texture data is in ["texpixels"].
- * ["attributes"] : sequence
+ - ``["attributes"]``: sequence
list of attributes used in vertex shader, can be empty. Blender doesn't use
standard attributes except for vertex position and normal. All other vertex
- attributes must be passed using the generic glVertexAttrib functions.
+ attributes must be passed using the generic ``glVertexAttrib`` functions.
The attribute data can be found in the derived mesh custom data using RNA.
Each element of the sequence is a dictionary containing the following elements:
- * ["varname"] : string
+ - ``["varname"]``: string
name of the uniform in the vertex shader. Always of the form 'att<number>'.
- * ["datatype"] : integer
+ - ``["datatype"]``: integer
data type of vertex attribute, can be one of the following:
- * :data:`gpu.GPU_DATA_2F` : use glVertexAttrib2fv
- * :data:`gpu.GPU_DATA_3F` : use glVertexAttrib3fv
- * :data:`gpu.GPU_DATA_4F` : use glVertexAttrib4fv
- * :data:`gpu.GPU_DATA_4UB` : use glVertexAttrib4ubv
+ - :data:`gpu.GPU_DATA_2F`: use ``glVertexAttrib2fv``
+ - :data:`gpu.GPU_DATA_3F`: use ``glVertexAttrib3fv``
+ - :data:`gpu.GPU_DATA_4F`: use ``glVertexAttrib4fv``
+ - :data:`gpu.GPU_DATA_4UB`: use ``glVertexAttrib4ubv``
- * ["number"] : integer
- generic attribute number. This is provided for information only. Blender
- doesn't use glBindAttribLocation to place generic attributes at specific location,
+ - ``["number"]``: integer
+ Generic attribute number. This is provided for information only.
+ Blender doesn't use ``glBindAttribLocation`` to place generic attributes at specific location,
it lets the shader compiler place the attributes automatically and query the
- placement with glGetAttribLocation. The result of this placement is returned in
- this element.
+ placement with ``glGetAttribLocation``.
+ The result of this placement is returned in this element.
When using this shader in a render engine, you should either use
- glBindAttribLocation to force the attribute at this location or use
- glGetAttribLocation to get the placement chosen by the compiler of your GPU.
+ ``glBindAttribLocation`` to force the attribute at this location or use
+ ``glGetAttribLocation`` to get the placement chosen by the compiler of your GPU.
- * ["type"] : integer
+ - ``["type"]``: integer
type of the mesh custom data from which the vertex attribute is loaded.
See attribute-type_.
- * ["name"] : string or integer
+ - ``["name"]``: string or integer
custom data layer name, used for attribute type :data:`gpu.CD_MTFACE` and :data:`gpu.CD_MCOL`.
Example:
@@ -512,14 +664,14 @@ Notes
.. _mat4_lamp_to_perspective:
-1. Calculation of the *mat4_lamp_to_perspective* matrix for a spot lamp.
+#. Calculation of the ``mat4_lamp_to_perspective`` matrix for a spot lamp.
- The following pseudo code shows how the *mat4_lamp_to_perspective* matrix is computed
+ The following pseudo code shows how the ``mat4_lamp_to_perspective`` matrix is computed
in blender for uniforms of :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT` type:
.. code-block:: python
- #Get the lamp datablock with:
+ # Get the lamp datablock with:
lamp = bpy.data.objects[uniform["lamp"]].data
# Compute the projection matrix:
@@ -531,11 +683,11 @@ Notes
# The size of the projection plane is computed with the usual formula:
wsize = lamp.clista * tan(lamp.spotsize/2)
- #And the projection matrix:
+ # And the projection matrix:
mat4_lamp_to_perspective = glFrustum(-wsize, wsize, -wsize, wsize, lamp.clista, lamp.clipend)
-2. Creation of the shadow map for a spot lamp.
+#. Creation of the shadow map for a spot lamp.
The shadow map is the depth buffer of a render performed by placing the camera at the
- spot light position. The size of the shadow map is given by the attribute lamp.bufsize :
+ spot light position. The size of the shadow map is given by the attribute ``lamp.bufsize``:
shadow map size in pixel, same size in both dimensions.
diff --git a/doc/python_api/rst/info_gotcha.rst b/doc/python_api/rst/info_gotcha.rst
index 716bb5897ba..430a862cf7b 100644
--- a/doc/python_api/rst/info_gotcha.rst
+++ b/doc/python_api/rst/info_gotcha.rst
@@ -184,7 +184,7 @@ There are now 3 ways to access faces:
- :class:`bpy.types.MeshPolygon` -
this is the data structure which now stores faces in object mode
- (access as ``mesh.polygons`` rather then ``mesh.faces``).
+ (access as ``mesh.polygons`` rather than ``mesh.faces``).
- :class:`bpy.types.MeshTessFace` -
the result of triangulating (tessellated) polygons,
the main method of face access in 2.62 or older (access as ``mesh.tessfaces``).
@@ -444,7 +444,7 @@ this way you don't run this risk of referencing existing data from the blend fil
# normally some code, or function calls...
- # use own dictionary rather then bpy.data
+ # use own dictionary rather than bpy.data
mesh = mesh_name_mapping[meshid]
@@ -494,7 +494,7 @@ A common case where you would run into this problem is when exporting a material
When using blender data from linked libraries there is an unfortunate complication
-since the path will be relative to the library rather then the open blend file.
+since the path will be relative to the library rather than the open blend file.
When the data block may be from an external blend file pass the library argument from the :class:`bpy.types.ID`.
>>> bpy.path.abspath(image.filepath, library=image.library)
@@ -759,7 +759,7 @@ internally the array which stores this data is re-allocated.
point.co = 1.0, 2.0, 3.0
This can be avoided by re-assigning the point variables after adding the new one or by storing
-indices's to the points rather then the points themselves.
+indices's to the points rather than the points themselves.
The best way is to sidestep the problem altogether add all the points to the curve at once.
This means you don't have to worry about array re-allocation and its faster too
@@ -782,7 +782,7 @@ The following example shows how this precortion works.
mesh = bpy.data.meshes.new(name="MyMesh")
# normally the script would use the mesh here...
bpy.data.meshes.remove(mesh)
- print(mesh.name) # <- give an exception rather then crashing:
+ print(mesh.name) # <- give an exception rather than crashing:
# ReferenceError: StructRNA of type Mesh has been removed
diff --git a/doc/python_api/rst/info_quickstart.rst b/doc/python_api/rst/info_quickstart.rst
index 8ded6e6fae0..ab106dd3bb7 100644
--- a/doc/python_api/rst/info_quickstart.rst
+++ b/doc/python_api/rst/info_quickstart.rst
@@ -59,7 +59,7 @@ text editor or entering commands in the Python console.
Both the *Text Editor* and *Python Console* are space types you can select from the view header.
-Rather then manually configuring your spaces for Python development,
+Rather than manually configuring your spaces for Python development,
you may prefer to use the *Scripting* screen, included default with Blender,
accessible from the top headers screen selector.
diff --git a/doc/python_api/rst/info_tips_and_tricks.rst b/doc/python_api/rst/info_tips_and_tricks.rst
index da213e32a78..28d129b5b13 100644
--- a/doc/python_api/rst/info_tips_and_tricks.rst
+++ b/doc/python_api/rst/info_tips_and_tricks.rst
@@ -81,7 +81,7 @@ Editing a text file externally and having the same text open in Blender does wor
so here are 2 ways you can easily use an external file from Blender.
Using the following examples you'll still need textblock in Blender to execute,
-but reference an external file rather then including it directly.
+but reference an external file rather than including it directly.
Executing External Scripts
@@ -306,7 +306,7 @@ Python Safety (Build Option)
Since it's possible to access data which has been removed (see Gotcha's),
this can be hard to track down the cause of crashes.
-To raise Python exceptions on accessing freed data (rather then crashing),
+To raise Python exceptions on accessing freed data (rather than crashing),
enable the CMake build option WITH_PYTHON_SAFETY.
This enables data tracking which makes data access about 2x slower
diff --git a/doc/python_api/rst_from_bmesh_opdefines.py b/doc/python_api/rst_from_bmesh_opdefines.py
index fcfe0c25c80..c93be662648 100644
--- a/doc/python_api/rst_from_bmesh_opdefines.py
+++ b/doc/python_api/rst_from_bmesh_opdefines.py
@@ -163,6 +163,9 @@ def main():
for i, l in enumerate(b):
l = l.strip()
+ # casts
+ l = l.replace("(int)", "")
+
l = l.replace("{", "(")
l = l.replace("}", ")")
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 2d771524543..1788b4cdcbc 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -261,6 +261,7 @@ else:
"bpy.utils.previews",
"bpy_extras",
"gpu",
+ "gpu.offscreen",
"mathutils",
"mathutils.geometry",
"mathutils.bvhtree",
@@ -472,6 +473,18 @@ else:
_BPY_PROP_COLLECTION_ID = "collection"
+def escape_rst(text):
+ """ Escape plain text which may contain characters used by RST.
+ """
+ return text.translate(escape_rst.trans)
+escape_rst.trans = str.maketrans({
+ "`": "\\`",
+ "|": "\\|",
+ "*": "\\*",
+ "\\": "\\\\",
+ })
+
+
def is_struct_seq(value):
return isinstance(value, tuple) and type(tuple) != tuple and hasattr(value, "n_fields")
@@ -1139,7 +1152,7 @@ def pycontext2sphinx(basepath):
def pyrna_enum2sphinx(prop, use_empty_descriptions=False):
- """ write a bullet point list of enum + descrptons
+ """ write a bullet point list of enum + descriptions
"""
if use_empty_descriptions:
@@ -1154,7 +1167,7 @@ def pyrna_enum2sphinx(prop, use_empty_descriptions=False):
if ok:
return "".join(["* ``%s`` %s.\n" %
(identifier,
- ", ".join(val for val in (name, description) if val),
+ ", ".join(escape_rst(val) for val in (name, description) if val),
)
for identifier, name, description in prop.enum_items
])
@@ -1600,7 +1613,7 @@ def write_rst_contents(basepath):
fw("\n")
# fw("`A PDF version of this document is also available <%s>`_\n" % BLENDER_PDF_FILENAME)
- fw("This site can be downloaded for offline use `Download the full Documentation (zipped HTML files)<%s>`_\n" % BLENDER_ZIP_FILENAME)
+ fw("This site can be downloaded for offline use `Download the full Documentation (zipped HTML files) <%s>`_\n" % BLENDER_ZIP_FILENAME)
fw("\n")
@@ -1647,7 +1660,9 @@ def write_rst_contents(basepath):
# mathutils
"mathutils", "mathutils.geometry", "mathutils.bvhtree", "mathutils.kdtree", "mathutils.noise",
# misc
- "freestyle", "bgl", "blf", "gpu", "aud", "bpy_extras",
+ "freestyle", "bgl", "blf",
+ "gpu", "gpu.offscreen",
+ "aud", "bpy_extras",
# bmesh, submodules are in own page
"bmesh",
)
@@ -1787,6 +1802,7 @@ def write_rst_importable_modules(basepath):
# C_modules
"aud" : "Audio System",
"blf" : "Font Drawing",
+ "gpu.offscreen" : "GPU Off-Screen Buffer",
"bmesh" : "BMesh Module",
"bmesh.types" : "BMesh Types",
"bmesh.utils" : "BMesh Utilities",