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