picogl.backend.gl.api.buffer.upload

Typed helpers for uploading CPU arrays into the currently bound GL buffer.

Functions

_ctypes_array(ctype, data) → ctypes.Array

Build a filled ctypes array instance (not an array type).

gl_upload_float_buffer(data[, buffer_target]) → None

Upload float vertex/attribute data to the bound buffer.

gl_upload_ushort_buffer(data[, buffer_target]) → None

Upload unsigned-short index data to the bound element buffer.

Module Contents

picogl.backend.gl.api.buffer.upload._ctypes_array(ctype, data: Sequence) → ctypes.Array[source]

Build a filled ctypes array instance (not an array type).

picogl.backend.gl.api.buffer.upload.gl_upload_float_buffer(data: list[float], buffer_target: picogl.backend.gl.enums.GLBufferTarget = GLBufferTarget.ARRAY) → None[source]

Upload float vertex/attribute data to the bound buffer.

picogl.backend.gl.api.buffer.upload.gl_upload_ushort_buffer(data: list[int], buffer_target: picogl.backend.gl.enums.GLBufferTarget = GLBufferTarget.ELEMENT) → None[source]

Upload unsigned-short index data to the bound element buffer.