picogl.backend.modern.core.uniform.location_value
Provides functionality for setting a uniform variable in a shader program.
This module contains a single function that allows setting various types of uniform variables (e.g., float, int, vectors, matrices, numpy arrays, and sequences) for use in OpenGL shader programs. The function dynamically handles different data types and ensures correctness when passing values to the shader.
Function: - set_uniform_location_value: Sets the value of a specified uniform variable
in an OpenGL shader program.
Functions
|
set_uniform_value |
Module Contents
- picogl.backend.modern.core.uniform.location_value.set_uniform_location_value(location: int, uniform_value: float | int | pyglm.glm.vec2 | pyglm.glm.vec3 | pyglm.glm.vec4 | pyglm.glm.mat4 | numpy.ndarray | Sequence[float])[source]
set_uniform_value
- Parameters:
location (uniform) – int
uniform_value – Value to set (supports float, int, vec2, vec3, vec4, mat4, np.ndarray, or a 2/3/4-length float sequence)
Set a uniform variable in a shader program