picogl.backend.gl.api.vertex.attrib_array.pointer

Defines and configures a vertex attribute pointer for a vertex array object (VAO).

This module provides functionality to specify layout organization for vertex attribute data within a vertex buffer object (VBO). It enables the definition of how data flows to the vertex shader. Primarily utilized in OpenGL rendering workflows for handling vertex attributes.

Functions: - gl_vertex_attrib_pointer: Configures a single vertex attribute pointer.

Functions

gl_vertex_attrib_pointer(index[, size, type, ...])

Configures a vertex attribute pointer for the currently bound vertex array object (VAO).

Module Contents

picogl.backend.gl.api.vertex.attrib_array.pointer.gl_vertex_attrib_pointer(index, size: int = 3, type: picogl.backend.gl.enums.GLNumeric = GLNumeric.FLOAT, normalized: picogl.boolean.GLBoolean = GLBoolean.FALSE, stride: int = 0, pointer=None)[source]

Configures a vertex attribute pointer for the currently bound vertex array object (VAO).

This function specifies the organization of vertex attribute data in a vertex buffer object (VBO). It defines the layout of data that will be passed to the vertex shader.

Parameters: index : int

The index of the generic vertex attribute to be specified.

sizeint, optional

The number of components per generic vertex attribute. Must be 1, 2, 3, or 4. Default is 3.

typeGLNumeric, optional

Data type of each component in the array. Default is GLNumeric.FLOAT.

normalizedGLBoolean, optional

Specifies whether fixed-point data values should be normalized or converted directly as fixed-point values when accessed. Default is GLBoolean.FALSE.

strideint, optional

Byte offset between consecutive vertex attributes. Default is 0.

pointerobject, optional

Offset of the first component of the first generic vertex attribute in the array. Default is None.