91

##### OpenGL / Per mesh model matrices

« Last post by**Mihai_Ionut_Floares**on

*December 01, 2020, 10:20:43*»

I figured out the movementof the camera trough scene and the perspective/view/model matrices that I created from scratch sine I didn't want to use JOML. It is working: https://streamable.com/1exa27

But now I want to add another mesh, but the meshes share the same model matrix. The projection and view matrices should be the same, but the model should be different because when I translate one object, all meshes are translated. The matrices are sent to vertex shader, but I can't figure out how to make per mesh model matrices. I guess I need per mesh shaders???

But now I want to add another mesh, but the meshes share the same model matrix. The projection and view matrices should be the same, but the model should be different because when I translate one object, all meshes are translated. The matrices are sent to vertex shader, but I can't figure out how to make per mesh model matrices. I guess I need per mesh shaders???