-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQuad.cpp
More file actions
37 lines (23 loc) · 676 Bytes
/
Copy pathQuad.cpp
File metadata and controls
37 lines (23 loc) · 676 Bytes
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
#include "Quad.h"
Quad::Quad() : Mesh(true, false){
vertices = {glm::vec3(-1.0, -1.0, -1.0),
glm::vec3(-1.0, 1.0, -1.0),
glm::vec3(1.0, -1.0, -1.0),
glm::vec3(1.0, 1.0, -1.0)
};
std::cerr << "Initialising RAY-QUAD" << std::endl;
Mesh::indices = {0, 1, 2, 1, 2, 3};
attachMesh();
}
void Quad::attachMesh(){
Mesh::attachMesh();
numVertices = vertices.size();
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
glEnableVertexAttribArray(0);
}
void Quad::draw(){
std::cout << "Drawing" << std::endl;
Mesh::draw();
}
void Quad::createFaces(){
}