feat(viewport): add setUniform camera method

This commit is contained in:
parker
2025-06-26 16:18:58 +01:00
parent 568427e572
commit afebb33a6f
3 changed files with 9 additions and 4 deletions

View File

@@ -133,14 +133,11 @@ void ViewportGLWidget::paintGL()
);
glm::mat4 viewMatrix = curCamera.getViewMatrix();
GLint projMLoc = glGetUniformLocation(shaderProgram, "uProj");
glUniformMatrix4fv(projMLoc, 1, GL_FALSE, glm::value_ptr(projMatrix));
GLint viewMLoc = glGetUniformLocation(shaderProgram, "uView");
glUniformMatrix4fv(viewMLoc, 1, GL_FALSE, glm::value_ptr(viewMatrix));
curCamera.setUniform(viewMLoc);