Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/python_api/rst/bgl.rst')
-rw-r--r--[-rwxr-xr-x]doc/python_api/rst/bgl.rst16
1 files changed, 9 insertions, 7 deletions
diff --git a/doc/python_api/rst/bgl.rst b/doc/python_api/rst/bgl.rst
index 76b7442f2c5..5f3158bf5dd 100755..100644
--- a/doc/python_api/rst/bgl.rst
+++ b/doc/python_api/rst/bgl.rst
@@ -1,6 +1,6 @@
-bgl module (OpenGL wrapper)
-===========================
+OpenGL Wrapper (bgl)
+====================
.. module:: bgl
@@ -15,7 +15,7 @@ collections of tutorials.
The "red book": "I{OpenGL Programming Guide: The Official Guide to Learning
OpenGL}" and the online NeHe tutorials are two of the best resources.
-..note::
+.. note::
You can use the :class:`Image` type to load and set textures.
See :class:`Image.gl_load` and :class:`Image.gl_load`,
for example.
@@ -71,8 +71,8 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/begin.html>`_
:type mode: Enumerated constant
- :arg mode: Specifies the primitive that will be create from vertices between glBegin and
- glEnd.
+ :arg mode: Specifies the primitive that will be create from vertices between
+ glBegin and glEnd.
.. function:: glBindTexture(target, texture):
@@ -1386,7 +1386,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
bgl.glGetFloatv(bgl.GL_MODELVIEW_MATRIX, view_matrix)
f = 1.0 / view_matrix[0]
- # Instead of the usual glRasterPos2i(xval, yval)
+ # Instead of the usual glRasterPos2i(xval, yval)
bgl.glRasterPos2f(xval * f, yval * f)
@@ -1848,10 +1848,13 @@ class Buffer:
.. code-block:: python
import bgl
+
myByteBuffer = bgl.Buffer(bgl.GL_BYTE, [32, 32])
bgl.glGetPolygonStipple(myByteBuffer)
+
print(myByteBuffer.dimensions)
print(myByteBuffer.to_list())
+
sliceBuffer = myByteBuffer[0:16]
print(sliceBuffer)
@@ -1886,4 +1889,3 @@ class Buffer:
the Buffer. If a template is not passed in all fields will be initialized to 0.
:rtype: Buffer object
:return: The newly created buffer as a PyObject.
-