Skip to content

Commit 13ce817

Browse files
committed
Merge pull request kivy#2764 from kivy/doc_fmt
remove old doc about fixed fmt, short explanations of fmt param
2 parents afd7759 + e3b44be commit 13ce817

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

kivy/graphics/vertex_instructions.pyx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,6 @@ cdef class StripMesh(VertexInstruction):
324324
cdef class Mesh(VertexInstruction):
325325
'''A 2d mesh.
326326
327-
The format for vertices is currently fixed but this might change in a future
328-
release. Right now, each vertex is described with 2D coordinates (x, y) and
329-
a 2D texture coordinate (u, v).
330-
331327
In OpenGL ES 2.0 and in our graphics implementation, you cannot have more
332328
than 65535 indices.
333329
@@ -352,7 +348,20 @@ cdef class Mesh(VertexInstruction):
352348
`mode`: str
353349
Mode of the vbo. Check :attr:`mode` for more information. Defaults to
354350
'points'.
355-
351+
`fmt`: list
352+
The format for vertices, by default, each vertex is described by 2D
353+
coordinates (x, y) and 2D texture coordinate (u, v).
354+
Each element of the list should be a tuple or list, of the form:
355+
(variable_name, size, type)
356+
which will allow mapping vertex data to the glsl instructions.
357+
[
358+
(b'v_pos', 2, b'float'),
359+
(b'v_tc', 2, b'float'),
360+
]
361+
will allow using
362+
attribute vec2 v_pos;
363+
attribute vec2 v_tc;
364+
in glsl's vertex shader.
356365
'''
357366

358367
def __init__(self, **kwargs):

0 commit comments

Comments
 (0)