1 /**********************************************************************************************
3 * raylib configuration flags
5 * This file defines all the configuration flags for the different raylib modules
9 * Copyright (c) 2018-2021 Ahmad Fatoum & Ramon Santamaria (@raysan5)
11 * This software is provided "as-is", without any express or implied warranty. In no event
12 * will the authors be held liable for any damages arising from the use of this software.
14 * Permission is granted to anyone to use this software for any purpose, including commercial
15 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
17 * 1. The origin of this software must not be misrepresented; you must not claim that you
18 * wrote the original software. If you use this software in a product, an acknowledgment
19 * in the product documentation would be appreciated but is not required.
21 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
22 * as being the original software.
24 * 3. This notice may not be removed or altered from any source distribution.
26 **********************************************************************************************/
28 #define RAYLIB_VERSION "3.7"
30 //------------------------------------------------------------------------------------
31 // Module: core - Configuration Flags
32 //------------------------------------------------------------------------------------
33 // Camera module is included (camera.h) and multiple predefined cameras are available: free, 1st/3rd person, orbital
34 #define SUPPORT_CAMERA_SYSTEM 1
35 // Gestures module is included (gestures.h) to support gestures detection: tap, hold, swipe, drag
36 #define SUPPORT_GESTURES_SYSTEM 1
37 // Mouse gestures are directly mapped like touches and processed by gestures system
38 #define SUPPORT_MOUSE_GESTURES 1
39 // Reconfigure standard input to receive key inputs, works with SSH connection.
40 #define SUPPORT_SSH_KEYBOARD_RPI 1
41 // Draw a mouse pointer on screen
42 #define SUPPORT_MOUSE_CURSOR_NATIVE 1
43 // Setting a higher resolution can improve the accuracy of time-out intervals in wait functions.
44 // However, it can also reduce overall system performance, because the thread scheduler switches tasks more often.
45 #define SUPPORT_WINMM_HIGHRES_TIMER 1
46 // Use busy wait loop for timing sync, if not defined, a high-resolution timer is setup and used
47 //#define SUPPORT_BUSY_WAIT_LOOP 1
48 // Use a half-busy wait loop, in this case frame sleeps for some time and runs a busy-wait-loop at the end
49 #define SUPPORT_HALFBUSY_WAIT_LOOP
50 // Wait for events passively (sleeping while no events) instead of polling them actively every frame
51 //#define SUPPORT_EVENTS_WAITING 1
52 // Allow automatic screen capture of current screen pressing F12, defined in KeyCallback()
53 #define SUPPORT_SCREEN_CAPTURE 1
54 // Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback()
55 #define SUPPORT_GIF_RECORDING 1
56 // Support CompressData() and DecompressData() functions
57 #define SUPPORT_COMPRESSION_API 1
58 // Support saving binary data automatically to a generated storage.data file. This file is managed internally.
59 #define SUPPORT_DATA_STORAGE 1
61 // core: Configuration values
62 //------------------------------------------------------------------------------------
63 #if defined(__linux__)
64 #define MAX_FILEPATH_LENGTH 4096 // Maximum length for filepaths (Linux PATH_MAX default value)
66 #define MAX_FILEPATH_LENGTH 512 // Maximum length supported for filepaths
69 #define MAX_GAMEPADS 4 // Max number of gamepads supported
70 #define MAX_GAMEPAD_AXIS 8 // Max number of axis supported (per gamepad)
71 #define MAX_GAMEPAD_BUTTONS 32 // Max bumber of buttons supported (per gamepad)
72 #define MAX_TOUCH_POINTS 10 // Maximum number of touch points supported
73 #define MAX_KEY_PRESSED_QUEUE 16 // Max number of characters in the key input queue
75 #define STORAGE_DATA_FILE "storage.data" // Automatic storage filename
77 #define MAX_DECOMPRESSION_SIZE 64 // Max size allocated for decompression in MB
80 //------------------------------------------------------------------------------------
81 // Module: rlgl - Configuration values
82 //------------------------------------------------------------------------------------
83 // Show OpenGL extensions and capabilities detailed logs on init
84 //#define SUPPORT_GL_DETAILS_INFO 1
86 #if defined(GRAPHICS_API_OPENGL_11) || defined(GRAPHICS_API_OPENGL_33)
87 #define DEFAULT_BATCH_BUFFER_ELEMENTS 8192 // Default internal render batch limits
88 #elif defined(GRAPHICS_API_OPENGL_ES2)
89 #define DEFAULT_BATCH_BUFFER_ELEMENTS 2048 // Default internal render batch limits
92 #define DEFAULT_BATCH_BUFFERS 1 // Default number of batch buffers (multi-buffering)
93 #define DEFAULT_BATCH_DRAWCALLS 256 // Default number of batch draw calls (by state changes: mode, texture)
95 #define MAX_MATRIX_STACK_SIZE 32 // Maximum size of internal Matrix stack
96 #define MAX_MESH_VERTEX_BUFFERS 7 // Maximum vertex buffers (VBO) per mesh
97 #define MAX_SHADER_LOCATIONS 32 // Maximum number of shader locations supported
98 #define MAX_MATERIAL_MAPS 12 // Maximum number of shader maps supported
100 #define RL_CULL_DISTANCE_NEAR 0.01 // Default projection matrix near cull distance
101 #define RL_CULL_DISTANCE_FAR 1000.0 // Default projection matrix far cull distance
103 // Default shader vertex attribute names to set location points
104 #define DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Binded by default to shader location: 0
105 #define DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Binded by default to shader location: 1
106 #define DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Binded by default to shader location: 2
107 #define DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Binded by default to shader location: 3
108 #define DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Binded by default to shader location: 4
109 #define DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Binded by default to shader location: 5
112 //------------------------------------------------------------------------------------
113 // Module: shapes - Configuration Flags
114 //------------------------------------------------------------------------------------
115 // Use QUADS instead of TRIANGLES for drawing when possible
116 // Some lines-based shapes could still use lines
117 #define SUPPORT_QUADS_DRAW_MODE 1
120 //------------------------------------------------------------------------------------
121 // Module: textures - Configuration Flags
122 //------------------------------------------------------------------------------------
123 // Selecte desired fileformats to be supported for image data loading
124 #define SUPPORT_FILEFORMAT_PNG 1
125 //#define SUPPORT_FILEFORMAT_BMP 1
126 //#define SUPPORT_FILEFORMAT_TGA 1
127 //#define SUPPORT_FILEFORMAT_JPG 1
128 #define SUPPORT_FILEFORMAT_GIF 1
129 //#define SUPPORT_FILEFORMAT_PSD 1
130 #define SUPPORT_FILEFORMAT_DDS 1
131 #define SUPPORT_FILEFORMAT_HDR 1
132 //#define SUPPORT_FILEFORMAT_KTX 1
133 //#define SUPPORT_FILEFORMAT_ASTC 1
134 //#define SUPPORT_FILEFORMAT_PKM 1
135 //#define SUPPORT_FILEFORMAT_PVR 1
137 // Support image export functionality (.png, .bmp, .tga, .jpg)
138 #define SUPPORT_IMAGE_EXPORT 1
139 // Support procedural image generation functionality (gradient, spot, perlin-noise, cellular)
140 #define SUPPORT_IMAGE_GENERATION 1
141 // Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop...
142 // If not defined, still some functions are supported: ImageFormat(), ImageCrop(), ImageToPOT()
143 #define SUPPORT_IMAGE_MANIPULATION 1
146 //------------------------------------------------------------------------------------
147 // Module: text - Configuration Flags
148 //------------------------------------------------------------------------------------
149 // Default font is loaded on window initialization to be available for the user to render simple text
150 // NOTE: If enabled, uses external module functions to load default raylib font
151 #define SUPPORT_DEFAULT_FONT 1
152 // Selected desired font fileformats to be supported for loading
153 #define SUPPORT_FILEFORMAT_FNT 1
154 #define SUPPORT_FILEFORMAT_TTF 1
156 // Support text management functions
157 // If not defined, still some functions are supported: TextLength(), TextFormat()
158 #define SUPPORT_TEXT_MANIPULATION 1
160 // text: Configuration values
161 //------------------------------------------------------------------------------------
162 #define MAX_TEXT_BUFFER_LENGTH 1024 // Size of internal static buffers used on some functions:
163 // TextFormat(), TextSubtext(), TextToUpper(), TextToLower(), TextToPascal(), TextSplit()
164 #define MAX_TEXT_UNICODE_CHARS 512 // Maximum number of unicode codepoints: GetCodepoints()
165 #define MAX_TEXTSPLIT_COUNT 128 // Maximum number of substrings to split: TextSplit()
168 //------------------------------------------------------------------------------------
169 // Module: models - Configuration Flags
170 //------------------------------------------------------------------------------------
171 // Selected desired model fileformats to be supported for loading
172 #define SUPPORT_FILEFORMAT_OBJ 1
173 #define SUPPORT_FILEFORMAT_MTL 1
174 #define SUPPORT_FILEFORMAT_IQM 1
175 #define SUPPORT_FILEFORMAT_GLTF 1
176 // Support procedural mesh generation functions, uses external par_shapes.h library
177 // NOTE: Some generated meshes DO NOT include generated texture coordinates
178 #define SUPPORT_MESH_GENERATION 1
181 //------------------------------------------------------------------------------------
182 // Module: audio - Configuration Flags
183 //------------------------------------------------------------------------------------
184 // Desired audio fileformats to be supported for loading
185 #define SUPPORT_FILEFORMAT_WAV 1
186 #define SUPPORT_FILEFORMAT_OGG 1
187 #define SUPPORT_FILEFORMAT_XM 1
188 #define SUPPORT_FILEFORMAT_MOD 1
189 #define SUPPORT_FILEFORMAT_MP3 1
190 //#define SUPPORT_FILEFORMAT_FLAC 1
192 // audio: Configuration values
193 //------------------------------------------------------------------------------------
194 #define AUDIO_DEVICE_FORMAT ma_format_f32 // Device output format (miniaudio: float-32bit)
195 #define AUDIO_DEVICE_CHANNELS 2 // Device output channels: stereo
196 #define AUDIO_DEVICE_SAMPLE_RATE 0 // Device sample rate (device default)
198 #define MAX_AUDIO_BUFFER_POOL_CHANNELS 16 // Maximum number of audio pool channels
200 //------------------------------------------------------------------------------------
201 // Module: utils - Configuration Flags
202 //------------------------------------------------------------------------------------
203 // Standard file io library (stdio.h) included
204 #define SUPPORT_STANDARD_FILEIO
205 // Show TRACELOG() output messages
206 // NOTE: By default LOG_DEBUG traces not shown
207 #define SUPPORT_TRACELOG 1
208 //#define SUPPORT_TRACELOG_DEBUG 1
210 // utils: Configuration values
211 //------------------------------------------------------------------------------------
212 #define MAX_TRACELOG_MSG_LENGTH 128 // Max length of one trace-log message
213 #define MAX_UWP_MESSAGES 512 // Max UWP messages to process