#ifndef MESH_H
#define MESH_H

#include "Texture.h"
#include <glm/glm.hpp>
#include <vector>

//Aggregate class -> so following construction is available
//Vertex2D{glm::vec2(-0.5f,-0.5f), glm::vec2(0.0f,1.0f)}
struct Vertex2D
{
	glm::vec2 position;
	glm::vec2 texCoord;
};

class Mesh
{
  private:
	unsigned int VBO, VAO, EBO;

	void setupMesh();

  public:
	/*  Mesh Data  */
	std::vector<Vertex2D> vertices;
	std::vector<unsigned int> indices;
	Texture2D texture;

	Mesh(std::vector<Vertex2D> vertices, std::vector<unsigned int> indices, Texture2D textures);
	~Mesh();

	unsigned int getIndicesCount() const;
	void bindVAO() const;
	void bindTexture() const;
};

#endif
