shaders to 3d

This commit is contained in:
2023-06-03 16:35:17 +02:00
parent ca268781fd
commit 4e866c1032
5 changed files with 65 additions and 100 deletions

View File

@@ -6,13 +6,10 @@ namespace td {
namespace shader {
class EntityShader : public ShaderProgram {
private:
unsigned int m_LocationCam = 0;
unsigned int m_LocationZoom = 0;
unsigned int m_LocationAspectRatio = 0;
unsigned int m_LocationTranslation = 0;
unsigned int m_LocationViewtype = 0;
unsigned int m_LocationProjectionMatrix = 0;
unsigned int m_LocationViewMatrix = 0;
unsigned int m_LocationPosition = 0;
unsigned int m_LocationColorEffect = 0;
protected:
virtual void GetAllUniformLocation();
@@ -20,12 +17,11 @@ public:
EntityShader();
void LoadShader();
void SetCamPos(const Vec2f& camPos);
void SetZoom(float zoom);
void SetAspectRatio(float aspectRatio);
void SetModelPos(const Vec2f& modelPos);
void SetIsometricView(float isometric);
void SetColorEffect(const Vec3f& color);
void SetProjectionMatrix(const maths::Mat4f& proj) const;
void SetViewMatrix(const maths::Mat4f& view) const;
void SetModelPos(const Vec2f& pos) const;
};
} // namespace shader