diff options
Diffstat (limited to '')
| -rw-r--r-- | raylib/src/config.h | 303 |
1 files changed, 303 insertions, 0 deletions
diff --git a/raylib/src/config.h b/raylib/src/config.h new file mode 100644 index 0000000..e3749c5 --- /dev/null +++ b/raylib/src/config.h | |||
| @@ -0,0 +1,303 @@ | |||
| 1 | /********************************************************************************************** | ||
| 2 | * | ||
| 3 | * raylib configuration flags | ||
| 4 | * | ||
| 5 | * This file defines all the configuration flags for the different raylib modules | ||
| 6 | * | ||
| 7 | * LICENSE: zlib/libpng | ||
| 8 | * | ||
| 9 | * Copyright (c) 2018-2024 Ahmad Fatoum & Ramon Santamaria (@raysan5) | ||
| 10 | * | ||
| 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. | ||
| 13 | * | ||
| 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: | ||
| 16 | * | ||
| 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. | ||
| 20 | * | ||
| 21 | * 2. Altered source versions must be plainly marked as such, and must not be misrepresented | ||
| 22 | * as being the original software. | ||
| 23 | * | ||
| 24 | * 3. This notice may not be removed or altered from any source distribution. | ||
| 25 | * | ||
| 26 | **********************************************************************************************/ | ||
| 27 | |||
| 28 | #ifndef CONFIG_H | ||
| 29 | #define CONFIG_H | ||
| 30 | |||
| 31 | //------------------------------------------------------------------------------------ | ||
| 32 | // Module selection - Some modules could be avoided | ||
| 33 | // Mandatory modules: rcore, rlgl, utils | ||
| 34 | //------------------------------------------------------------------------------------ | ||
| 35 | #define SUPPORT_MODULE_RSHAPES 1 | ||
| 36 | #define SUPPORT_MODULE_RTEXTURES 1 | ||
| 37 | #define SUPPORT_MODULE_RTEXT 1 // WARNING: It requires SUPPORT_MODULE_RTEXTURES to load sprite font textures | ||
| 38 | #define SUPPORT_MODULE_RMODELS 1 | ||
| 39 | #define SUPPORT_MODULE_RAUDIO 1 | ||
| 40 | |||
| 41 | //------------------------------------------------------------------------------------ | ||
| 42 | // Module: rcore - Configuration Flags | ||
| 43 | //------------------------------------------------------------------------------------ | ||
| 44 | // Camera module is included (rcamera.h) and multiple predefined cameras are available: free, 1st/3rd person, orbital | ||
| 45 | #define SUPPORT_CAMERA_SYSTEM 1 | ||
| 46 | // Gestures module is included (rgestures.h) to support gestures detection: tap, hold, swipe, drag | ||
| 47 | #define SUPPORT_GESTURES_SYSTEM 1 | ||
| 48 | // Include pseudo-random numbers generator (rprand.h), based on Xoshiro128** and SplitMix64 | ||
| 49 | #define SUPPORT_RPRAND_GENERATOR 1 | ||
| 50 | // Mouse gestures are directly mapped like touches and processed by gestures system | ||
| 51 | #define SUPPORT_MOUSE_GESTURES 1 | ||
| 52 | // Reconfigure standard input to receive key inputs, works with SSH connection. | ||
| 53 | #define SUPPORT_SSH_KEYBOARD_RPI 1 | ||
| 54 | // Setting a higher resolution can improve the accuracy of time-out intervals in wait functions. | ||
| 55 | // However, it can also reduce overall system performance, because the thread scheduler switches tasks more often. | ||
| 56 | #define SUPPORT_WINMM_HIGHRES_TIMER 1 | ||
| 57 | // Use busy wait loop for timing sync, if not defined, a high-resolution timer is set up and used | ||
| 58 | //#define SUPPORT_BUSY_WAIT_LOOP 1 | ||
| 59 | // Use a partial-busy wait loop, in this case frame sleeps for most of the time, but then runs a busy loop at the end for accuracy | ||
| 60 | #define SUPPORT_PARTIALBUSY_WAIT_LOOP 1 | ||
| 61 | // Allow automatic screen capture of current screen pressing F12, defined in KeyCallback() | ||
| 62 | #define SUPPORT_SCREEN_CAPTURE 1 | ||
| 63 | // Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback() | ||
| 64 | #define SUPPORT_GIF_RECORDING 1 | ||
| 65 | // Support CompressData() and DecompressData() functions | ||
| 66 | #define SUPPORT_COMPRESSION_API 1 | ||
| 67 | // Support automatic generated events, loading and recording of those events when required | ||
| 68 | #define SUPPORT_AUTOMATION_EVENTS 1 | ||
| 69 | // Support custom frame control, only for advanced users | ||
| 70 | // By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents() | ||
| 71 | // Enabling this flag allows manual control of the frame processes, use at your own risk | ||
| 72 | //#define SUPPORT_CUSTOM_FRAME_CONTROL 1 | ||
| 73 | |||
| 74 | |||
| 75 | // rcore: Configuration values | ||
| 76 | //------------------------------------------------------------------------------------ | ||
| 77 | #define MAX_FILEPATH_CAPACITY 8192 // Maximum file paths capacity | ||
| 78 | #define MAX_FILEPATH_LENGTH 4096 // Maximum length for filepaths (Linux PATH_MAX default value) | ||
| 79 | |||
| 80 | #define MAX_KEYBOARD_KEYS 512 // Maximum number of keyboard keys supported | ||
| 81 | #define MAX_MOUSE_BUTTONS 8 // Maximum number of mouse buttons supported | ||
| 82 | #define MAX_GAMEPADS 4 // Maximum number of gamepads supported | ||
| 83 | #define MAX_GAMEPAD_AXIS 8 // Maximum number of axis supported (per gamepad) | ||
| 84 | #define MAX_GAMEPAD_BUTTONS 32 // Maximum number of buttons supported (per gamepad) | ||
| 85 | #define MAX_GAMEPAD_VIBRATION_TIME 2.0f // Maximum vibration time in seconds | ||
| 86 | #define MAX_TOUCH_POINTS 8 // Maximum number of touch points supported | ||
| 87 | #define MAX_KEY_PRESSED_QUEUE 16 // Maximum number of keys in the key input queue | ||
| 88 | #define MAX_CHAR_PRESSED_QUEUE 16 // Maximum number of characters in the char input queue | ||
| 89 | |||
| 90 | #define MAX_DECOMPRESSION_SIZE 64 // Max size allocated for decompression in MB | ||
| 91 | |||
| 92 | #define MAX_AUTOMATION_EVENTS 16384 // Maximum number of automation events to record | ||
| 93 | |||
| 94 | //------------------------------------------------------------------------------------ | ||
| 95 | // Module: rlgl - Configuration values | ||
| 96 | //------------------------------------------------------------------------------------ | ||
| 97 | |||
| 98 | // Enable OpenGL Debug Context (only available on OpenGL 4.3) | ||
| 99 | //#define RLGL_ENABLE_OPENGL_DEBUG_CONTEXT 1 | ||
| 100 | |||
| 101 | // Show OpenGL extensions and capabilities detailed logs on init | ||
| 102 | //#define RLGL_SHOW_GL_DETAILS_INFO 1 | ||
| 103 | |||
| 104 | #define RL_SUPPORT_MESH_GPU_SKINNING 1 // GPU skinning, comment if your GPU does not support more than 8 VBOs | ||
| 105 | |||
| 106 | //#define RL_DEFAULT_BATCH_BUFFER_ELEMENTS 4096 // Default internal render batch elements limits | ||
| 107 | #define RL_DEFAULT_BATCH_BUFFERS 1 // Default number of batch buffers (multi-buffering) | ||
| 108 | #define RL_DEFAULT_BATCH_DRAWCALLS 256 // Default number of batch draw calls (by state changes: mode, texture) | ||
| 109 | #define RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS 4 // Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture()) | ||
| 110 | |||
| 111 | #define RL_MAX_MATRIX_STACK_SIZE 32 // Maximum size of internal Matrix stack | ||
| 112 | |||
| 113 | #define RL_MAX_SHADER_LOCATIONS 32 // Maximum number of shader locations supported | ||
| 114 | |||
| 115 | #define RL_CULL_DISTANCE_NEAR 0.01 // Default projection matrix near cull distance | ||
| 116 | #define RL_CULL_DISTANCE_FAR 1000.0 // Default projection matrix far cull distance | ||
| 117 | |||
| 118 | // Default shader vertex attribute locations | ||
| 119 | #define RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION 0 | ||
| 120 | #define RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD 1 | ||
| 121 | #define RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL 2 | ||
| 122 | #define RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR 3 | ||
| 123 | #define RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT 4 | ||
| 124 | #define RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2 5 | ||
| 125 | #define RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES 6 | ||
| 126 | #if defined(RL_SUPPORT_MESH_GPU_SKINNING) | ||
| 127 | #define RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEIDS 7 | ||
| 128 | #define RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS 8 | ||
| 129 | #endif | ||
| 130 | |||
| 131 | // Default shader vertex attribute names to set location points | ||
| 132 | // NOTE: When a new shader is loaded, the following locations are tried to be set for convenience | ||
| 133 | #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION | ||
| 134 | #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD | ||
| 135 | #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL | ||
| 136 | #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR | ||
| 137 | #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT | ||
| 138 | #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2 | ||
| 139 | |||
| 140 | #define RL_DEFAULT_SHADER_UNIFORM_NAME_MVP "mvp" // model-view-projection matrix | ||
| 141 | #define RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW "matView" // view matrix | ||
| 142 | #define RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION "matProjection" // projection matrix | ||
| 143 | #define RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL "matModel" // model matrix | ||
| 144 | #define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView)) | ||
| 145 | #define RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR "colDiffuse" // color diffuse (base tint color, multiplied by texture color) | ||
| 146 | #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0 "texture0" // texture0 (texture slot active 0) | ||
| 147 | #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 "texture1" // texture1 (texture slot active 1) | ||
| 148 | #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2) | ||
| 149 | |||
| 150 | |||
| 151 | //------------------------------------------------------------------------------------ | ||
| 152 | // Module: rshapes - Configuration Flags | ||
| 153 | //------------------------------------------------------------------------------------ | ||
| 154 | // Use QUADS instead of TRIANGLES for drawing when possible | ||
| 155 | // Some lines-based shapes could still use lines | ||
| 156 | #define SUPPORT_QUADS_DRAW_MODE 1 | ||
| 157 | |||
| 158 | // rshapes: Configuration values | ||
| 159 | //------------------------------------------------------------------------------------ | ||
| 160 | #define SPLINE_SEGMENT_DIVISIONS 24 // Spline segments subdivisions | ||
| 161 | |||
| 162 | |||
| 163 | //------------------------------------------------------------------------------------ | ||
| 164 | // Module: rtextures - Configuration Flags | ||
| 165 | //------------------------------------------------------------------------------------ | ||
| 166 | // Selecte desired fileformats to be supported for image data loading | ||
| 167 | #define SUPPORT_FILEFORMAT_PNG 1 | ||
| 168 | //#define SUPPORT_FILEFORMAT_BMP 1 | ||
| 169 | //#define SUPPORT_FILEFORMAT_TGA 1 | ||
| 170 | //#define SUPPORT_FILEFORMAT_JPG 1 | ||
| 171 | #define SUPPORT_FILEFORMAT_GIF 1 | ||
| 172 | #define SUPPORT_FILEFORMAT_QOI 1 | ||
| 173 | //#define SUPPORT_FILEFORMAT_PSD 1 | ||
| 174 | #define SUPPORT_FILEFORMAT_DDS 1 | ||
| 175 | //#define SUPPORT_FILEFORMAT_HDR 1 | ||
| 176 | //#define SUPPORT_FILEFORMAT_PIC 1 | ||
| 177 | //#define SUPPORT_FILEFORMAT_KTX 1 | ||
| 178 | //#define SUPPORT_FILEFORMAT_ASTC 1 | ||
| 179 | //#define SUPPORT_FILEFORMAT_PKM 1 | ||
| 180 | //#define SUPPORT_FILEFORMAT_PVR 1 | ||
| 181 | |||
| 182 | // Support image export functionality (.png, .bmp, .tga, .jpg, .qoi) | ||
| 183 | #define SUPPORT_IMAGE_EXPORT 1 | ||
| 184 | // Support procedural image generation functionality (gradient, spot, perlin-noise, cellular) | ||
| 185 | #define SUPPORT_IMAGE_GENERATION 1 | ||
| 186 | // Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop... | ||
| 187 | // If not defined, still some functions are supported: ImageFormat(), ImageCrop(), ImageToPOT() | ||
| 188 | #define SUPPORT_IMAGE_MANIPULATION 1 | ||
| 189 | |||
| 190 | |||
| 191 | //------------------------------------------------------------------------------------ | ||
| 192 | // Module: rtext - Configuration Flags | ||
| 193 | //------------------------------------------------------------------------------------ | ||
| 194 | // Default font is loaded on window initialization to be available for the user to render simple text | ||
| 195 | // NOTE: If enabled, uses external module functions to load default raylib font | ||
| 196 | #define SUPPORT_DEFAULT_FONT 1 | ||
| 197 | // Selected desired font fileformats to be supported for loading | ||
| 198 | #define SUPPORT_FILEFORMAT_TTF 1 | ||
| 199 | #define SUPPORT_FILEFORMAT_FNT 1 | ||
| 200 | //#define SUPPORT_FILEFORMAT_BDF 1 | ||
| 201 | |||
| 202 | // Support text management functions | ||
| 203 | // If not defined, still some functions are supported: TextLength(), TextFormat() | ||
| 204 | #define SUPPORT_TEXT_MANIPULATION 1 | ||
| 205 | |||
| 206 | // On font atlas image generation [GenImageFontAtlas()], add a 3x3 pixels white rectangle | ||
| 207 | // at the bottom-right corner of the atlas. It can be useful to for shapes drawing, to allow | ||
| 208 | // drawing text and shapes with a single draw call [SetShapesTexture()]. | ||
| 209 | #define SUPPORT_FONT_ATLAS_WHITE_REC 1 | ||
| 210 | |||
| 211 | // rtext: Configuration values | ||
| 212 | //------------------------------------------------------------------------------------ | ||
| 213 | #define MAX_TEXT_BUFFER_LENGTH 1024 // Size of internal static buffers used on some functions: | ||
| 214 | // TextFormat(), TextSubtext(), TextToUpper(), TextToLower(), TextToPascal(), TextSplit() | ||
| 215 | #define MAX_TEXTSPLIT_COUNT 128 // Maximum number of substrings to split: TextSplit() | ||
| 216 | |||
| 217 | |||
| 218 | //------------------------------------------------------------------------------------ | ||
| 219 | // Module: rmodels - Configuration Flags | ||
| 220 | //------------------------------------------------------------------------------------ | ||
| 221 | // Selected desired model fileformats to be supported for loading | ||
| 222 | #define SUPPORT_FILEFORMAT_OBJ 1 | ||
| 223 | #define SUPPORT_FILEFORMAT_MTL 1 | ||
| 224 | #define SUPPORT_FILEFORMAT_IQM 1 | ||
| 225 | #define SUPPORT_FILEFORMAT_GLTF 1 | ||
| 226 | #define SUPPORT_FILEFORMAT_VOX 1 | ||
| 227 | #define SUPPORT_FILEFORMAT_M3D 1 | ||
| 228 | // Support procedural mesh generation functions, uses external par_shapes.h library | ||
| 229 | // NOTE: Some generated meshes DO NOT include generated texture coordinates | ||
| 230 | #define SUPPORT_MESH_GENERATION 1 | ||
| 231 | |||
| 232 | // rmodels: Configuration values | ||
| 233 | //------------------------------------------------------------------------------------ | ||
| 234 | #define MAX_MATERIAL_MAPS 12 // Maximum number of shader maps supported | ||
| 235 | |||
| 236 | #ifdef RL_SUPPORT_MESH_GPU_SKINNING | ||
| 237 | #define MAX_MESH_VERTEX_BUFFERS 9 // Maximum vertex buffers (VBO) per mesh | ||
| 238 | #else | ||
| 239 | #define MAX_MESH_VERTEX_BUFFERS 7 // Maximum vertex buffers (VBO) per mesh | ||
| 240 | #endif | ||
| 241 | |||
| 242 | //------------------------------------------------------------------------------------ | ||
| 243 | // Module: raudio - Configuration Flags | ||
| 244 | //------------------------------------------------------------------------------------ | ||
| 245 | // Desired audio fileformats to be supported for loading | ||
| 246 | #define SUPPORT_FILEFORMAT_WAV 1 | ||
| 247 | #define SUPPORT_FILEFORMAT_OGG 1 | ||
| 248 | #define SUPPORT_FILEFORMAT_MP3 1 | ||
| 249 | #define SUPPORT_FILEFORMAT_QOA 1 | ||
| 250 | //#define SUPPORT_FILEFORMAT_FLAC 1 | ||
| 251 | #define SUPPORT_FILEFORMAT_XM 1 | ||
| 252 | #define SUPPORT_FILEFORMAT_MOD 1 | ||
| 253 | |||
| 254 | // raudio: Configuration values | ||
| 255 | //------------------------------------------------------------------------------------ | ||
| 256 | #define AUDIO_DEVICE_FORMAT ma_format_f32 // Device output format (miniaudio: float-32bit) | ||
| 257 | #define AUDIO_DEVICE_CHANNELS 2 // Device output channels: stereo | ||
| 258 | #define AUDIO_DEVICE_SAMPLE_RATE 0 // Device sample rate (device default) | ||
| 259 | |||
| 260 | #define MAX_AUDIO_BUFFER_POOL_CHANNELS 16 // Maximum number of audio pool channels | ||
| 261 | |||
| 262 | //------------------------------------------------------------------------------------ | ||
| 263 | // Module: utils - Configuration Flags | ||
| 264 | //------------------------------------------------------------------------------------ | ||
| 265 | // Standard file io library (stdio.h) included | ||
| 266 | #define SUPPORT_STANDARD_FILEIO 1 | ||
| 267 | // Show TRACELOG() output messages | ||
| 268 | // NOTE: By default LOG_DEBUG traces not shown | ||
| 269 | #define SUPPORT_TRACELOG 1 | ||
| 270 | //#define SUPPORT_TRACELOG_DEBUG 1 | ||
| 271 | |||
| 272 | // utils: Configuration values | ||
| 273 | //------------------------------------------------------------------------------------ | ||
| 274 | #define MAX_TRACELOG_MSG_LENGTH 256 // Max length of one trace-log message | ||
| 275 | |||
| 276 | |||
| 277 | // Enable partial support for clipboard image, only working on SDL3 or | ||
| 278 | // being on both Windows OS + GLFW or Windows OS + RGFW | ||
| 279 | #define SUPPORT_CLIPBOARD_IMAGE 1 | ||
| 280 | |||
| 281 | #if defined(SUPPORT_CLIPBOARD_IMAGE) | ||
| 282 | #ifndef STBI_REQUIRED | ||
| 283 | #define STBI_REQUIRED | ||
| 284 | #endif | ||
| 285 | |||
| 286 | #ifndef SUPPORT_FILEFORMAT_BMP // For clipboard image on Windows | ||
| 287 | #define SUPPORT_FILEFORMAT_BMP 1 | ||
| 288 | #endif | ||
| 289 | |||
| 290 | #ifndef SUPPORT_FILEFORMAT_PNG // Wayland uses png for prints, at least it was on 22 LTS ubuntu | ||
| 291 | #define SUPPORT_FILEFORMAT_PNG 1 | ||
| 292 | #endif | ||
| 293 | |||
| 294 | #ifndef SUPPORT_FILEFORMAT_JPG | ||
| 295 | #define SUPPORT_FILEFORMAT_JPG 1 | ||
| 296 | #endif | ||
| 297 | |||
| 298 | #ifndef SUPPORT_MODULE_RTEXTURES | ||
| 299 | #define SUPPORT_MODULE_RTEXTURES 1 | ||
| 300 | #endif | ||
| 301 | #endif | ||
| 302 | |||
| 303 | #endif // CONFIG_H | ||
