picogl.backend.modern.core.vertex.builder ========================================= .. py:module:: picogl.backend.modern.core.vertex.builder .. autoapi-nested-parse:: 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. .. attribute:: vao The VertexArrayObject instance to be populated. :type: VertexArrayObject .. attribute:: attributes A list of VertexAttribute instances that define vertex data and layout for the VertexArrayObject. :type: list[VertexAttribute] .. attribute:: 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 --------- .. autoapisummary:: picogl.backend.modern.core.vertex.builder.build_vao Module Contents --------------- .. py:function:: 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 Populate *vao* from attribute arrays and an optional element buffer.