REVIEWED: EXTERNAL_CONFIG_FLAGS usage, check moved to config.h
Due to `utils` module removal, `EXTERNAL_CONFIG_FLAGS` was not working, so the system was redesigned. This change is independent of #4411
This commit is contained in:
parent
32e7732061
commit
0c33c603f4
40
src/config.h
40
src/config.h
|
|
@ -32,25 +32,22 @@
|
||||||
// Module selection - Some modules could be avoided
|
// Module selection - Some modules could be avoided
|
||||||
// Mandatory modules: rcore, rlgl
|
// Mandatory modules: rcore, rlgl
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
#define SUPPORT_MODULE_RSHAPES 1
|
#if !defined(EXTERNAL_CONFIG_FLAGS)
|
||||||
#define SUPPORT_MODULE_RTEXTURES 1
|
#define SUPPORT_MODULE_RSHAPES 1
|
||||||
#define SUPPORT_MODULE_RTEXT 1 // WARNING: It requires SUPPORT_MODULE_RTEXTURES to load sprite font textures
|
#define SUPPORT_MODULE_RTEXTURES 1
|
||||||
#define SUPPORT_MODULE_RMODELS 1
|
#define SUPPORT_MODULE_RTEXT 1 // WARNING: It requires SUPPORT_MODULE_RTEXTURES to load sprite font textures
|
||||||
#define SUPPORT_MODULE_RAUDIO 1
|
#define SUPPORT_MODULE_RMODELS 1
|
||||||
|
#define SUPPORT_MODULE_RAUDIO 1
|
||||||
|
#endif
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Module: rcore - Configuration Flags
|
// Module: rcore - Configuration Flags
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
#if !defined(EXTERNAL_CONFIG_FLAGS)
|
||||||
// Standard file io library (stdio.h) included
|
// Standard file io library (stdio.h) included
|
||||||
#define SUPPORT_STANDARD_FILEIO 1
|
#define SUPPORT_STANDARD_FILEIO 1
|
||||||
// Show TRACELOG() output messages
|
// Show TRACELOG() output messages
|
||||||
#define SUPPORT_TRACELOG 1
|
#define SUPPORT_TRACELOG 1
|
||||||
#if defined(SUPPORT_TRACELOG)
|
|
||||||
#define TRACELOG(level, ...) TraceLog(level, __VA_ARGS__)
|
|
||||||
#else
|
|
||||||
#define TRACELOG(level, ...) (void)0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Camera module is included (rcamera.h) and multiple predefined cameras are available: free, 1st/3rd person, orbital
|
// Camera module is included (rcamera.h) and multiple predefined cameras are available: free, 1st/3rd person, orbital
|
||||||
#define SUPPORT_CAMERA_SYSTEM 1
|
#define SUPPORT_CAMERA_SYSTEM 1
|
||||||
// Gestures module is included (rgestures.h) to support gestures detection: tap, hold, swipe, drag
|
// Gestures module is included (rgestures.h) to support gestures detection: tap, hold, swipe, drag
|
||||||
|
|
@ -79,10 +76,10 @@
|
||||||
// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents()
|
// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents()
|
||||||
// Enabling this flag allows manual control of the frame processes, use at your own risk
|
// Enabling this flag allows manual control of the frame processes, use at your own risk
|
||||||
//#define SUPPORT_CUSTOM_FRAME_CONTROL 1
|
//#define SUPPORT_CUSTOM_FRAME_CONTROL 1
|
||||||
|
|
||||||
// Support for clipboard image loading
|
// Support for clipboard image loading
|
||||||
// NOTE: Only working on SDL3, GLFW (Windows) and RGFW (Windows)
|
// NOTE: Only working on SDL3, GLFW (Windows) and RGFW (Windows)
|
||||||
#define SUPPORT_CLIPBOARD_IMAGE 1
|
#define SUPPORT_CLIPBOARD_IMAGE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
// NOTE: Clipboard image loading requires support for some image file formats
|
// NOTE: Clipboard image loading requires support for some image file formats
|
||||||
// TODO: Those defines should probably be removed from here, letting the user manage them
|
// TODO: Those defines should probably be removed from here, letting the user manage them
|
||||||
|
|
@ -104,6 +101,12 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(SUPPORT_TRACELOG)
|
||||||
|
#define TRACELOG(level, ...) TraceLog(level, __VA_ARGS__)
|
||||||
|
#else
|
||||||
|
#define TRACELOG(level, ...) (void)0
|
||||||
|
#endif
|
||||||
|
|
||||||
// rcore: Configuration values
|
// rcore: Configuration values
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
#define MAX_TRACELOG_MSG_LENGTH 256 // Max length of one trace-log message
|
#define MAX_TRACELOG_MSG_LENGTH 256 // Max length of one trace-log message
|
||||||
|
|
@ -127,7 +130,7 @@
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Module: rlgl - Configuration values
|
// Module: rlgl - Configuration values
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
#if !defined(EXTERNAL_CONFIG_FLAGS)
|
||||||
// Enable OpenGL Debug Context (only available on OpenGL 4.3)
|
// Enable OpenGL Debug Context (only available on OpenGL 4.3)
|
||||||
//#define RLGL_ENABLE_OPENGL_DEBUG_CONTEXT 1
|
//#define RLGL_ENABLE_OPENGL_DEBUG_CONTEXT 1
|
||||||
|
|
||||||
|
|
@ -135,6 +138,7 @@
|
||||||
//#define RLGL_SHOW_GL_DETAILS_INFO 1
|
//#define RLGL_SHOW_GL_DETAILS_INFO 1
|
||||||
|
|
||||||
#define RL_SUPPORT_MESH_GPU_SKINNING 1 // GPU skinning, comment if your GPU does not support more than 8 VBOs
|
#define RL_SUPPORT_MESH_GPU_SKINNING 1 // GPU skinning, comment if your GPU does not support more than 8 VBOs
|
||||||
|
#endif
|
||||||
|
|
||||||
//#define RL_DEFAULT_BATCH_BUFFER_ELEMENTS 4096 // Default internal render batch elements limits
|
//#define RL_DEFAULT_BATCH_BUFFER_ELEMENTS 4096 // Default internal render batch elements limits
|
||||||
#define RL_DEFAULT_BATCH_BUFFERS 1 // Default number of batch buffers (multi-buffering)
|
#define RL_DEFAULT_BATCH_BUFFERS 1 // Default number of batch buffers (multi-buffering)
|
||||||
|
|
@ -184,9 +188,11 @@
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Module: rshapes - Configuration Flags
|
// Module: rshapes - Configuration Flags
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
#if !defined(EXTERNAL_CONFIG_FLAGS)
|
||||||
// Use QUADS instead of TRIANGLES for drawing when possible
|
// Use QUADS instead of TRIANGLES for drawing when possible
|
||||||
// Some lines-based shapes could still use lines
|
// Some lines-based shapes could still use lines
|
||||||
#define SUPPORT_QUADS_DRAW_MODE 1
|
#define SUPPORT_QUADS_DRAW_MODE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
// rshapes: Configuration values
|
// rshapes: Configuration values
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
|
@ -195,6 +201,7 @@
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Module: rtextures - Configuration Flags
|
// Module: rtextures - Configuration Flags
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
#if !defined(EXTERNAL_CONFIG_FLAGS)
|
||||||
// Selected desired fileformats to be supported for image data loading
|
// Selected desired fileformats to be supported for image data loading
|
||||||
#define SUPPORT_FILEFORMAT_PNG 1
|
#define SUPPORT_FILEFORMAT_PNG 1
|
||||||
//#define SUPPORT_FILEFORMAT_BMP 1
|
//#define SUPPORT_FILEFORMAT_BMP 1
|
||||||
|
|
@ -218,10 +225,12 @@
|
||||||
// Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop...
|
// Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop...
|
||||||
// If not defined, still some functions are supported: ImageFormat(), ImageCrop(), ImageToPOT()
|
// If not defined, still some functions are supported: ImageFormat(), ImageCrop(), ImageToPOT()
|
||||||
#define SUPPORT_IMAGE_MANIPULATION 1
|
#define SUPPORT_IMAGE_MANIPULATION 1
|
||||||
|
#endif
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Module: rtext - Configuration Flags
|
// Module: rtext - Configuration Flags
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
#if !defined(EXTERNAL_CONFIG_FLAGS)
|
||||||
// Default font is loaded on window initialization to be available for the user to render simple text
|
// Default font is loaded on window initialization to be available for the user to render simple text
|
||||||
// NOTE: If enabled, uses external module functions to load default raylib font
|
// NOTE: If enabled, uses external module functions to load default raylib font
|
||||||
#define SUPPORT_DEFAULT_FONT 1
|
#define SUPPORT_DEFAULT_FONT 1
|
||||||
|
|
@ -241,6 +250,7 @@
|
||||||
|
|
||||||
// Support conservative font atlas size estimation
|
// Support conservative font atlas size estimation
|
||||||
//#define SUPPORT_FONT_ATLAS_SIZE_CONSERVATIVE 1
|
//#define SUPPORT_FONT_ATLAS_SIZE_CONSERVATIVE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
// rtext: Configuration values
|
// rtext: Configuration values
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
|
@ -251,6 +261,7 @@
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Module: rmodels - Configuration Flags
|
// Module: rmodels - Configuration Flags
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
#if !defined(EXTERNAL_CONFIG_FLAGS)
|
||||||
// Selected desired model fileformats to be supported for loading
|
// Selected desired model fileformats to be supported for loading
|
||||||
#define SUPPORT_FILEFORMAT_OBJ 1
|
#define SUPPORT_FILEFORMAT_OBJ 1
|
||||||
#define SUPPORT_FILEFORMAT_MTL 1
|
#define SUPPORT_FILEFORMAT_MTL 1
|
||||||
|
|
@ -261,6 +272,7 @@
|
||||||
// Support procedural mesh generation functions, uses external par_shapes.h library
|
// Support procedural mesh generation functions, uses external par_shapes.h library
|
||||||
// NOTE: Some generated meshes DO NOT include generated texture coordinates
|
// NOTE: Some generated meshes DO NOT include generated texture coordinates
|
||||||
#define SUPPORT_MESH_GENERATION 1
|
#define SUPPORT_MESH_GENERATION 1
|
||||||
|
#endif
|
||||||
|
|
||||||
// rmodels: Configuration values
|
// rmodels: Configuration values
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
|
@ -275,6 +287,7 @@
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Module: raudio - Configuration Flags
|
// Module: raudio - Configuration Flags
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
#if !defined(EXTERNAL_CONFIG_FLAGS)
|
||||||
// Desired audio fileformats to be supported for loading
|
// Desired audio fileformats to be supported for loading
|
||||||
#define SUPPORT_FILEFORMAT_WAV 1
|
#define SUPPORT_FILEFORMAT_WAV 1
|
||||||
#define SUPPORT_FILEFORMAT_OGG 1
|
#define SUPPORT_FILEFORMAT_OGG 1
|
||||||
|
|
@ -283,6 +296,7 @@
|
||||||
//#define SUPPORT_FILEFORMAT_FLAC 1
|
//#define SUPPORT_FILEFORMAT_FLAC 1
|
||||||
#define SUPPORT_FILEFORMAT_XM 1
|
#define SUPPORT_FILEFORMAT_XM 1
|
||||||
#define SUPPORT_FILEFORMAT_MOD 1
|
#define SUPPORT_FILEFORMAT_MOD 1
|
||||||
|
#endif
|
||||||
|
|
||||||
// raudio: Configuration values
|
// raudio: Configuration values
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -74,11 +74,7 @@
|
||||||
#else
|
#else
|
||||||
#include "raylib.h" // Declares module functions
|
#include "raylib.h" // Declares module functions
|
||||||
|
|
||||||
// Check if config flags have been externally provided on compilation line
|
#include "config.h" // Defines module configuration flags
|
||||||
#if !defined(EXTERNAL_CONFIG_FLAGS)
|
|
||||||
#include "config.h" // Defines module configuration flags
|
|
||||||
#endif
|
|
||||||
//#include "utils.h" // Required for: fopen() Android mapping
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SUPPORT_MODULE_RAUDIO) || defined(RAUDIO_STANDALONE)
|
#if defined(SUPPORT_MODULE_RAUDIO) || defined(RAUDIO_STANDALONE)
|
||||||
|
|
|
||||||
|
|
@ -104,10 +104,7 @@
|
||||||
|
|
||||||
#include "raylib.h" // Declares module functions
|
#include "raylib.h" // Declares module functions
|
||||||
|
|
||||||
// Check if config flags have been externally provided on compilation line
|
#include "config.h" // Defines module configuration flags
|
||||||
#if !defined(EXTERNAL_CONFIG_FLAGS)
|
|
||||||
#include "config.h" // Defines module configuration flags
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdlib.h> // Required for: srand(), rand(), atexit(), exit()
|
#include <stdlib.h> // Required for: srand(), rand(), atexit(), exit()
|
||||||
#include <stdio.h> // Required for: FILE, fopen(), fseek(), ftell(), fread(), fwrite(), fprintf(), vprintf(), fclose(), sprintf() [Used in OpenURL()]
|
#include <stdio.h> // Required for: FILE, fopen(), fseek(), ftell(), fread(), fwrite(), fprintf(), vprintf(), fclose(), sprintf() [Used in OpenURL()]
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,7 @@
|
||||||
|
|
||||||
#include "raylib.h" // Declares module functions
|
#include "raylib.h" // Declares module functions
|
||||||
|
|
||||||
// Check if config flags have been externally provided on compilation line
|
#include "config.h" // Defines module configuration flags
|
||||||
#if !defined(EXTERNAL_CONFIG_FLAGS)
|
|
||||||
#include "config.h" // Defines module configuration flags
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(SUPPORT_MODULE_RMODELS)
|
#if defined(SUPPORT_MODULE_RMODELS)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,7 @@
|
||||||
|
|
||||||
#include "raylib.h" // Declares module functions
|
#include "raylib.h" // Declares module functions
|
||||||
|
|
||||||
// Check if config flags have been externally provided on compilation line
|
#include "config.h" // Defines module configuration flags
|
||||||
#if !defined(EXTERNAL_CONFIG_FLAGS)
|
|
||||||
#include "config.h" // Defines module configuration flags
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(SUPPORT_MODULE_RSHAPES)
|
#if defined(SUPPORT_MODULE_RSHAPES)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,7 @@
|
||||||
|
|
||||||
#include "raylib.h" // Declares module functions
|
#include "raylib.h" // Declares module functions
|
||||||
|
|
||||||
// Check if config flags have been externally provided on compilation line
|
#include "config.h" // Defines module configuration flags
|
||||||
#if !defined(EXTERNAL_CONFIG_FLAGS)
|
|
||||||
#include "config.h" // Defines module configuration flags
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(SUPPORT_MODULE_RTEXT)
|
#if defined(SUPPORT_MODULE_RTEXT)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,10 +63,7 @@
|
||||||
|
|
||||||
#include "raylib.h" // Declares module functions
|
#include "raylib.h" // Declares module functions
|
||||||
|
|
||||||
// Check if config flags have been externally provided on compilation line
|
#include "config.h" // Defines module configuration flags
|
||||||
#if !defined(EXTERNAL_CONFIG_FLAGS)
|
|
||||||
#include "config.h" // Defines module configuration flags
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(SUPPORT_MODULE_RTEXTURES)
|
#if defined(SUPPORT_MODULE_RTEXTURES)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user