summary refs log tree commit diff
path: root/src/GFX/Shading/Uniform.cpp
blob: 71786ef1bbe8ad0273a7441538ed9d1c55a244d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <GL/glew.h>
#include "Uniform.hpp"

namespace MC::GFX::Shading {

void Uniform::set(const Matrix<4, 4>& value) const {
    glUniformMatrix4fv(m_index, 1, GL_TRUE, value.elements);
}

void Uniform::set(const Vector<3>& value) const {
    glUniform3f(m_index, value.x(), value.y(), value.z());
}

}