picogl.backend.modern.core.vertex.attribute =========================================== .. py:module:: picogl.backend.modern.core.vertex.attribute .. autoapi-nested-parse:: Provides a representation of a single vertex attribute slot for the build_vao function. This class pairs an :class:`~picogl.gpu.buffers.attributes.AttributeSpec` (how the attribute is represented) with the CPU array that will be uploaded. Classes ------- .. autoapisummary:: picogl.backend.modern.core.vertex.attribute.VertexAttribute Module Contents --------------- .. py:class:: VertexAttribute One vertex attribute slot for :func:`build_vao`. :param spec: Vertex attribute layout (index, size, dtype, semantic name). :param data: CPU vertex data uploaded into the corresponding VBO. .. py:attribute:: spec :type: picogl.gpu.buffers.attributes.AttributeSpec .. py:attribute:: data :type: numpy.ndarray .. py:method:: slot(index: int, data: numpy.ndarray, name: picogl.gpu.buffers.vertex.vbo.VBOType | str, *, size: int | None = None, dtype: picogl.backend.gl.enums.GLNumeric = GLNumeric.FLOAT) -> VertexAttribute :classmethod: Build a :class:`VertexAttribute` from an index, array, and semantic name. :param index: Vertex attribute location. :param data: CPU vertex data. :param name: Semantic buffer name (e.g. :class:`VBOType`). :param size: Components per vertex; inferred from ``data`` when omitted. :param dtype: OpenGL component type. :return: Attribute wrapping an :class:`AttributeSpec` and ``data``.