picogl.backend.modern.core.shader.context

OpenGL context checks for shader compile/bind (Qt + headless).

Functions

clear_gl_errors(→ None)

Drain pending gl errors so the next call's status is meaningful.

gl_context_available(→ bool)

True when a gl context is current and glGetString(GL_VERSION) works.

require_gl_context(→ None)

program_is_valid(→ bool)

Module Contents

picogl.backend.modern.core.shader.context.clear_gl_errors(max_clear: int = 8) None[source]

Drain pending gl errors so the next call’s status is meaningful.

picogl.backend.modern.core.shader.context.gl_context_available() bool[source]

True when a gl context is current and glGetString(GL_VERSION) works.

picogl.backend.modern.core.shader.context.require_gl_context(operation: str) None[source]
picogl.backend.modern.core.shader.context.program_is_valid(program_id: int | None) bool[source]