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