-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.h
77 lines (59 loc) · 1.36 KB
/
types.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//
// Created by Afterwind on 9/23/2017.
//
#ifndef GAMEENGINE_TYPES_H
#define GAMEENGINE_TYPES_H
#include <GL/glew.h>
#include <kazmath/kazmath.h>
#include <stdbool.h>
typedef struct geVertex {
kmVec3 pos;
kmVec3 normal;
kmVec3 texCoords;
} geVertex;
typedef struct geShape {
geVertex* vertices;
GLuint* indices;
unsigned long long numVertices;
unsigned long long numIndices;
unsigned long long offsetBytesVertex;
unsigned long long offsetBytesIndex;
GLuint vao;
} geShape;
typedef struct geObject {
GLuint texture;
geShape* shape;
kmVec3 pos;
kmVec3 size;
kmVec3 rotation;
bool exemptFromView;
bool exemptFromViewTranslation;
bool exemptFromViewProjection;
GLushort glTextureId;
GLushort glTextureType;
GLfloat extraBrightness;
} geObject;
typedef struct geCamera {
kmVec3 pos;
kmVec3 direction;
kmVec3 up;
float aspectRatio;
kmVec3 rotation;
} geCamera;
typedef struct gePlane {
geVertex* vertices;
unsigned long long numVertices;
} gePlane;
typedef struct geWorld {
long long ***map;
size_t sizeX, sizeY, sizeZ;
size_t numBlocks;
unsigned char algorithm;
// For rendering
geObject* object;
geShape shape;
gePlane* planesUncompressed[6];
gePlane* planes[6];
size_t numPlanes[6];
} geWorld;
#endif //GAMEENGINE_TYPES_H