#ifndef MESH_VIEW_H
#define MESH_VIEW_H

#include "mesh_processor.h"
#include <QOpenGLExtraFunctions>
#include <QOpenGLShaderProgram>
#include <QOpenGLVertexArrayObject>
#include <QOpenGLBuffer>


class MeshView {
	QOpenGLVertexArrayObject vao;
	QOpenGLBuffer vertex_buffer;
	QOpenGLBuffer index_buffer;
	QOpenGLBuffer holes_index_buffer;
	unsigned n_faces;
	unsigned n_vertices;
	unsigned n_boundary_halfedges;

public:
	const MeshProcessor &mesh_processor;

	MeshView(const MeshProcessor &mesh_processor, QOpenGLShaderProgram &program);
	~MeshView();
	void paint(QOpenGLShaderProgram &program);
};


#endif