diff options
author | Jacques Lucke <mail@jlucke.com> | 2018-11-12 15:48:10 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2018-11-12 15:48:31 +0300 |
commit | ded780f13ea00100033d35d08ae453dd8cf4465f (patch) | |
tree | 07d391bd28fc02a4f0bebbfa2fed875a9b6fac2c /doc | |
parent | 3a053314456c674feb661d79cfb518811767e4d8 (diff) |
Py API Docs: fix typos/wording
found by Omar Ahmad
Diffstat (limited to 'doc')
-rw-r--r-- | doc/python_api/examples/gpu.1.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/python_api/examples/gpu.1.py b/doc/python_api/examples/gpu.1.py index cd83d31386d..c8ae3b01ee3 100644 --- a/doc/python_api/examples/gpu.1.py +++ b/doc/python_api/examples/gpu.1.py @@ -4,7 +4,7 @@ Geometry Batches Geometry is drawn in batches. A batch contains the necessary data to perform the drawing. -That includes a obligatory *Vertex Buffer* and an optional *Index Buffer*, each of which is described in more detail in the following sections. +That includes an obligatory *Vertex Buffer* and an optional *Index Buffer*, each of which is described in more detail in the following sections. A batch also defines a draw type. Typical draw types are `POINTS`, `LINES` and `TRIS`. The draw type determines how the data will be interpreted and drawn. @@ -15,10 +15,10 @@ Vertex Buffers A *Vertex Buffer Object* (VBO) (:class:`gpu.types.GPUVertBuf`) is an array that contains the vertex attributes needed for drawing using a specific shader. Typical vertex attributes are *location*, *normal*, *color*, and *uv*. Every vertex buffer has a *Vertex Format* (:class:`gpu.types.GPUVertFormat`) and a length corresponding to the number of vertices in the buffer. -A vertex format describes which attributes are stored per vertex and their types. +A vertex format describes the attributes stored per vertex and their types. The following code demonstrates the creation of a vertex buffer that contains 6 vertices. -For each each vertex 2 attributes will be stored: The position and the normal:: +For each vertex 2 attributes will be stored: The position and the normal:: import gpu vertex_positions = [(0, 0, 0), ...] @@ -54,7 +54,7 @@ For instance, to draw a rectangle composed of two triangles, one could use an in ibo = gpu.types.GPUIndexBuf(type='TRIS', seq=indices) -Here the first tuple in `indices` describes which vertices should be used for the first vertex (same for the second tuple). +Here the first tuple in `indices` describes which vertices should be used for the first triangle (same for the second tuple). Note how the diagonal vertices 1 and 2 are shared between both triangles. Shaders |