Files
Tower-Defense2/src/td/render/shader/CameraShaderProgram.cpp
2025-07-16 13:38:02 +02:00

22 lines
572 B
C++

#include <td/render/shader/CameraShaderProgram.h>
namespace td {
namespace shader {
void CameraShaderProgram::SetProjectionMatrix(const Mat4f& proj) const {
LoadMat4(m_LocationProjection, proj);
}
void CameraShaderProgram::SetViewMatrix(const Mat4f& view) const {
LoadMat4(m_LocationView, view);
}
void CameraShaderProgram::GetAllUniformLocation() {
m_LocationProjection = static_cast<unsigned int>(GetUniformLocation("projectionMatrix"));
m_LocationView = static_cast<unsigned int>(GetUniformLocation("viewMatrix"));
}
} // namespace shader
} // namespace td