-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdengine_config.h.in
166 lines (141 loc) · 5.06 KB
/
dengine_config.h.in
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#ifndef DENGINE_CONFIG_H_INCLUDED
#define DENGINE_CONFIG_H_INCLUDED
/* cmake options */
#cmakedefine CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
#ifndef CMAKE_BUILD_TYPE
#define CMAKE_BUILD_TYPE "Default"
#endif
#cmakedefine ANDROID_NDK
#cmakedefine BUILD_SHARED_LIBS
#cmakedefine DENGINE_VERSION "@DENGINE_VERSION@"
#cmakedefine DENGINE_MT
#cmakedefine DENGINE_HAS_PTHREAD_H
#cmakedefine DENGINE_HAS_PTHREAD_TYPES_H
#cmakedefine DENGINE_HAS_PTHREADTYPES_H
#cmakedefine DENGINE_WIN @DENGINE_WIN@
#cmakedefine DENGINE_CONTEXT @DENGINE_CONTEXT@
#cmakedefine DENGINE_DEBUG
#cmakedefine DENGINE_DEBUG_GL
#cmakedefine DENGINE_LIGHTING_SHADOW3D
#cmakedefine DENGINE_LIGHTING_MAX_POINT @DENGINE_LIGHTING_MAX_POINT@
#cmakedefine DENGINE_LIGHTING_MAX_SPOT @DENGINE_LIGHTING_MAX_SPOT@
/*
* Uncomment to hide compile dir since it has sensitive info like
* your username.
*
* This may break some tests which rely on it. Use when distibuting
*/
//#define DENGINE_HIDECOMPILEDIR
#define DENGINE_GL_GLAD
#if defined(_WIN32) || defined (__MINGW32__) || (__CYGWIN__)
#define DENGINE_WIN32
#define DENGINE_CONTEXT_WGL
#define DENGINE_FONT_DEFAULT "C:/Windows/fonts/arial.ttf"
#elif defined(ANDROID_NDK)
/*
* should work for the madlads compiling on termux x11.
* it skips here and goes straight to __linux__ glx and x11
* since termux doesn't use ndk toolchain?
*
* TODO: unless compiling
* using termux-packages toolset? Still untested
*/
#define DENGINE_ANDROID
#define DENGINE_CONTEXT_EGL
#define DENGINE_ANDROID_LOG_TAG "Dengine-Android"
//Android is Linux
#define DENGINE_LINUX
#define DENGINE_FONT_DEFAULT "/system/fonts/DroidSansMono.ttf"
#elif defined(__linux__)
#define DENGINE_LINUX
#ifdef DENGINE_WIN
#define DENGINE_WIN_@DENGINE_WIN@
#else
#define DENGINE_WIN_X11
#endif
#ifdef DENGINE_CONTEXT
#define DENGINE_CONTEXT_@DENGINE_CONTEXT@
#else
#define DENGINE_CONTEXT_GLX
#endif
#cmakedefine DENGINE_HAS_GTK3 @DENGINE_HAS_GTK3@
#cmakedefine DENGINE_HAS_FONTCONFIG @DENGINE_HAS_FONTCONFIG@
//Match pattern to pass to FcNameParse. run fc-match "<pattern>" in terminal
#define DENGINE_FONTCONFIG_MATCHPATTERN "monospace"
#else
#warning "This platform is not officially supported!"
#endif // defined
// does time.h have clock_gettime?
#cmakedefine DENGINE_HAS_CLOCK_GETTIME
// does pthread.h have pthread_cancel?
#cmakedefine DENGINE_HAS_PTHREAD_CANCEL
// does pthread.h have pthread_setname_np (needs -D_GNU_SOURCE)?
#cmakedefine DENGINE_HAS_PTHREAD_SETNAME_NP
// is python3 installed?
#cmakedefine DENGINE_HAS_PYTHON3
// use system python. MIGHT CAUSE SOME SERIOUS PATH ISSUES
#cmakedefine DENGINE_USE_SYSTEM_PYTHON
// use python scripting
#cmakedefine DENGINE_SCRIPTING_PYTHON
// do we have libz (zlib)?
#cmakedefine DENGINE_HAS_LIBZ
//Size of log buffer for snprintf
#define DENGINE_LOG_BUF_SIZE 2048
//Name of log file to use
#define DENGINE_LOG_FILE "dengine.log"
//How many textures can a material have
#define DENGINE_MAX_MATERIAL_TEXTURES 8
/*
* How long is a texture sampler uniform name?
* ie.
*
* GLSL:
* uniform sampler2D this_is_a_2d_sampler;
*
* return value of strlen("this_is_a_2d_sampler")
* this is the longest uniform name you have in a shader
*/
#define DENGINE_MAX_MATERIAL_TEXTURE_SAMPLER_LENGTH 64
//Size of buffer with the name of the entity
#define DENGINE_ECS_MAXNAME 1024
/*
* Debug tracing when program crashes
* SIZE=max stacktrace items
* STRLN=max length of each trace item
* FILE=file stack trace will be dumped to
*/
#define DENGINE_DEBUG_TRACESIZE 20
#define DENGINE_DEBUG_TRACESTRLN 2048
#define DENGINE_DEBUG_TRACEFILE "dengine.trace.log"
/*
* Directory relative to filesys_get_cachedir() where cached shaders
* are stored. cachedir if filled during in runtime and is OS-dependant
*/
#define DENGINE_SHADER_CACHE_DIR "dengine/shader_cache"
//Extension to save cached binary of shaders in SHADER_CACHE_DIR
#define DENGINE_SHADER_CACHE_EXT ".shader"
/*
* Directory relative to filesys_get_cachedir() where cached textures
* are stored. cachedir if filled during in runtime and is OS-dependant
*/
#define DENGINE_TEXTURE_CACHE_DIR "dengine/texture_cache"
//Extension to save cached binary and attributes of texture in TEXTURE_CACHE_DIR
#define DENGINE_TEXTURE_CACHE_EXT ".texture"
//Embedded fonts
//"Embed OpenSans Regular into dengine-gui"
#cmakedefine DENGINE_FONT_EMBED_OPENSANS_REGULAR
//"Embed OpenSans Italic into dengine-gui"
#cmakedefine DENGINE_FONT_EMBED_OPENSANS_ITALIC
//"Embed Source Sans Pro Regular into dengine-gui"
#cmakedefine DENGINE_FONT_EMBED_SOURCESANSPRO_REGULAR
//"Embed Source Sans Pro Italic into dengine-gui"
#cmakedefine DENGINE_FONT_EMBED_SOURCESANSPRO_ITALIC
//"Embed Source Sans Pro Light into dengine-gui"
#cmakedefine DENGINE_FONT_EMBED_SOURCESANSPRO_LIGHT
//"Embed Roboto Regular into dengine-gui"
#cmakedefine DENGINE_FONT_EMBED_ROBOTO_REGULAR
//"Embed Roboto Italic into dengine-gui"
#cmakedefine DENGINE_FONT_EMBED_ROBOTO_ITALIC
//"Embed Roboto Light into dengine-gui"
#cmakedefine DENGINE_FONT_EMBED_ROBOTO_LIGHT
#endif // DENGINE_CONFIG_H_INCLUDED