picogl.backend.gl.driver.frame
A module providing helper operations for framebuffer execution, including clearing framebuffer and setting viewport.
This module utilizes OpenGL commands to perform operations like clearing the framebuffer with specified colors and configuring the viewport for rendering.
Classes
Framebuffer execution helpers for clear and viewport operations. |
Module Contents
- class picogl.backend.gl.driver.frame.GLFrameDriver[source]
Framebuffer execution helpers for clear and viewport operations.
- set_clear_background_and_color(color=(0.0, 0.0, 0.0, 1.0))[source]
Clears the screen to a specified color using OpenGL commands.
This method sets the clear color and then clears the color buffer to ensure the screen is rendered with the specified or default background color.
- static bind_framebuffer(framebuffer: int) None[source]
Bind the window-system default framebuffer (required on some Qt/macOS paths).
- bind_default_framebuffer() None[source]
Bind the window-system default framebuffer (required on some Qt/macOS paths).
- set_clear_color_only(color: tuple[float, float, float, float]) None[source]
Set the clear color without clearing (safe before the default FBO is ready).
- clear_background()[source]
Clears the background by removing all color and depth information from the current OpenGL framebuffer.
This method clears the framebuffer’s color and depth buffers, preparing it for rendering the next frame.
- Raises:
OpenGL.gl.error.GLError – If an OpenGL error occurs during the
clearing operation. –