remove glm dependency
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include "Defines.h"
|
||||
#include <memory>
|
||||
#include "loader/GLLoader.h"
|
||||
#include "render/shaders/WorldShader.h"
|
||||
@@ -15,17 +15,17 @@ public:
|
||||
|
||||
struct Model {
|
||||
GL::VertexArray* vao;
|
||||
glm::vec2 positon;
|
||||
Vec2f positon;
|
||||
};
|
||||
private:
|
||||
std::unique_ptr<shader::WorldShader> m_WorldShader;
|
||||
std::unique_ptr<shader::EntityShader> m_EntityShader;
|
||||
|
||||
glm::vec3 m_BackgroundColor;
|
||||
Vec3f m_BackgroundColor;
|
||||
|
||||
bool m_IsometricView = true;
|
||||
float m_IsometricShade = m_IsometricView;
|
||||
glm::vec2 m_CamPos{};
|
||||
Vec2f m_CamPos{};
|
||||
public:
|
||||
Renderer();
|
||||
~Renderer();
|
||||
@@ -39,13 +39,13 @@ public:
|
||||
void RenderModel(const Model& model);
|
||||
|
||||
void SetZoom(float zoom);
|
||||
void SetCamMovement(const glm::vec2& mov);
|
||||
void SetCamPos(const glm::vec2& newPos);
|
||||
void SetCamMovement(const Vec2f& mov);
|
||||
void SetCamPos(const Vec2f& newPos);
|
||||
void SetIsometricView(bool isometric); // false = 2D true = Isometric
|
||||
|
||||
void SetBackgroundColor(const glm::vec3& color) { m_BackgroundColor = color; }
|
||||
void SetBackgroundColor(const Vec3f& color) { m_BackgroundColor = color; }
|
||||
|
||||
glm::vec2 GetCursorWorldPos(const glm::vec2& cursorPos, float aspectRatio, float zoom, float windowWidth, float windowHeight);
|
||||
Vec2f GetCursorWorldPos(const Vec2f& cursorPos, float aspectRatio, float zoom, float windowWidth, float windowHeight);
|
||||
private:
|
||||
void UpdateIsometricView();
|
||||
void UpdateIsometricFade();
|
||||
|
||||
Reference in New Issue
Block a user