From ea5acc464f1ae5b011ee9ff814efe9febdba8df9 Mon Sep 17 00:00:00 2001 From: Nigel Date: Sat, 12 Feb 2022 21:40:38 +0100 Subject: [PATCH] Slight cleanup --- src/main.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index f957476..dd80cd6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -253,15 +253,9 @@ int main() { // Pass a matrix to the shader - unsigned int ModelMatrixLoc = glGetUniformLocation(shader.ID, "model"); - glUniformMatrix4fv(ModelMatrixLoc, 1, GL_FALSE, glm::value_ptr(model)); - - unsigned int ViewMatrixLoc = glGetUniformLocation(shader.ID, "view"); - glUniformMatrix4fv(ViewMatrixLoc, 1, GL_FALSE, &view[0][0]); - - unsigned int ProjectionMatrixLoc = glGetUniformLocation(shader.ID, "projection"); - glUniformMatrix4fv(ProjectionMatrixLoc, 1, GL_FALSE, &projection[0][0]); + shader.setMat4("view", view); + shader.setMat4("projection", projection); glBindVertexArray(VAO);