VVISF & VVGL
VVGL_Defines.hpp
1 #ifndef VVGL_Defines_h
2 #define VVGL_Defines_h
3 
4 
5 
6 
7 /*
8 developers need to define one of these during compilation:
9 
10  VVGL_SDK_MAC
11  VVGL_SDK_IOS
12  VVGL_SDK_RPI
13  VVGL_SDK_GLFW
14  VVGL_SDK_QT
15 
16 this header file defines a series of macros that describe the availability of various GL
17 environments based on the SDK as defined by the user. these are the possible values- note that
18 these are not mutually exclusive- more than one may be defined simultaneously, these are only used
19 to block off function calls that won't compile/link against a given SDK's headers/libs.
20 
21  VVGL_TARGETENV_GL2
22  VVGL_TARGETENV_GL3PLUS
23  VVGL_TARGETENV_GLES
24  VVGL_TARGETENV_GLES3
25 */
26 
27 
28 
29 
30 // if you don't define the SDK as a compiler flag, you can define it here, in this file.
31 // this approach may be easier in the long run for other devs, as software that links against
32 // the lib will pick up this definition when they include this header.
33 #include "VVGL_HardCodedDefines.hpp"
34 
35 
36 
37 
38 // throw an error with a human-readable explanation if no SDK has been defined yet
39 #if !defined(VVGL_SDK_MAC) && !defined(VVGL_SDK_IOS) && !defined(VVGL_SDK_RPI) && !defined (VVGL_SDK_GLFW) && !defined(VVGL_SDK_QT)
40 static_assert(false, "ERR: No SDK defined (eg. VVGL_SDK_XXXX), see VVGL_Defines.hpp for more information.");
41 #endif
42 
43 
44 
45 
46 #if defined(VVGL_SDK_MAC)
47  #define VVGL_TARGETENV_GL2
48  #define VVGL_TARGETENV_GL3PLUS
49 #elif defined(VVGL_SDK_IOS)
50  #define VVGL_TARGETENV_GLES3
51 #elif defined(VVGL_SDK_RPI)
52  #define VVGL_TARGETENV_GLES
53 #elif defined(VVGL_SDK_GLFW)
54  #define VVGL_TARGETENV_GL2
55  #define VVGL_TARGETENV_GL3PLUS
56 #elif defined(VVGL_SDK_QT)
57  #define VVGL_TARGETENV_GL2
58  #define VVGL_TARGETENV_GL3PLUS
59 #endif
60 
61 
62 
63 
64 #if defined(VVGL_SDK_QT)
65 #include "VVGL_Qt_global.h"
66 #else
67 #define VVGL_EXPORT
68 #endif
69 
70 
71 
72 
73 #if defined (_WIN32)
74 //#define __PRETTY_FUNCTION__ __func__
75 #define __PRETTY_FUNCTION__ __FUNCSIG__
76 #pragma warning (disable : 4068) /* disables unknown pragma warnings */
77 #endif // _WIN32
78 
79 
80 
81 
82 #endif /* VVGL_Defines_h */