Files
Tower-Defense2/include/td/render/shader/EntityShader.h
2025-07-16 00:32:40 +02:00

31 lines
646 B
C++

#pragma once
#include <td/render/shader/ShaderProgram.h>
namespace td {
namespace shader {
class EntityShader : public ShaderProgram {
private:
unsigned int m_LocationProjectionMatrix = 0;
unsigned int m_LocationViewMatrix = 0;
unsigned int m_LocationPosition = 0;
unsigned int m_LocationColorEffect = 0;
protected:
virtual void GetAllUniformLocation();
public:
EntityShader();
void LoadShader();
void SetColorEffect(const Vec3f& color);
void SetProjectionMatrix(const Mat4f& proj) const;
void SetViewMatrix(const Mat4f& view) const;
void SetModelPos(const Vec3f& pos) const;
};
} // namespace shader
} // namespace td