-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPGround.h
62 lines (47 loc) · 1.29 KB
/
PGround.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
50
51
52
53
54
55
56
57
58
59
60
61
62
#pragma once
#ifndef PGROUND
#define PGROUND
// Include
#include <GL\glew\glew.h>
#include <GL\GLSLFactory.h>
#include <GL\CGTextureLoader.h>
#include <CoreStructures\GUMatrix4.h>
#include <CoreStructures\GUVector2.h>
#include <CoreStructures\GUVector4.h>
// ---------------------------------------------------------------------
// PGround (Project Ground) - Used to render the ground surface
// ---------------------------------------------------------------------
class PGround
{
// ---------------------------------------------------------------------
private:
// ATTRIBUTES
// Vertex, Index and texture coordinate data
CoreStructures::GUVector4 vertices[4];
CoreStructures::GUVector2 texcoord[4];
GLuint indices[6];
// Vertex Array Object & Vertex Buffer Objects
GLuint VAO_ground;
GLuint VBO_position;
GLuint VBO_index;
GLuint VBO_texture;
// Texture
GLuint texture;
// Shader
GLuint shader;
// METHODS
void loadShader();
void loadTexture();
void setupVertexData();
void setupVertexArrayObject();
// ---------------------------------------------------------------------
public:
// Constructor / Decontructor
PGround();
~PGround();
// Initialise
void Initialise();
// Render
void Render(const CoreStructures::GUMatrix4& T);
};
#endif