Less shader boilerplate

This commit is contained in:
John Firebaugh
2014-09-04 13:55:03 -07:00
parent c14ae3c477
commit 1fedf0918a
37 changed files with 323 additions and 1029 deletions

View File

@@ -124,15 +124,6 @@ bool Shader::compileShader(GLuint *shader, GLenum type, const GLchar *source) {
return true;
}
void Shader::setMatrix(const std::array<float, 16>& newMatrix) {
if (matrix != newMatrix) {
glUniformMatrix4fv(u_matrix, 1, GL_FALSE, newMatrix.data());
matrix = newMatrix;
}
}
Shader::~Shader() {
if (program) {
glDeleteProgram(program);