picogl.backend.opengl
gl Backend Interface.
This module provides an interface for a gl backend implementation, which offers functionalities for managing OpenGL state, drawing meshes, managing materials, handling client-side arrays, and interacting with textures.
- Classes:
- GLBackend: A class defining the interface for the gl backend with
various methods for rendering and managing rendering states.
Attributes
Classes
Upload CPU mesh data to a reusable |
|
Upload |
|
Upload |
|
Fixed-function matrix, light, and material operations. |
|
Fixed-function and immediate-mode pipeline operations (legacy gl only). |
|
ALL rendering must go through this interface. |
|
Deprecated alias for |
Module Contents
- class picogl.backend.opengl.GLBindingStrategy[source]
Bases:
abc.ABCUpload CPU mesh data to a reusable
GPUMesh.- _last_gpu_mesh: picogl.backend.geometry.mesh.GPUMesh | None = None
- abstract upload(mesh: picogl.renderer.meshdata.MeshData) picogl.backend.geometry.mesh.GPUMesh[source]
- class picogl.backend.opengl.LegacyBinding[source]
Bases:
GLBindingStrategyUpload
MeshDatato a client-stateLegacyMesh.
- class picogl.backend.opengl.ModernBinding[source]
Bases:
GLBindingStrategyUpload
MeshDatato a VAO-backedModernMesh.- upload_gpu_object(mesh: Any) picogl.backend.geometry.mesh.GPUMesh[source]
Wrap an object that already has
vao/ebo/index_count.
- class picogl.backend.opengl.GLLegacyPipeline[source]
Fixed-function matrix, light, and material operations.
- static set_color_material(face=GLFace.FRONT_AND_BACK, mode=GLColorMaterialMode.AMBIENT_AND_DIFFUSE)[source]
- static tex_coord2f(coord: picogl.backend.gl.state.texture.TexCoord2f)[source]
- static vertex_3f(v1: picogl.backend.gl.state.texture.Vertex3f)[source]
- class picogl.backend.opengl.LegacyPipelineProtocol[source]
Bases:
ProtocolFixed-function and immediate-mode pipeline operations (legacy gl only).
- tex_coord2f(coord: picogl.backend.gl.state.texture.TexCoord2f)[source]
- vertex_3f(v1: picogl.backend.gl.state.texture.Vertex3f)[source]
- class picogl.backend.opengl.AbstractGLBackend[source]
Bases:
abc.ABCALL rendering must go through this interface.
- class picogl.backend.opengl.GLPipeline[source]
Bases:
picogl.backend.legacy.core.pipeline.LegacyPipelineProtocol,ProtocolDeprecated alias for
LegacyPipelineProtocol.Do not use for new code. Modern rendering uses
ShaderPipeline.