picogl.backend.modern.core.shader.context ========================================= .. py:module:: picogl.backend.modern.core.shader.context .. autoapi-nested-parse:: OpenGL context checks for shader compile/bind (Qt + headless). Functions --------- .. autoapisummary:: picogl.backend.modern.core.shader.context.clear_gl_errors picogl.backend.modern.core.shader.context.gl_context_available picogl.backend.modern.core.shader.context.require_gl_context picogl.backend.modern.core.shader.context.program_is_valid Module Contents --------------- .. py:function:: clear_gl_errors(max_clear: int = 8) -> None Drain pending gl errors so the next call's status is meaningful. .. py:function:: gl_context_available() -> bool True when a gl context is current and ``glGetString(GL_VERSION)`` works. .. py:function:: require_gl_context(operation: str) -> None .. py:function:: program_is_valid(program_id: int | None) -> bool