mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
Update GLM to latest version (0.9.9.3). This includes GLM's change of matrices no longer default initializing to the identity matrix. This commit thus also includes the update of all of LearnOpenGL's code to reflect this: all matrices are now constructor-initialized to the identity matrix where relevant.
This commit is contained in:
@@ -251,7 +251,7 @@ int main()
|
||||
for (unsigned int i = 0; i < 10; i++)
|
||||
{
|
||||
// calculate the model matrix for each object and pass it to shader before drawing
|
||||
glm::mat4 model;
|
||||
glm::mat4 model = glm::mat4(1.0f); // make sure to initialize matrix to identity matrix first
|
||||
model = glm::translate(model, cubePositions[i]);
|
||||
float angle = 20.0f * i;
|
||||
model = glm::rotate(model, glm::radians(angle), glm::vec3(1.0f, 0.3f, 0.5f));
|
||||
|
||||
Reference in New Issue
Block a user