ShaderState
Encapsulates a GPU shader and its associated render state.
Constructor
-
ShaderState(
fragment_file_path: str,
uniform_buffer_count: SupportsInt = 0
) → ShaderState
Encapsulates a GPU shader and its associated render state.
Methods
Bind
bind() → NoneBinds this shader state to the current render pass, making it active for subsequent draw calls.
Set Uniform
set_uniform(binding: SupportsInt, data: Buffer) → NoneSet uniform data for the fragment shader at the specified binding point.
Args
binding: Uniform buffer binding index.data: Buffer or bytes object containing the uniform data to upload.
Unbind
unbind() → NoneUnbinds the current shader state, reverting to the default render state.