picogl.backend.modern.core.vertex.builder

A function to construct a VertexArrayObject by populating it with vertex attributes and optional index data.

This function initializes a VertexArrayObject using the provided vertex attributes and optionally binds an index buffer for element-based rendering. It encapsulates the setup of GPU-based vertex data into the given VertexArrayObject.

picogl.backend.modern.core.vertex.builder.vao

The VertexArrayObject instance to be populated.

Type:

VertexArrayObject

picogl.backend.modern.core.vertex.builder.attributes

A list of VertexAttribute instances that define vertex data and layout for the VertexArrayObject.

Type:

list[VertexAttribute]

picogl.backend.modern.core.vertex.builder.indices

Optional array of indices to be used for index buffer binding. If None, index buffer is not populated.

Type:

np.ndarray | None

returns:

The updated VertexArrayObject containing the provided attributes and optional index data.

rtype:

VertexArrayObject

Functions

build_vao(vao, attributes[, indices]) → picogl.backend.modern.core.vertex.array.object.VertexArrayObject

Populate vao from attribute arrays and an optional element buffer.

Module Contents

picogl.backend.modern.core.vertex.builder.build_vao(vao: picogl.backend.modern.core.vertex.array.object.VertexArrayObject, attributes: list[picogl.backend.modern.core.vertex.attribute.VertexAttribute], indices: numpy.ndarray | None = None) → picogl.backend.modern.core.vertex.array.object.VertexArrayObject[source]

Populate vao from attribute arrays and an optional element buffer.