-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlanarMesh.h
49 lines (36 loc) · 972 Bytes
/
PlanarMesh.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once
#include "glut\glew-1.11.0\include\GL\glew.h"
#include "glm-0.9.7.1/glm/glm.hpp"
#define BUFFERPOINTSQUANTITY 6
#define TEXTURESQUANTITY 4
#define STEP 0.1
#define DEFAULT_X 10
#define DEFAULT_Y 10
class PLANARMESH
{
public:
enum textureNumbers { first, second, third, fourth } textureNumber;
PLANARMESH ();
~PLANARMESH ();
void LoadTexture (textureNumbers _textureNumber, const char * fragment_file_path );
void ChangeMeshSize (int _x, int _y);
void CreateUVBuffer ();
public:
int x, y;
GLuint Textures[ TEXTURESQUANTITY ];
GLfloat Vertices [BUFFERPOINTSQUANTITY * 3];
GLfloat uvVertices [BUFFERPOINTSQUANTITY * 2];
GLuint VertexShaderID, FragmentShaderID;
GLuint vertexShaderID;
GLuint fragmentShaderID;
GLuint programID;
GLuint TextureID1;
GLuint TextureID2;
GLuint TextureID3;
GLuint TextureID4;
GLuint vertexbuffer;
GLuint uvbuffer;
GLuint VertexArrayID;
GLuint MatrixID;
glm::mat4 MVP;
};