make_index_buffer
- compas_view2.gl.make_index_buffer(data, dynamic=False)[source]
Make an element buffer from the given data.
- Parameters:
data (list[int]) – A flat list of ints.
dynamic (bool, optional) – If True, the buffer is optimized for dynamic access.
- Returns:
int – Element buffer ID.
Examples
>>> from compas.utilities import flatten >>> edges = [(0, 1), (1, 2), (2, 3)] >>> buffer = make_index_buffer(list(flatten(edges)))