picogl.backend.modern.core.uniform.mvp
This module provides utilities for setting the Model-View-Projection (MVP) matrix uniforms in a given shader program. It includes functions that abstract the process of locating and updating uniform variables for shaders that utilize MVP matrices.
This module primarily leverages OpenGL utilities and matrix libraries such as numpy and pyglm to interact with shaders.
Functions: - set_mvp_uniform: Sets the MVP matrix uniform in a given shader program. - shader_uniform_set_mvp: Assigns the MVP matrix uniform in the shader
program using either numpy or pyglm matrix formats.
Functions
|
set_mvp_uniform |
|
shader_uniform_set_mvp |
Module Contents
- picogl.backend.modern.core.uniform.mvp.set_mvp_uniform(shader: picogl.backend.modern.core.shader.program.ShaderProgram = None, mvp: pyglm.glm.mat4 = None) None[source]
set_mvp_uniform
- Parameters:
shader
mvp
- Returns:
None
Set the model_matrix-view-projection matrix uniform in the shader program.
- picogl.backend.modern.core.uniform.mvp.shader_uniform_set_mvp(shader_program: int, mvp_matrix: numpy.ndarray | pyglm.glm.mat4)[source]
shader_uniform_set_mvp
- Parameters:
mvp_matrix – np.ndarray or glm.mat4 - model_matrix-view-projection matrix
:param shader_program :return: None