Nebula
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
13
// setup platform identification macros
14
#ifdef __WIN32__
15
#undef __WIN32__
16
#endif
17
#if (WIN32 || _WIN32)
18
#define __WIN32__ (1)
19
#endif
20
21
#ifdef __GNUC__
22
#ifndef __LINUX__
23
#define __LINUX__ (1)
24
#endif
25
#endif
26
27
//------------------------------------------------------------------------------
32
#ifdef _DEBUG
33
#define NEBULA_DEBUG (1)
34
#endif
35
39
static
const
int
JobMaxSliceSize
= 0xFFFF;
40
41
#if PUBLIC_BUILD
42
#define __NEBULA_NO_ASSERT__ (0)
// DON'T SET THIS TO (1) - PUBLIC_BUILD SHOULD STILL DISPLAY ASSERTS!
43
#else
44
#define __NEBULA_NO_ASSERT__ (0)
45
#endif
46
47
// define whether a platform comes with archive support built into the OS
48
#define NEBULA_NATIVE_ARCHIVE_SUPPORT (0)
49
50
// enable/disable Nebula memory stats
51
#if NEBULA_DEBUG
52
#if __WIN32__
53
#define NEBULA_MEMORY_STATS (1)
54
#else
55
#define NEBULA_MEMORY_STATS (0)
56
#endif
57
#define NEBULA_MEMORY_ADVANCED_DEBUGGING (0)
58
#else
59
#define NEBULA_MEMORY_STATS (0)
60
#define NEBULA_MEMORY_ADVANCED_DEBUGGING (0)
61
#endif
62
63
// enable/disable thread-local StringAtom tables
64
#if (__LINUX__)
65
#define NEBULA_ENABLE_THREADLOCAL_STRINGATOM_TABLES (0)
66
#else
67
#define NEBULA_ENABLE_THREADLOCAL_STRINGATOM_TABLES (1)
68
#endif
69
70
// enable/disable growth of StringAtom buffer
71
#define NEBULA_ENABLE_GLOBAL_STRINGBUFFER_GROWTH (1)
72
73
// size of of a chunk of the global string buffer for StringAtoms
74
#define NEBULA_GLOBAL_STRINGBUFFER_CHUNKSIZE (32 * 1024)
75
76
// enable/disable Nebula animation system log messages
77
#define NEBULA_ANIMATIONSYSTEM_VERBOSELOG (0)
78
#define NEBULA_ANIMATIONSYSTEM_FRAMEDUMP (0)
79
80
// enable/disable bounds checking in the container util classes
81
#if NEBULA_DEBUG
82
#define NEBULA_BOUNDSCHECKS (1)
83
#else
84
#define NEBULA_BOUNDSCHECKS (0)
85
#endif
86
87
// enable/disable the builtin HTTP server
88
#if PUBLIC_BUILD
89
#define __NEBULA_HTTP__ (0)
90
#else
91
#define __NEBULA_HTTP__ (1)
92
#endif
93
94
// enable/disable profiling (see Debug::DebugTimer, Debug::DebugCounter)
95
#if PUBLIC_BUILD
96
#define NEBULA_ENABLE_PROFILING (0)
97
#elif __NEBULA_HTTP__
98
// profiling needs http
99
#define NEBULA_ENABLE_PROFILING (1)
100
#else
101
#define NEBULA_ENABLE_PROFILING (0)
102
#endif
103
104
#if NEBULA_ENABLE_PROFILING
105
#define NEBULA_ENABLE_PERFORMANCE_WARNINGS (1)
106
#endif
107
108
// max length of a path name
109
#define NEBULA_MAXPATH (512)
110
111
// enable/disable support for Nebula2 file formats and concepts
112
#define NEBULA_LEGACY_SUPPORT (1)
113
114
// enable/disable mini dumps
115
#define NEBULA_ENABLE_MINIDUMPS (0)
116
117
// Nebula's main window class
118
#define NEBULA_WINDOW_CLASS "Nebula::MainWindow"
119
120
// number of lines in the IO::HistoryConsoleHandler ring buffer
121
#define NEBULA_CONSOLE_HISTORY_SIZE (256)
122
123
// enable legacy support for 3-component vectors in XML files
124
#define NEBULA_XMLREADER_LEGACY_VECTORS (1)
125
126
// define the standard IO scheme for the platform
127
#define DEFAULT_IO_SCHEME "file"
128
129
#if 0
130
#FIXME add defines for these in cmake instead
131
#if __VULKAN__
132
#define NEBULA_DEFAULT_FRAMESHADER_NAME "vkdefault"
133
#else
134
#error "No default frameshader defined for platform"
135
#endif
136
#endif
137
138
#define USE_CURL 1
139
140
// default resource names
141
#if __WIN32__ || __LINUX__
142
#define NEBULA_TEXTURE_EXTENSION ".dds"
143
#define NEBULA_SURFACE_EXTENSION ".sur"
144
#define NEBULA_MESH_EXTENSION ".nvx"
145
#endif
146
147
// VisualStudio settings
148
#ifdef _MSC_VER
149
#define __VC__ (1)
150
#endif
151
152
// GCC settings
153
#if defined __GNUC__
154
#define __cdecl
155
#define __forceinline inline __attribute__((always_inline))
156
#pragma GCC diagnostic ignored "-Wmultichar"
157
#pragma GCC diagnostic ignored "-Wformat-security"
158
#endif
159
160
#if !defined(__GNUC__)
161
#define __attribute__(x)
162
#endif
163
164
// define max texture space for resource streaming
165
#if __WIN32__
166
// 512 MB
167
#define __maxTextureBytes__ (524288000)
168
#else
169
// 256 MB
170
#define __maxTextureBytes__ (268435456)
171
#endif
172
173
#define NEBULA_THREAD_DEFAULTSTACKSIZE 65536
174
175
//------------------------------------------------------------------------------
JobMaxSliceSize
static const int JobMaxSliceSize
Nebula configuration.
Definition
config.h:39
code
foundation
core
config.h
Generated on Wed Nov 13 2024 21:37:26 for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.