ShaderState
A class for managing shader states in the rendering pipeline.
Constructor
ShaderState(
fragment_file_path: str,
uniform_buffer_count: int = 0
)Parameters
fragment_file_path: Path to the fragment shader file.uniform_buffer_count: Number of uniform buffers used by the shader. Default is 0.
Methods
Bind
bind() → NoneBind the shader state. This will also unbind any currently bound shader state.
Unbind
unbind() → NoneUnbind the shader state.
Set Uniform
set_uniform(binding: int, data: Buffer | bytes) → NoneSet the uniform variable in the shader.
Parameters
binding: The binding point of the uniform variable.data: The data to set the uniform variable to.