@@ -324,10 +324,6 @@ cdef class StripMesh(VertexInstruction):
324
324
cdef class Mesh(VertexInstruction):
325
325
''' A 2d mesh.
326
326
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
-
331
327
In OpenGL ES 2.0 and in our graphics implementation, you cannot have more
332
328
than 65535 indices.
333
329
@@ -352,7 +348,20 @@ cdef class Mesh(VertexInstruction):
352
348
`mode`: str
353
349
Mode of the vbo. Check :attr:`mode` for more information. Defaults to
354
350
'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.
356
365
'''
357
366
358
367
def __init__ (self , **kwargs ):
0 commit comments