#ifndef GLTEST_MESH_H
#define GLTEST_MESH_H

#include "vertex.h"
#include "../Shaders/ShaderProgram.h"
#include "GLObject.h"

#include <cstddef>
#include <GL/glew.h>
#include <glm/glm.hpp>


class Mesh: public GLObject {
protected:
	std::size_t _size;

public:
	Mesh(ShaderProgram* shader, std::size_t size);
	virtual ~Mesh();

protected:
	VertexArray generateVertices() const override final;
	IndexArray generateIndices() const override final;

protected:
	virtual float heightMapFunc(std::size_t nx, std::size_t ny, float fx, float fy) const = 0;
};


#endif //GLTEST_MESH_H
