/* * Renderer.h * * Created on: 4 nov. 2020 * Author: simon */ #ifndef RENDER_RENDERER_H_ #define RENDER_RENDERER_H_ #include #include "loader/GLLoader.h" namespace td { namespace render{ namespace Renderer{ struct Model{ GL::VAO* vao; glm::vec2 positon; }; bool init(); void destroy(); void prepare(); void resize(const int width, const int height); void renderVAO(const GL::VAO& vao); void renderModel(const Model& model); void setZoom(float zoom); void setCamMovement(const glm::vec2& mov); void setCamPos(const glm::vec2& newPos); void setIsometricView(bool isometric); // false = 2D true = Isometric glm::vec2 getCursorWorldPos(const glm::vec2& cursorPos, float aspectRatio, float zoom, float windowWidth, float windowHeight); } } // namespace render } // namespace td #endif /* RENDER_RENDERER_H_ */