shader matrix support

This commit is contained in:
2023-06-03 16:30:23 +02:00
parent e7f9ca2b6c
commit a2d8984199
2 changed files with 6 additions and 0 deletions

View File

@@ -67,6 +67,10 @@ void ShaderProgram::LoadBoolean(unsigned int location, bool value) const {
glUniform1i(static_cast<GLint>(location), value);
}
void ShaderProgram::LoadMat4(unsigned int location, const maths::Mat4f& mat) const {
glUniformMatrix4fv(static_cast<GLint>(location), 1, false, reinterpret_cast<const float*>(&mat));
}
void ShaderProgram::CleanUp() const {
Stop();
glDetachShader(m_ProgramID, m_VertexShaderID);