-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvertices_data.txt
More file actions
63 lines (56 loc) · 2.03 KB
/
Copy pathvertices_data.txt
File metadata and controls
63 lines (56 loc) · 2.03 KB
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
float firstTriangle[] = {
// positions // colors
-0.1f, -0.5f, 0.0f, 1.0f, 0.0f, 0.0f, // bottom right
-0.5f, -0.5f, 0.0f, 0.0f, 1.0f, 0.0f, // bottom left
-0.2f, 0.5f, 0.0f, 0.0f, 0.0f, 1.0f // top
}; float secondTriangle[] = {
0.1f, -0.5f, 0.0f, // left 2
0.5f, -0.5f, 0.0f, // right 2
0.2f, 0.5f, 0.0f // top 2
}; // two triangles
//float vertices[] = {
// -0.5f, -0.5f, 0.0f, // left 1
// -0.1f, -0.5f, 0.0f, // right 1
// -0.2f, 0.5f, 0.0f, // top 1
// 0.1f, -0.5f, 0.0f, // left 2
// 0.5f, -0.5f, 0.0f, // right 2
// 0.2f, 0.5f, 0.0f // top 2
//};
// triangle
//float vertices[] = {
// -0.5f, -0.5f, 0.0f, // left
// 0.5f, -0.5f, 0.0f, // right
// 0.0f, 0.5f, 0.0f // top
//};
// rectangle
//float vertices[] = {
// 0.5f, 0.5f, 0.0f, // top right
// 0.5f, -0.5f, 0.0f, // bottom right
// -0.5f, -0.5f, 0.0f, // bottom left
// -0.5f, 0.5f, 0.0f // top left
//};
//unsigned int indices[] = { // note that we start from 0!
// 0, 1, 3, // first triangle
// 1, 2, 3 // second triangle
//};
// rectangle with color and texture coords
float vertices[] = {
// positions // colors // texture coords
0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, // top right
0.5f, -0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, // bottom right
-0.5f, -0.5f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, // bottom left
-0.5f, 0.5f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f // top left
};//float firstTriangle[] = {
// // positions // colors
// -0.1f, -0.5f, 0.0f, 1.0f, 0.0f, 0.0f, // bottom right
// -0.5f, -0.5f, 0.0f, 0.0f, 1.0f, 0.0f, // bottom left
// -0.2f, 0.5f, 0.0f, 0.0f, 0.0f, 1.0f // top
//}; //float secondTriangle[] = {
// 0.1f, -0.5f, 0.0f, // left
// 0.5f, -0.5f, 0.0f, // right
// 0.2f, 0.5f, 0.0f // top
//};