picogl.backend.gl.api.matrix ============================ .. py:module:: picogl.backend.gl.api.matrix .. autoapi-nested-parse:: This module provides utility functions to interact with OpenGL's matrix mode and to load matrices using predefined OpenGL methods. It utilizes OpenGL's 1.0 version for matrix operations and maintains compatibility with legacy OpenGL matrix modes. Functions in this module include setting the matrix mode and loading a matrix into the current matrix stack. Functions --------- .. autoapisummary:: picogl.backend.gl.api.matrix.gl_matrix_mode picogl.backend.gl.api.matrix.gl_load_matrixf Module Contents --------------- .. py:function:: gl_matrix_mode(mode: picogl.backend.gl.enums.legacy.GLLegacyMatrixMode) Sets the current matrix mode for subsequent matrix operations. This function is used to specify which matrix stack is the target for matrix operations such as load, multiply, or push/pop. :param mode: The matrix mode to be set. It specifies whether :type mode: GLLegacyMatrixMode :param the current matrix stack is the modelview: :param projection: :param or texture matrix: :param stack.: .. py:function:: gl_load_matrixf(matrix: Optional[Union[numpy.ndarray, pyglm.glm.mat4]]) Loads a matrix into the OpenGL matrix stack. This function takes a matrix, which can either be a NumPy array or a glm.mat4 matrix, and loads it into the OpenGL matrix stack using the glLoadMatrixf function. Parameters: matrix (Optional[Union[np.ndarray, glm.mat4]]): The matrix to be loaded into the OpenGL matrix stack. This can be a NumPy array or a glm.mat4 matrix.