#pragma once

#include <glm/glm.hpp>
#include <vector>
#include <cstdint>
#include <iostream>
#include <memory>

#include "shader.h"
#include "texture.h"

namespace kek {

struct Vertex {
	glm::vec3 pos;
	glm::vec3 normal;
	glm::vec2 texCoords;

	Vertex(glm::vec3 pos, glm::vec3 normal, glm::vec2 texCoords);

};

struct Material {

public:
	std::shared_ptr<Texture> ambient;
	std::shared_ptr<Texture> diffuse;
	std::shared_ptr<Texture> specular;
	float shininess;

	Material(std::shared_ptr<Texture> ambient, std::shared_ptr<Texture> diffuse, std::shared_ptr<Texture> specular, float shininess);

};

class Mesh {

public:
	std::vector<Vertex> vertices;
	std::vector<uint32_t> indices;
	Material *material;

	unsigned int vao, vbo, ebo;

	Mesh(std::vector<Vertex> vertices, std::vector<uint32_t> indices, Material *material);

	~Mesh();

	void draw(Shader *shader);

};

}
