-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMesh.h
24 lines (24 loc) · 855 Bytes
/
Mesh.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once
#include <GL\glew.h>
#include <glm/glm.hpp>
class Mesh
{
public:
//Constructor
Mesh();
//Destructor
~Mesh();
//Creates mesh from vertices and indices
void CreateMesh(GLfloat* Vertices, unsigned int* Indices, unsigned int NumberOfVertices, unsigned int NumberOfIndices);
//Renders the created mesh
void RenderMesh();
//Removes the mesh
void RemoveMesh();
private:
//VAO,VBO,IBO location ID
GLuint Vao, Vbo, Ibo;
//Index count which stores number of indices
GLsizei IndexCount;
//Calculates average normals.Finding average normals ensures that for a given face, the normals of all points in that face point in the same direction.Used during lighting
//void CalculateAverageNormals(unsigned int* Indices, unsigned int IndiceCount, GLfloat* Vertices, unsigned int VerticeCount, unsigned int vLength, unsigned int normalOffset);
};