#ifndef MESH_H
#define MESH_H

#include <glm/glm.hpp>
#include <vector>
#include <opengl-playground/vertex.hpp>
#include <opengl-playground/opengltexture.hpp>
#include <opengl-playground/openglgraphics.hpp>
#include <opengl-playground/material.hpp>

class Mesh : public OpenGlGraphics
{
	public:
		Mesh(std::vector<Vertex> vertices, std::vector<unsigned int> indices,
		     const Material &mat,
		     std::shared_ptr<OpenGlShaderProgram> shader);
		std::vector<Vertex> vertices;
		std::vector<unsigned int> indices;
		Material material;
		void realize();
		void render();
		void render(const glm::mat4 &model_matrix, const glm::mat4 &normal_matrix);
	private:
		unsigned int vao;
		unsigned int vbo;
		unsigned int ebo;
};

#endif // MESH_H
