-
Notifications
You must be signed in to change notification settings - Fork 2
/
common.h
46 lines (39 loc) · 826 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
45
46
#ifndef COMMON_H
#define COMMON_H
/************************************************************************/
/* Windows OS detection */
#if defined(_WIN32) || defined(__WIN32__)
# ifndef OS_WIN32
# define OS_WIN32
# endif
#endif
#if defined(_WIN64)
# ifndef OS_WIN64
# define OS_WIN64
# endif
#endif
#if defined(_WINDOWS) || defined(OS_WIN32) || defined(OS_WIN64)
# ifndef OS_WINDOWS
# define OS_WINDOWS
# endif
#endif
/* Mac OS detection */
#ifdef __APPLE__
# ifndef OS_MAC
# define OS_MAC
# endif
#endif
/************************************************************************/
/*
* GLUT header file location
*/
#ifdef OS_MAC
#define GLUT_INCLUDE <GLUT/glut.h>
#else
#define GLUT_INCLUDE <GL/glut.h>
#endif
/*
* Silence angry deprecation warnings on some platforms
*/
#define GL_SILENCE_DEPRECATION 1
#endif