MeshProgram
- moderngl_window.scene.MeshProgram[source]
Describes how a mesh is rendered using a specific shader program
Methods
- MeshProgram.__init__(program: Program = None, **kwargs)[source]
Initialize.
- Parameters:
program – The moderngl program
- MeshProgram.draw(mesh, projection_matrix: ndarray = None, model_matrix: ndarray = None, camera_matrix: ndarray = None, time=0.0)[source]
Draw code for the mesh
- Parameters:
mesh (Mesh) – The mesh to render
- Keyword Arguments:
projection_matrix (numpy.ndarray) – projection_matrix (bytes)
model_matrix (numpy.ndarray) – view_matrix (bytes)
camera_matrix (numpy.ndarray) – camera_matrix (bytes)
time (float) – The current time
Attributes
- MeshProgram.ctx
The current context
- Type:
moderngl.Context