#pragma once #include #include "glad/glad.h" #include #include "texture.hpp" class Batch { public: unsigned int VAO, VBO, EBO; std::vector vertices = {}; std::vector indices = {}; unsigned int size, batch_limit; unsigned int last_texture = 0; Batch(unsigned int batch_limit = 8192); int drawTexture( Texture texture, float x, float y, float width, float height, glm::vec4 color ); int drawRectangle( float x, float y, float width, float height, glm::vec4 color ); void flush_batch(); private: int primativeDrawQuad( unsigned int texture_id, glm::vec3 a, glm::vec3 b, glm::vec3 c, glm::vec3 d, glm::vec4 color ); };