forked from fruxo/turbobadger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tb_config.h.in
118 lines (96 loc) · 4.33 KB
/
tb_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
// ================================================================================
// == This file is a part of Turbo Badger. (C) 2011-2014, Emil Segerås ==
// == See tb_core.h for more information. ==
// ================================================================================
//
// This file contains defines for the default configuration of Turbo Badger.
// You may change these here, but to make upgrades easier it's better to create a
// copy of this file in a include path that is searched before Turbo Badger during
// build (F.ex the solution directory for Visual Studio).
#ifndef TB_CONFIG_H
#define TB_CONFIG_H
/** Enable for some handy runtime debugging, enabled by modifying
the various settings in g_tb_debug. A settings window can be
shown by calling ShowDebugInfoSettingsWindow. */
#ifndef NDEBUG
#define TB_RUNTIME_DEBUG_INFO
#endif
#ifndef NDEBUG
/** Enable compilation of unit tests. */
#define TB_UNIT_TESTING
#endif
/** Enable if the focus state should automatically be set on edit fields even
when using the pointer. It is normally set only while moving focus by keyboard. */
//#define TB_ALWAYS_SHOW_EDIT_FOCUS
/** Enable to use premultiplied alpha. Warning: This is not handled everywhere in
the default backends, so consider it an experimental and unfinished feature! */
//#define TB_PREMULTIPLIED_ALPHA
/** Enable to support TBBF fonts (Turbo Badger Bitmap Fonts) */
${TB_FONT_RENDERER_TBBF_CONFIG}
/** Enable to support truetype fonts using freetype. */
${TB_FONT_RENDERER_FREETYPE_CONFIG}
/** Enable to support image loading using stb_image.c (http://nothings.org/).
It's a *very unsafe* image library. Use only with images distributed with
your app, that you know work! */
${TB_IMAGE_LOADER_STB_CONFIG}
/** Enable to get TBRendererBatcher, an helper class for renderers that
implements batching of draw operations. Subclasses of TBRendererBatcher
can be done super easily, and still do batching. */
${TB_RENDERER_BATCHER_CONFIG}
/** Enable renderer using OpenGL. This renderer depends on TB_RENDERER_BATCHER.
It is using GL version 1.1, */
${TB_RENDERER_GL_CONFIG}
/** Enable renderer using OpenGL ES. This renderer depends on TB_RENDERER_GL.
It is using GL ES version 1. */
${TB_RENDERER_GLES_1_CONFIG}
/** The width of the font glyph cache. Must be a power of two. */
#define TB_GLYPH_CACHE_WIDTH 512
/** The height of the font glyph cache. Must be a power of two. */
#define TB_GLYPH_CACHE_HEIGHT 512
/** CMake is supposed to reconfigure files if they change. */
${TB_FORCE_REBUILD}
// == Optional features ===========================================================
/** Enable support for TBImage, TBImageManager, TBImageWidget. */
${TB_IMAGE_CONFIG}
/** Enable support for Editor Widgets. */
${TB_BUILD_EDITOR_CONFIG}
// == Additional configuration of platform implementations ========================
/** Define for posix implementation of TBFile. */
//#define TB_FILE_POSIX
/** Defines for implementations of TBClipboard. */
//#define TB_CLIPBOARD_DUMMY // Cross platform. Not integrating with the OS.
//#define TB_CLIPBOARD_GLFW // Cross platform using glfw API.
//#define TB_CLIPBOARD_WINDOWS
/** Defines for implementations of TBSystem. */
//#define TB_SYSTEM_LINUX
//#define TB_SYSTEM_WINDOWS
//#define TB_SYSTEM_ANDROID
/** Defines for additional platform specific issues. */
//#define TB_TARGET_WINDOWS
//#define TB_TARGET_MACOSX
//#define TB_TARGET_LINUX
// == Setting some defaults for platform implementations ==========================
// Updated to only define a platform if a target is defined
// This allows us to build for different targets than the host compiling OS
#if !defined(TB_TARGET_WINDOWS) && !defined(TB_TARGET_LINUX) && !defined(TB_TARGET_MACOSX)
#if defined(ANDROID) || defined(__ANDROID__)
#define TB_SYSTEM_ANDROID
#define TB_CLIPBOARD_DUMMY
#elif defined(__linux) || defined(__linux__)
#define TB_FILE_POSIX
#define TB_TARGET_LINUX
#define TB_SYSTEM_LINUX
#define TB_CLIPBOARD_GLFW
#elif MACOSX
#define TB_FILE_POSIX
#define TB_TARGET_MACOSX
#define TB_SYSTEM_LINUX
#define TB_CLIPBOARD_GLFW
#elif defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__)
#define TB_FILE_POSIX
#define TB_TARGET_WINDOWS
#define TB_CLIPBOARD_WINDOWS
#define TB_SYSTEM_WINDOWS
#endif
#endif
#endif // TB_CONFIG_H