22 lines
572 B
C++
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
|