picogl.gpu.buffers.vertex.registry

A module for managing OpenGL object information.

This module defines a data structure for representing OpenGL object info, and provides a registry to store and manage these objects. It includes details such as object handle, type, label, creation time, and associated attributes.

Attributes

GL_REGISTRY

Classes

GLObjectAttrs

gl Object Attributes

GLObjectInfo

Functions

debug_vao(vao)

dump_gl_registry(→ None)

Log registered VAOs on shutdown.

store_in_gl_registry(handle, label, ctx_id[, buffer_type])

store in gl registry

Module Contents

class picogl.gpu.buffers.vertex.registry.GLObjectAttrs[source]

gl Object Attributes

handle = 'handle'[source]
label = 'label'[source]
created_context = 'created_context'[source]
current_context = 'current_context'[source]
class picogl.gpu.buffers.vertex.registry.GLObjectInfo[source]
handle: int[source]
type: str[source]
label: str[source]
created_at: float[source]
context_id: int | None = None[source]
attributes: dict[source]
picogl.gpu.buffers.vertex.registry.GL_REGISTRY: Dict[int, GLObjectInfo][source]
picogl.gpu.buffers.vertex.registry.debug_vao(vao)[source]
picogl.gpu.buffers.vertex.registry.dump_gl_registry(verbose: bool | None = None) None[source]

Log registered VAOs on shutdown.

  • Always logs a sorted summary (counts by label) to the logger and prints that line to stdout so it stays visible above profilers or truncated IDE output.

  • Logs one line per VAO at INFO by default (same as pre-summary behaviour).

  • DUMP_GL_REGISTRY_QUIET=1 — summary only (no per-VAO lines).

  • DUMP_GL_REGISTRY_VERBOSE=0 — same as quiet (optional alias).

  • Force full listing: pass verbose=True (overrides quiet).

picogl.gpu.buffers.vertex.registry.store_in_gl_registry(handle: int, label: str, ctx_id: int, buffer_type: str = 'VAO')[source]

store in gl registry