picogl.backend.gl.resource

Module providing the base class for OpenGL-managed resources.

This module includes the GLResource class, which serves as a base class for all objects that are owned and managed by an OpenGL context. It ensures that objects are properly associated with the OpenGL context in which they were created and provides utility functions to validate that context.

Classes

GLResource

Base class for all gl-owned objects.

Functions

_current_qt_context()

Return current QOpenGLContext if PySide6 is already imported; else None.

Module Contents

picogl.backend.gl.resource._current_qt_context()[source]

Return current QOpenGLContext if PySide6 is already imported; else None.

class picogl.backend.gl.resource.GLResource(handle)[source]

Base class for all gl-owned objects.

_creation_context = None[source]
_deleted = False[source]
_handle[source]
property context[source]
validate_context()[source]