-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.h
44 lines (35 loc) · 894 Bytes
/
common.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
#pragma once
#include "gl.h"
// GLM Common include
#include "glm/glm.hpp"
#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtx/rotate_vector.hpp"
#include "glm/gtx/normal.hpp"
#include "glm/gtc/type_ptr.hpp"
#include "glm/gtc/quaternion.hpp"
#include "glm/gtx/quaternion.hpp"
// User data to pass around
class HeroShader;
class ShadowShader;
typedef struct
{
// Handle to a program object
HeroShader* heroShader;
ShadowShader* shadowShader;
// Rotation
float deg;
} UserData;
// Artifact from EGL Code
#define ESCALLBACK
// Context
typedef struct _escontext
{
// User data Reference
void* userData;
// GL window ref
GLFWwindow* m_window;
// Callbacks
void (ESCALLBACK *drawFunc) ( struct _escontext * );
void (ESCALLBACK *keyFunc) ( struct _escontext *, unsigned char, int, int );
void (ESCALLBACK *updateFunc) ( struct _escontext *, float deltaTime );
} ESContext;