This repository has been archived by the owner on Dec 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
common.hpp
97 lines (74 loc) · 2.32 KB
/
common.hpp
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef __COMMON_HPP__
#define __COMMON_HPP__
#include <cfloat>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iostream>
#include <stdint.h>
#include <sstream>
#include <string>
#include <cmath>
#include <limits>
#include <memory>
#include <vector>
#include <queue>
// ===================== GL Math (GLM) library // =====================
//#define GLM_MESSAGES // produces VERBOSE messages
#define GLM_FORCE_RADIANS // required on DARWIN to prevent the use of deprecated functions
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/epsilon.hpp>
#include <glm/gtc/matrix_access.hpp>
#include <glm/gtc/noise.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtx/norm.hpp>
#include <glm/gtx/matrix_operation.hpp>
#include <glm/gtx/quaternion.hpp>
using namespace glm;
// ===================== Logging // =====================
#define LOGGING
#ifdef LOGGING
extern FILE* logfile;
#endif
// ====== ======= // ====== ======= OS Specific crap // ====== =======// ====== =======
// ====== =======
#ifdef __LINUX__
#endif //__LINUX__
// ====== =======
#ifdef __MAC_OSX__
//...
//#include <gl\GL.h> // windows
#endif //#ifdef __MAC_OSX__
// ====== =======
#ifdef __WINDOWS_MSVC__
//#define _USE_MATH_DEFINES // works for MSVC
#define strdup _strdup
#pragma comment(lib, "opengl32.lib")
// If you get compiler errors pointing to gl.h, this is because there are some things like WINGDI which are used in gl.h
// but are only defined in some other header files. Include windows.h before including gl.h
// If you have link errors, then you need to figure out how to link with your specific compiler/IDE.
// NOTE: glload library handles this. (at least on windows 7)
#pragma comment(lib, "glloadD.lib")
#pragma comment(lib, "glfwD.lib")
#ifdef QT_4XX_
#pragma comment(lib, "QtCore4.lib")
#pragma comment(lib, "QtGui4.lib")
#pragma comment(lib, "QtOpenGL4.lib")
#endif
#ifdef QT_5XX_
#pragma comment(lib, "Qt5Core.lib")
#pragma comment(lib, "Qt5Gui.lib")
#pragma comment(lib, "Qt5OpenGL.lib")
#pragma comment(lib, "Qt5Widgets.lib")
#endif
// #pragma warning( disable: 4996)
// float-double auto-cast warnings
#pragma warning( disable: 4244)
//#pragma warning( disable: 4305)
#endif // __WINDOWS_MSVC__
// ====== =======
#ifdef __WINDOWS_MINGW__
#endif // #ifdef__WINDOWS_MINGW__
#endif