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
39static 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// max length of a path name
105#define NEBULA_MAXPATH (512)
106
107// enable/disable support for Nebula2 file formats and concepts
108#define NEBULA_LEGACY_SUPPORT (1)
109
110// enable/disable mini dumps
111#define NEBULA_ENABLE_MINIDUMPS (0)
112
113// Nebula's main window class
114#define NEBULA_WINDOW_CLASS "Nebula::MainWindow"
115
116// number of lines in the IO::HistoryConsoleHandler ring buffer
117#define NEBULA_CONSOLE_HISTORY_SIZE (256)
118
119// enable legacy support for 3-component vectors in XML files
120#define NEBULA_XMLREADER_LEGACY_VECTORS (1)
121
122// define the standard IO scheme for the platform
123#define DEFAULT_IO_SCHEME "file"
124
125#if 0
126#FIXME add defines for these in cmake instead
127#if __VULKAN__
128#define NEBULA_DEFAULT_FRAMESHADER_NAME "vkdefault"
129#else
130#error "No default frameshader defined for platform"
131#endif
132#endif
133
134#define USE_CURL 1
135
136// default resource names
137#if __WIN32__ || __LINUX__
138#define NEBULA_TEXTURE_EXTENSION ".dds"
139#define NEBULA_SURFACE_EXTENSION ".sur"
140#define NEBULA_MESH_EXTENSION ".nvx"
141#endif
142
143// VisualStudio settings
144#ifdef _MSC_VER
145#define __VC__ (1)
146#endif
147
148// GCC settings
149#if defined __GNUC__
150#define __cdecl
151#define __forceinline inline __attribute__((always_inline))
152#pragma GCC diagnostic ignored "-Wmultichar"
153#pragma GCC diagnostic ignored "-Wformat-security"
154#endif
155
156#if !defined(__GNUC__)
157#define __attribute__(x)
158#endif
159
160// define max texture space for resource streaming
161#if __WIN32__
162// 512 MB
163#define __maxTextureBytes__ (524288000)
164#else
165// 256 MB
166#define __maxTextureBytes__ (268435456)
167#endif
168
169#define NEBULA_THREAD_DEFAULTSTACKSIZE 65536
170
171//------------------------------------------------------------------------------
static const int JobMaxSliceSize
Nebula configuration.
Definition config.h:39