initial version
This commit is contained in:
37
cube.h
Normal file
37
cube.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifndef CUBE_H
|
||||
#define CUBE_H
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
static const GLfloat cubeVertices[] = {
|
||||
-1.0f, -1.0f, -1.0f,
|
||||
-1.0f, -1.0f, 1.0f,
|
||||
-1.0f, 1.0f, -1.0f,
|
||||
-1.0f, 1.0f, 1.0f,
|
||||
1.0f, -1.0f, -1.0f,
|
||||
1.0f, -1.0f, 1.0f,
|
||||
1.0f, 1.0f, -1.0f,
|
||||
1.0f, 1.0f, 1.0f,
|
||||
};
|
||||
|
||||
static const GLfloat cubeColors[] = {
|
||||
0.0f, 0.0f, 0.0f,
|
||||
0.0f, 0.0f, 1.0f,
|
||||
0.0f, 1.0f, 0.0f,
|
||||
0.0f, 1.0f, 1.0f,
|
||||
1.0f, 0.0f, 0.0f,
|
||||
1.0f, 0.0f, 1.0f,
|
||||
1.0f, 1.0f, 0.0f,
|
||||
1.0f, 1.0f, 1.0f,
|
||||
};
|
||||
|
||||
static const GLuint cubeFaces[] = {
|
||||
5, 4, 7, 7, 4, 6,
|
||||
1, 5, 3, 3, 5, 7,
|
||||
0, 1, 2, 2, 1, 3,
|
||||
4, 0, 6, 6, 0, 2,
|
||||
7, 6, 3, 3, 6, 2,
|
||||
1, 0, 4, 1, 4, 5,
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user