#pragma once #ifdef __linux__ #include #include #elif #include #include #endif #include #include #include "../../renderable.h" #include "../../vertex.h" #include "../../transformable.h" #include "../../optional.h" #include "../../gfx/vbo.h" #include "../../gfx/vao.h" #include "../../gfx/texture.h" #include "../../gfx/shader.h" #include #include namespace simpleengine::shapes_2d { class Square : public simpleengine::Renderable, public simpleengine::Transformable { private: using super = simpleengine::Renderable; private: gfx::Shader shader; nonstd::optional texture; public: std::vector vertices; std::vector indicies; gfx::VBO ebo; gfx::VBO vbo; gfx::VAO vao; Square(gfx::Shader shader, std::vector vertices, std::vector indicies); Square(std::shared_ptr shader_program, std::vector vertices, std::vector indicies); virtual ~Square() = default; void set_texture(gfx::Texture texture); virtual void update(const float& delta_time) override; virtual void render(GLFWwindow* target) override; }; }