picogl.backend.gl.task.gl_init

Module for executing sequences of OpenGL tasks in a specified order.

This module provides a utility function to execute a list of OpenGL-related tasks using a provided backend. Each task is represented by a tuple that includes an optional message to log and a callable representing the task to be executed.

Classes and Functions: - execute_gl_tasks: Executes a list of OpenGL task tuples, optionally logging the progress

or providing step callbacks.

Attributes

legacy_init_gl_list

paint_gl_list

modern_init_gl_list

Classes

GLTask

Functions

set_clear_color_only(→ None)

Set the clear color without clearing (safe before the default FBO is ready).

clear_to_color(→ None)

Apply a clear color and clear the color/depth buffers.

execute_gl_tasks(task_list, backend, *[, on_step])

Module Contents

picogl.backend.gl.task.gl_init.set_clear_color_only(backend: picogl.backend.gl.backend.GLBackend, color: tuple[float, float, float, float]) None[source]

Set the clear color without clearing (safe before the default FBO is ready).

picogl.backend.gl.task.gl_init.clear_to_color(backend: picogl.backend.gl.backend.GLBackend, color: tuple[float, float, float, float]) None[source]

Apply a clear color and clear the color/depth buffers.

class picogl.backend.gl.task.gl_init.GLTask[source]
message: str | None[source]
func: Callable[[picogl.backend.gl.backend.GLBackend], None][source]
picogl.backend.gl.task.gl_init.execute_gl_tasks(task_list: list[GLTask], backend: picogl.backend.gl.backend.GLBackend, *, on_step: Callable[[int, int, str | None], None] | None = None)[source]
picogl.backend.gl.task.gl_init.legacy_init_gl_list[source]
picogl.backend.gl.task.gl_init.paint_gl_list[source]
picogl.backend.gl.task.gl_init.modern_init_gl_list[source]