make_vertex_buffer
- make_vertex_buffer(data, dynamic=False)[source]
Make a vertex buffer from the given data.
- Parameters
- data: list[float]
A flat list of floats.
- dynamicbool, optional
If True, the buffer is optimized for dynamic access.
- Returns
- int
Vertex buffer ID.
Examples
>>> from compas.utilities import flatten >>> vertices = [[0, 0, 0], [1, 0, 0], [2, 0, 0], [3, 0, 0]] >>> buffer = make_vertex_buffer(list(flatten(vertices)))