picogl.backend.legacy.core.vertex.buffer.position

Classes

LegacyPositionVBO

OpenGL buffer class specialized for storing and managing position data,

Module Contents

class picogl.backend.legacy.core.vertex.buffer.position.LegacyPositionVBO(handle: int = None, data: numpy.ndarray = None, size: int = 3, target: int = GL_ARRAY_BUFFER, dtype: int = GL_FLOAT)[source]

Bases: picogl.backend.legacy.core.vertex.buffer.vertex.LegacyVBO

OpenGL buffer class specialized for storing and managing position data, commonly used for rendering ribbons_legacy-like geometry.

Inherits from LegacyVBO and adds behavior specific to position data, such as setting up the vertex pointer and handling data uploads.

SUPPORTED_GL_TYPES[source]
size = 3[source]
data = None[source]
draw_arrays(count: int = None, mode: int = GL_TRIANGLES)[source]
draw(index_count: int = None, index_type: int = GL_UNSIGNED_INT, mode: int = GL_TRIANGLES)[source]

Draw the buffer.

Parameters:
  • index_count – Number of indices to draw (default: self.index_count).

  • index_type – Data type of indices (e.g., GL_UNSIGNED_INT).

  • mode – OpenGL drawing mode (e.g., GL_TRIANGLES).

configure()[source]

Configure the vertex pointer for the position buffer.