cut down on redundant gl uniform changes

This commit is contained in:
Konstantin Käfer
2014-02-13 16:21:51 +01:00
parent f5846e1ebb
commit da06a52056
15 changed files with 249 additions and 74 deletions

View File

@@ -143,7 +143,7 @@ bool Shader::compileShader(GLuint *shader, GLenum type, const GLchar *source) {
}
void Shader::setMatrix(const mat4& newMatrix) {
void Shader::setMatrix(const std::array<float, 16>& newMatrix) {
if (matrix != newMatrix) {
glUniformMatrix4fv(u_matrix, 1, GL_FALSE, newMatrix.data());
matrix = newMatrix;