Logo

index : raylib-jai

---

  • summary
  • about
  • tree
  • log
  • branches
<< path: root/public/raylib-jai.git/html/Raylib/raylib/src/config.h blob: b749f8952de3ef119319a0e59d43e9a890fa1e2a [raw] [clear marker]

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