parent
2998f8671b
commit
11202bf299
@ -1389,14 +1389,14 @@ void DrawMesh(Mesh mesh, Material material, Matrix transform)
|
||||
if (material.shader.locs[SHADER_LOC_MATRIX_VIEW] != -1) rlSetUniformMatrix(material.shader.locs[SHADER_LOC_MATRIX_VIEW], matView);
|
||||
if (material.shader.locs[SHADER_LOC_MATRIX_PROJECTION] != -1) rlSetUniformMatrix(material.shader.locs[SHADER_LOC_MATRIX_PROJECTION], matProjection);
|
||||
|
||||
// Model transformation matrix is sent to shader uniform location: SHADER_LOC_MATRIX_MODEL
|
||||
if (material.shader.locs[SHADER_LOC_MATRIX_MODEL] != -1) rlSetUniformMatrix(material.shader.locs[SHADER_LOC_MATRIX_MODEL], transform);
|
||||
|
||||
// Accumulate several model transformations:
|
||||
// transform: model transformation provided (includes DrawModel() params combined with model.transform)
|
||||
// rlGetMatrixTransform(): rlgl internal transform matrix due to push/pop matrix stack
|
||||
matModel = MatrixMultiply(transform, rlGetMatrixTransform());
|
||||
|
||||
// Model transformation matrix is sent to shader uniform location: SHADER_LOC_MATRIX_MODEL
|
||||
if (material.shader.locs[SHADER_LOC_MATRIX_MODEL] != -1) rlSetUniformMatrix(material.shader.locs[SHADER_LOC_MATRIX_MODEL], matModel);
|
||||
|
||||
// Get model-view matrix
|
||||
matModelView = MatrixMultiply(matModel, matView);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user