REVIEWED: Modules description layout
This commit is contained in:
parent
a4a5a798bd
commit
7d68aa6869
11 changed files with 218 additions and 232 deletions
31
src/raudio.c
31
src/raudio.c
|
@ -11,23 +11,22 @@
|
||||||
* - Play/Stop/Pause/Resume loaded audio
|
* - Play/Stop/Pause/Resume loaded audio
|
||||||
*
|
*
|
||||||
* CONFIGURATION:
|
* CONFIGURATION:
|
||||||
|
* #define SUPPORT_MODULE_RAUDIO
|
||||||
|
* raudio module is included in the build
|
||||||
*
|
*
|
||||||
* #define SUPPORT_MODULE_RAUDIO
|
* #define RAUDIO_STANDALONE
|
||||||
* raudio module is included in the build
|
* Define to use the module as standalone library (independently of raylib).
|
||||||
|
* Required types and functions are defined in the same module.
|
||||||
*
|
*
|
||||||
* #define RAUDIO_STANDALONE
|
* #define SUPPORT_FILEFORMAT_WAV
|
||||||
* Define to use the module as standalone library (independently of raylib).
|
* #define SUPPORT_FILEFORMAT_OGG
|
||||||
* Required types and functions are defined in the same module.
|
* #define SUPPORT_FILEFORMAT_MP3
|
||||||
*
|
* #define SUPPORT_FILEFORMAT_QOA
|
||||||
* #define SUPPORT_FILEFORMAT_WAV
|
* #define SUPPORT_FILEFORMAT_FLAC
|
||||||
* #define SUPPORT_FILEFORMAT_OGG
|
* #define SUPPORT_FILEFORMAT_XM
|
||||||
* #define SUPPORT_FILEFORMAT_MP3
|
* #define SUPPORT_FILEFORMAT_MOD
|
||||||
* #define SUPPORT_FILEFORMAT_QOA
|
* Selected desired fileformats to be supported for loading. Some of those formats are
|
||||||
* #define SUPPORT_FILEFORMAT_FLAC
|
* supported by default, to remove support, just comment unrequired #define in this module
|
||||||
* #define SUPPORT_FILEFORMAT_XM
|
|
||||||
* #define SUPPORT_FILEFORMAT_MOD
|
|
||||||
* Selected desired fileformats to be supported for loading. Some of those formats are
|
|
||||||
* supported by default, to remove support, just comment unrequired #define in this module
|
|
||||||
*
|
*
|
||||||
* DEPENDENCIES:
|
* DEPENDENCIES:
|
||||||
* miniaudio.h - Audio device management lib (https://github.com/mackron/miniaudio)
|
* miniaudio.h - Audio device management lib (https://github.com/mackron/miniaudio)
|
||||||
|
@ -42,7 +41,7 @@
|
||||||
* David Reid (github: @mackron) (Nov. 2017):
|
* David Reid (github: @mackron) (Nov. 2017):
|
||||||
* - Complete port to miniaudio library
|
* - Complete port to miniaudio library
|
||||||
*
|
*
|
||||||
* Joshua Reisenauer (github: @kd7tck) (2015)
|
* Joshua Reisenauer (github: @kd7tck) (2015):
|
||||||
* - XM audio module support (jar_xm)
|
* - XM audio module support (jar_xm)
|
||||||
* - MOD audio module support (jar_mod)
|
* - MOD audio module support (jar_mod)
|
||||||
* - Mixing channels support
|
* - Mixing channels support
|
||||||
|
|
|
@ -2,19 +2,7 @@
|
||||||
*
|
*
|
||||||
* raymath v1.5 - Math functions to work with Vector2, Vector3, Matrix and Quaternions
|
* raymath v1.5 - Math functions to work with Vector2, Vector3, Matrix and Quaternions
|
||||||
*
|
*
|
||||||
* CONFIGURATION:
|
|
||||||
*
|
|
||||||
* #define RAYMATH_IMPLEMENTATION
|
|
||||||
* Generates the implementation of the library into the included file.
|
|
||||||
* If not defined, the library is in header only mode and can be included in other headers
|
|
||||||
* or source files without problems. But only ONE file should hold the implementation.
|
|
||||||
*
|
|
||||||
* #define RAYMATH_STATIC_INLINE
|
|
||||||
* Define static inline functions code, so #include header suffices for use.
|
|
||||||
* This may use up lots of memory.
|
|
||||||
*
|
|
||||||
* CONVENTIONS:
|
* CONVENTIONS:
|
||||||
*
|
|
||||||
* - Functions are always self-contained, no function use another raymath function inside,
|
* - Functions are always self-contained, no function use another raymath function inside,
|
||||||
* required code is directly re-implemented inside
|
* required code is directly re-implemented inside
|
||||||
* - Functions input parameters are always received by value (2 unavoidable exceptions)
|
* - Functions input parameters are always received by value (2 unavoidable exceptions)
|
||||||
|
@ -22,6 +10,16 @@
|
||||||
* - Functions are always defined inline
|
* - Functions are always defined inline
|
||||||
* - Angles are always in radians (DEG2RAD/RAD2DEG macros provided for convenience)
|
* - Angles are always in radians (DEG2RAD/RAD2DEG macros provided for convenience)
|
||||||
*
|
*
|
||||||
|
* CONFIGURATION:
|
||||||
|
* #define RAYMATH_IMPLEMENTATION
|
||||||
|
* Generates the implementation of the library into the included file.
|
||||||
|
* If not defined, the library is in header only mode and can be included in other headers
|
||||||
|
* or source files without problems. But only ONE file should hold the implementation.
|
||||||
|
*
|
||||||
|
* #define RAYMATH_STATIC_INLINE
|
||||||
|
* Define static inline functions code, so #include header suffices for use.
|
||||||
|
* This may use up lots of memory.
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* LICENSE: zlib/libpng
|
* LICENSE: zlib/libpng
|
||||||
*
|
*
|
||||||
|
@ -703,7 +701,7 @@ RMAPI Vector3 Vector3Normalize(Vector3 v)
|
||||||
Vector3 result = v;
|
Vector3 result = v;
|
||||||
|
|
||||||
float length = sqrtf(v.x*v.x + v.y*v.y + v.z*v.z);
|
float length = sqrtf(v.x*v.x + v.y*v.y + v.z*v.z);
|
||||||
if (length != 0.0f)
|
if (length != 0.0f)
|
||||||
{
|
{
|
||||||
float ilength = 1.0f/length;
|
float ilength = 1.0f/length;
|
||||||
|
|
||||||
|
|
|
@ -3,15 +3,14 @@
|
||||||
* rcamera - Basic camera system with support for multiple camera modes
|
* rcamera - Basic camera system with support for multiple camera modes
|
||||||
*
|
*
|
||||||
* CONFIGURATION:
|
* CONFIGURATION:
|
||||||
|
* #define CAMERA_IMPLEMENTATION
|
||||||
|
* Generates the implementation of the library into the included file.
|
||||||
|
* If not defined, the library is in header only mode and can be included in other headers
|
||||||
|
* or source files without problems. But only ONE file should hold the implementation.
|
||||||
*
|
*
|
||||||
* #define CAMERA_IMPLEMENTATION
|
* #define CAMERA_STANDALONE
|
||||||
* Generates the implementation of the library into the included file.
|
* If defined, the library can be used as standalone as a camera system but some
|
||||||
* If not defined, the library is in header only mode and can be included in other headers
|
* functions must be redefined to manage inputs accordingly.
|
||||||
* or source files without problems. But only ONE file should hold the implementation.
|
|
||||||
*
|
|
||||||
* #define CAMERA_STANDALONE
|
|
||||||
* If defined, the library can be used as standalone as a camera system but some
|
|
||||||
* functions must be redefined to manage inputs accordingly.
|
|
||||||
*
|
*
|
||||||
* CONTRIBUTORS:
|
* CONTRIBUTORS:
|
||||||
* Ramon Santamaria: Supervision, review, update and maintenance
|
* Ramon Santamaria: Supervision, review, update and maintenance
|
||||||
|
|
104
src/rcore.c
104
src/rcore.c
|
@ -13,75 +13,75 @@
|
||||||
* - PLATFORM_WEB: HTML5 with WebAssembly
|
* - PLATFORM_WEB: HTML5 with WebAssembly
|
||||||
*
|
*
|
||||||
* CONFIGURATION:
|
* CONFIGURATION:
|
||||||
|
* #define PLATFORM_DESKTOP
|
||||||
|
* Windowing and input system configured for desktop platforms:
|
||||||
|
* Windows, Linux, OSX, FreeBSD, OpenBSD, NetBSD, DragonFly
|
||||||
*
|
*
|
||||||
* #define PLATFORM_DESKTOP
|
* #define PLATFORM_ANDROID
|
||||||
* Windowing and input system configured for desktop platforms: Windows, Linux, OSX, FreeBSD, OpenBSD, NetBSD, DragonFly
|
* Windowing and input system configured for Android device, app activity managed internally in this module.
|
||||||
* NOTE: Oculus Rift CV1 requires PLATFORM_DESKTOP for mirror rendering - View [rlgl] module to enable it
|
* NOTE: OpenGL ES 2.0 is required and graphic device is managed by EGL
|
||||||
*
|
*
|
||||||
* #define PLATFORM_ANDROID
|
* #define PLATFORM_RPI (deprecated - RPI OS Buster only)
|
||||||
* Windowing and input system configured for Android device, app activity managed internally in this module.
|
* Windowing and input system configured for Raspberry Pi in native mode (no XWindow required),
|
||||||
* NOTE: OpenGL ES 2.0 is required and graphic device is managed by EGL
|
* graphic device is managed by EGL and inputs are processed is raw mode, reading from /dev/input/
|
||||||
|
* WARNING: This platform is deprecated, since RPI OS Bullseye, the old Dispmanx libraries are not
|
||||||
|
* supported and you must be using PLATFORM_DRM
|
||||||
*
|
*
|
||||||
* #define PLATFORM_RPI (deprecated - RPI OS Buster only)
|
* #define PLATFORM_DRM
|
||||||
* Windowing and input system configured for Raspberry Pi in native mode (no XWindow required),
|
* Windowing and input system configured for DRM native mode (RPI4 and other devices)
|
||||||
* graphic device is managed by EGL and inputs are processed is raw mode, reading from /dev/input/
|
* graphic device is managed by EGL and inputs are processed is raw mode, reading from /dev/input/
|
||||||
* WARNING: This platform is deprecated, since RPI OS Bullseye, the old Dispmanx libraries are not
|
|
||||||
* supported and you must be using PLATFORM_DRM
|
|
||||||
*
|
*
|
||||||
* #define PLATFORM_DRM
|
* #define PLATFORM_WEB
|
||||||
* Windowing and input system configured for DRM native mode (RPI4 and other devices)
|
* Windowing and input system configured for HTML5 (run on browser), code converted from C to asm.js
|
||||||
* graphic device is managed by EGL and inputs are processed is raw mode, reading from /dev/input/
|
* using emscripten compiler. OpenGL ES 2.0 required for direct translation to WebGL equivalent code.
|
||||||
*
|
*
|
||||||
* #define PLATFORM_WEB
|
* #define SUPPORT_DEFAULT_FONT (default)
|
||||||
* Windowing and input system configured for HTML5 (run on browser), code converted from C to asm.js
|
* Default font is loaded on window initialization to be available for the user to render simple text.
|
||||||
* using emscripten compiler. OpenGL ES 2.0 required for direct translation to WebGL equivalent code.
|
* NOTE: If enabled, uses external module functions to load default raylib font (module: text)
|
||||||
*
|
*
|
||||||
* #define SUPPORT_DEFAULT_FONT (default)
|
* #define SUPPORT_CAMERA_SYSTEM
|
||||||
* Default font is loaded on window initialization to be available for the user to render simple text.
|
* Camera module is included (rcamera.h) and multiple predefined cameras are available:
|
||||||
* NOTE: If enabled, uses external module functions to load default raylib font (module: text)
|
* free, 1st/3rd person, orbital, custom
|
||||||
*
|
*
|
||||||
* #define SUPPORT_CAMERA_SYSTEM
|
* #define SUPPORT_GESTURES_SYSTEM
|
||||||
* Camera module is included (rcamera.h) and multiple predefined cameras are available: free, 1st/3rd person, orbital
|
* Gestures module is included (rgestures.h) to support gestures detection: tap, hold, swipe, drag
|
||||||
*
|
*
|
||||||
* #define SUPPORT_GESTURES_SYSTEM
|
* #define SUPPORT_MOUSE_GESTURES
|
||||||
* Gestures module is included (rgestures.h) to support gestures detection: tap, hold, swipe, drag
|
* Mouse gestures are directly mapped like touches and processed by gestures system.
|
||||||
*
|
*
|
||||||
* #define SUPPORT_MOUSE_GESTURES
|
* #define SUPPORT_TOUCH_AS_MOUSE
|
||||||
* Mouse gestures are directly mapped like touches and processed by gestures system.
|
* Touch input and mouse input are shared. Mouse functions also return touch information.
|
||||||
*
|
*
|
||||||
* #define SUPPORT_TOUCH_AS_MOUSE
|
* #define SUPPORT_SSH_KEYBOARD_RPI (Raspberry Pi only)
|
||||||
* Touch input and mouse input are shared. Mouse functions also return touch information.
|
* Reconfigure standard input to receive key inputs, works with SSH connection.
|
||||||
|
* WARNING: Reconfiguring standard input could lead to undesired effects, like breaking other
|
||||||
|
* running processes orblocking the device if not restored properly. Use with care.
|
||||||
*
|
*
|
||||||
* #define SUPPORT_SSH_KEYBOARD_RPI (Raspberry Pi only)
|
* #define SUPPORT_BUSY_WAIT_LOOP
|
||||||
* Reconfigure standard input to receive key inputs, works with SSH connection.
|
* Use busy wait loop for timing sync, if not defined, a high-resolution timer is setup and used
|
||||||
* WARNING: Reconfiguring standard input could lead to undesired effects, like breaking other running processes or
|
|
||||||
* blocking the device if not restored properly. Use with care.
|
|
||||||
*
|
*
|
||||||
* #define SUPPORT_BUSY_WAIT_LOOP
|
* #define SUPPORT_PARTIALBUSY_WAIT_LOOP
|
||||||
* Use busy wait loop for timing sync, if not defined, a high-resolution timer is setup and used
|
* Use a partial-busy wait loop, in this case frame sleeps for most of the time and runs a busy-wait-loop at the end
|
||||||
*
|
*
|
||||||
* #define SUPPORT_PARTIALBUSY_WAIT_LOOP
|
* #define SUPPORT_EVENTS_WAITING
|
||||||
* Use a partial-busy wait loop, in this case frame sleeps for most of the time and runs a busy-wait-loop at the end
|
* Wait for events passively (sleeping while no events) instead of polling them actively every frame
|
||||||
*
|
*
|
||||||
* #define SUPPORT_EVENTS_WAITING
|
* #define SUPPORT_SCREEN_CAPTURE
|
||||||
* Wait for events passively (sleeping while no events) instead of polling them actively every frame
|
* Allow automatic screen capture of current screen pressing F12, defined in KeyCallback()
|
||||||
*
|
*
|
||||||
* #define SUPPORT_SCREEN_CAPTURE
|
* #define SUPPORT_GIF_RECORDING
|
||||||
* Allow automatic screen capture of current screen pressing F12, defined in KeyCallback()
|
* Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback()
|
||||||
*
|
*
|
||||||
* #define SUPPORT_GIF_RECORDING
|
* #define SUPPORT_COMPRESSION_API
|
||||||
* Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback()
|
* Support CompressData() and DecompressData() functions, those functions use zlib implementation
|
||||||
|
* provided by stb_image and stb_image_write libraries, so, those libraries must be enabled on textures module
|
||||||
|
* for linkage
|
||||||
*
|
*
|
||||||
* #define SUPPORT_COMPRESSION_API
|
* #define SUPPORT_EVENTS_AUTOMATION
|
||||||
* Support CompressData() and DecompressData() functions, those functions use zlib implementation
|
* Support automatic generated events, loading and recording of those events when required
|
||||||
* provided by stb_image and stb_image_write libraries, so, those libraries must be enabled on textures module
|
|
||||||
* for linkage
|
|
||||||
*
|
|
||||||
* #define SUPPORT_EVENTS_AUTOMATION
|
|
||||||
* Support automatic generated events, loading and recording of those events when required
|
|
||||||
*
|
*
|
||||||
* DEPENDENCIES:
|
* DEPENDENCIES:
|
||||||
* rglfw - Manage graphic device, OpenGL context and inputs on PLATFORM_DESKTOP (Windows, Linux, OSX. FreeBSD, OpenBSD, NetBSD, DragonFly)
|
* rglfw - Manage graphic device, OpenGL context and inputs on PLATFORM_DESKTOP (Windows, Linux, OSX, FreeBSD...)
|
||||||
* raymath - 3D math functionality (Vector2, Vector3, Matrix, Quaternion)
|
* raymath - 3D math functionality (Vector2, Vector3, Matrix, Quaternion)
|
||||||
* camera - Multiple 3D camera modes (free, orbital, 1st person, 3rd person)
|
* camera - Multiple 3D camera modes (free, orbital, 1st person, 3rd person)
|
||||||
* gestures - Gestures system for touch-ready devices (or simulated from mouse inputs)
|
* gestures - Gestures system for touch-ready devices (or simulated from mouse inputs)
|
||||||
|
@ -6721,7 +6721,7 @@ static void *EventThread(void *arg)
|
||||||
if (CORE.Input.Mouse.currentPosition.y < 0) CORE.Input.Mouse.currentPosition.y = 0;
|
if (CORE.Input.Mouse.currentPosition.y < 0) CORE.Input.Mouse.currentPosition.y = 0;
|
||||||
if (CORE.Input.Mouse.currentPosition.y > CORE.Window.screen.height/CORE.Input.Mouse.scale.y) CORE.Input.Mouse.currentPosition.y = CORE.Window.screen.height/CORE.Input.Mouse.scale.y;
|
if (CORE.Input.Mouse.currentPosition.y > CORE.Window.screen.height/CORE.Input.Mouse.scale.y) CORE.Input.Mouse.currentPosition.y = CORE.Window.screen.height/CORE.Input.Mouse.scale.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update touch point count
|
// Update touch point count
|
||||||
CORE.Input.Touch.pointCount = 0;
|
CORE.Input.Touch.pointCount = 0;
|
||||||
if (CORE.Input.Touch.position[0].x >= 0) CORE.Input.Touch.pointCount++;
|
if (CORE.Input.Touch.position[0].x >= 0) CORE.Input.Touch.pointCount++;
|
||||||
|
@ -6736,7 +6736,7 @@ static void *EventThread(void *arg)
|
||||||
|
|
||||||
gestureEvent.touchAction = touchAction;
|
gestureEvent.touchAction = touchAction;
|
||||||
gestureEvent.pointCount = CORE.Input.Touch.pointCount;
|
gestureEvent.pointCount = CORE.Input.Touch.pointCount;
|
||||||
|
|
||||||
gestureEvent.pointId[0] = 0;
|
gestureEvent.pointId[0] = 0;
|
||||||
gestureEvent.pointId[1] = 1;
|
gestureEvent.pointId[1] = 1;
|
||||||
gestureEvent.pointId[2] = 2;
|
gestureEvent.pointId[2] = 2;
|
||||||
|
|
|
@ -2,18 +2,15 @@
|
||||||
*
|
*
|
||||||
* rgestures - Gestures system, gestures processing based on input events (touch/mouse)
|
* rgestures - Gestures system, gestures processing based on input events (touch/mouse)
|
||||||
*
|
*
|
||||||
* NOTE: Memory footprint of this library is aproximately 128 bytes (global variables)
|
|
||||||
*
|
|
||||||
* CONFIGURATION:
|
* CONFIGURATION:
|
||||||
|
* #define GESTURES_IMPLEMENTATION
|
||||||
|
* Generates the implementation of the library into the included file.
|
||||||
|
* If not defined, the library is in header only mode and can be included in other headers
|
||||||
|
* or source files without problems. But only ONE file should hold the implementation.
|
||||||
*
|
*
|
||||||
* #define GESTURES_IMPLEMENTATION
|
* #define GESTURES_STANDALONE
|
||||||
* Generates the implementation of the library into the included file.
|
* If defined, the library can be used as standalone to process gesture events with
|
||||||
* If not defined, the library is in header only mode and can be included in other headers
|
* no external dependencies.
|
||||||
* or source files without problems. But only ONE file should hold the implementation.
|
|
||||||
*
|
|
||||||
* #define GESTURES_STANDALONE
|
|
||||||
* If defined, the library can be used as standalone to process gesture events with
|
|
||||||
* no external dependencies.
|
|
||||||
*
|
*
|
||||||
* CONTRIBUTORS:
|
* CONTRIBUTORS:
|
||||||
* Marc Palau: Initial implementation (2014)
|
* Marc Palau: Initial implementation (2014)
|
||||||
|
|
117
src/rlgl.h
117
src/rlgl.h
|
@ -2,82 +2,81 @@
|
||||||
*
|
*
|
||||||
* rlgl v4.5 - A multi-OpenGL abstraction layer with an immediate-mode style API
|
* rlgl v4.5 - A multi-OpenGL abstraction layer with an immediate-mode style API
|
||||||
*
|
*
|
||||||
* An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0)
|
* DESCRIPTION:
|
||||||
* that provides a pseudo-OpenGL 1.1 immediate-mode style API (rlVertex, rlTranslate, rlRotate...)
|
* An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0)
|
||||||
|
* that provides a pseudo-OpenGL 1.1 immediate-mode style API (rlVertex, rlTranslate, rlRotate...)
|
||||||
*
|
*
|
||||||
* When choosing an OpenGL backend different than OpenGL 1.1, some internal buffer are
|
* ADDITIONAL NOTES:
|
||||||
* initialized on rlglInit() to accumulate vertex data.
|
* When choosing an OpenGL backend different than OpenGL 1.1, some internal buffer are
|
||||||
|
* initialized on rlglInit() to accumulate vertex data.
|
||||||
*
|
*
|
||||||
* When an internal state change is required all the stored vertex data is renderer in batch,
|
* When an internal state change is required all the stored vertex data is renderer in batch,
|
||||||
* additionally, rlDrawRenderBatchActive() could be called to force flushing of the batch.
|
* additionally, rlDrawRenderBatchActive() could be called to force flushing of the batch.
|
||||||
*
|
*
|
||||||
* Some additional resources are also loaded for convenience, here the complete list:
|
* Some resources are also loaded for convenience, here the complete list:
|
||||||
* - Default batch (RLGL.defaultBatch): RenderBatch system to accumulate vertex data
|
* - Default batch (RLGL.defaultBatch): RenderBatch system to accumulate vertex data
|
||||||
* - Default texture (RLGL.defaultTextureId): 1x1 white pixel R8G8B8A8
|
* - Default texture (RLGL.defaultTextureId): 1x1 white pixel R8G8B8A8
|
||||||
* - Default shader (RLGL.State.defaultShaderId, RLGL.State.defaultShaderLocs)
|
* - Default shader (RLGL.State.defaultShaderId, RLGL.State.defaultShaderLocs)
|
||||||
*
|
|
||||||
* Internal buffer (and additional resources) must be manually unloaded calling rlglClose().
|
|
||||||
*
|
*
|
||||||
|
* Internal buffer (and resources) must be manually unloaded calling rlglClose().
|
||||||
*
|
*
|
||||||
* CONFIGURATION:
|
* CONFIGURATION:
|
||||||
|
* #define GRAPHICS_API_OPENGL_11
|
||||||
|
* #define GRAPHICS_API_OPENGL_21
|
||||||
|
* #define GRAPHICS_API_OPENGL_33
|
||||||
|
* #define GRAPHICS_API_OPENGL_43
|
||||||
|
* #define GRAPHICS_API_OPENGL_ES2
|
||||||
|
* Use selected OpenGL graphics backend, should be supported by platform
|
||||||
|
* Those preprocessor defines are only used on rlgl module, if OpenGL version is
|
||||||
|
* required by any other module, use rlGetVersion() to check it
|
||||||
*
|
*
|
||||||
* #define GRAPHICS_API_OPENGL_11
|
* #define RLGL_IMPLEMENTATION
|
||||||
* #define GRAPHICS_API_OPENGL_21
|
* Generates the implementation of the library into the included file.
|
||||||
* #define GRAPHICS_API_OPENGL_33
|
* If not defined, the library is in header only mode and can be included in other headers
|
||||||
* #define GRAPHICS_API_OPENGL_43
|
* or source files without problems. But only ONE file should hold the implementation.
|
||||||
* #define GRAPHICS_API_OPENGL_ES2
|
|
||||||
* Use selected OpenGL graphics backend, should be supported by platform
|
|
||||||
* Those preprocessor defines are only used on rlgl module, if OpenGL version is
|
|
||||||
* required by any other module, use rlGetVersion() to check it
|
|
||||||
*
|
*
|
||||||
* #define RLGL_IMPLEMENTATION
|
* #define RLGL_RENDER_TEXTURES_HINT
|
||||||
* Generates the implementation of the library into the included file.
|
* Enable framebuffer objects (fbo) support (enabled by default)
|
||||||
* If not defined, the library is in header only mode and can be included in other headers
|
* Some GPUs could not support them despite the OpenGL version
|
||||||
* or source files without problems. But only ONE file should hold the implementation.
|
|
||||||
*
|
*
|
||||||
* #define RLGL_RENDER_TEXTURES_HINT
|
* #define RLGL_SHOW_GL_DETAILS_INFO
|
||||||
* Enable framebuffer objects (fbo) support (enabled by default)
|
* Show OpenGL extensions and capabilities detailed logs on init
|
||||||
* Some GPUs could not support them despite the OpenGL version
|
|
||||||
*
|
*
|
||||||
* #define RLGL_SHOW_GL_DETAILS_INFO
|
* #define RLGL_ENABLE_OPENGL_DEBUG_CONTEXT
|
||||||
* Show OpenGL extensions and capabilities detailed logs on init
|
* Enable debug context (only available on OpenGL 4.3)
|
||||||
*
|
*
|
||||||
* #define RLGL_ENABLE_OPENGL_DEBUG_CONTEXT
|
* rlgl capabilities could be customized just defining some internal
|
||||||
* Enable debug context (only available on OpenGL 4.3)
|
* values before library inclusion (default values listed):
|
||||||
*
|
*
|
||||||
* rlgl capabilities could be customized just defining some internal
|
* #define RL_DEFAULT_BATCH_BUFFER_ELEMENTS 8192 // Default internal render batch elements limits
|
||||||
* values before library inclusion (default values listed):
|
* #define RL_DEFAULT_BATCH_BUFFERS 1 // Default number of batch buffers (multi-buffering)
|
||||||
|
* #define RL_DEFAULT_BATCH_DRAWCALLS 256 // Default number of batch draw calls (by state changes: mode, texture)
|
||||||
|
* #define RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS 4 // Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture())
|
||||||
*
|
*
|
||||||
* #define RL_DEFAULT_BATCH_BUFFER_ELEMENTS 8192 // Default internal render batch elements limits
|
* #define RL_MAX_MATRIX_STACK_SIZE 32 // Maximum size of internal Matrix stack
|
||||||
* #define RL_DEFAULT_BATCH_BUFFERS 1 // Default number of batch buffers (multi-buffering)
|
* #define RL_MAX_SHADER_LOCATIONS 32 // Maximum number of shader locations supported
|
||||||
* #define RL_DEFAULT_BATCH_DRAWCALLS 256 // Default number of batch draw calls (by state changes: mode, texture)
|
* #define RL_CULL_DISTANCE_NEAR 0.01 // Default projection matrix near cull distance
|
||||||
* #define RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS 4 // Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture())
|
* #define RL_CULL_DISTANCE_FAR 1000.0 // Default projection matrix far cull distance
|
||||||
*
|
*
|
||||||
* #define RL_MAX_MATRIX_STACK_SIZE 32 // Maximum size of internal Matrix stack
|
* When loading a shader, the following vertex attribute and uniform
|
||||||
* #define RL_MAX_SHADER_LOCATIONS 32 // Maximum number of shader locations supported
|
* location names are tried to be set automatically:
|
||||||
* #define RL_CULL_DISTANCE_NEAR 0.01 // Default projection matrix near cull distance
|
|
||||||
* #define RL_CULL_DISTANCE_FAR 1000.0 // Default projection matrix far cull distance
|
|
||||||
*
|
*
|
||||||
* When loading a shader, the following vertex attribute and uniform
|
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: 0
|
||||||
* location names are tried to be set automatically:
|
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Bound by default to shader location: 1
|
||||||
*
|
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: 2
|
||||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: 0
|
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: 3
|
||||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Bound by default to shader location: 1
|
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: 4
|
||||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: 2
|
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_MVP "mvp" // model-view-projection matrix
|
||||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: 3
|
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW "matView" // view matrix
|
||||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: 4
|
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION "matProjection" // projection matrix
|
||||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_MVP "mvp" // model-view-projection matrix
|
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL "matModel" // model matrix
|
||||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW "matView" // view matrix
|
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView))
|
||||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION "matProjection" // projection matrix
|
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR "colDiffuse" // color diffuse (base tint color, multiplied by texture color)
|
||||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL "matModel" // model matrix
|
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0 "texture0" // texture0 (texture slot active 0)
|
||||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView))
|
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 "texture1" // texture1 (texture slot active 1)
|
||||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR "colDiffuse" // color diffuse (base tint color, multiplied by texture color)
|
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2)
|
||||||
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0 "texture0" // texture0 (texture slot active 0)
|
|
||||||
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 "texture1" // texture1 (texture slot active 1)
|
|
||||||
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2)
|
|
||||||
*
|
*
|
||||||
* DEPENDENCIES:
|
* DEPENDENCIES:
|
||||||
*
|
|
||||||
* - OpenGL libraries (depending on platform and OpenGL version selected)
|
* - OpenGL libraries (depending on platform and OpenGL version selected)
|
||||||
* - GLAD OpenGL extensions loading library (only for OpenGL 3.3 Core, 4.3 Core)
|
* - GLAD OpenGL extensions loading library (only for OpenGL 3.3 Core, 4.3 Core)
|
||||||
*
|
*
|
||||||
|
|
|
@ -3,21 +3,20 @@
|
||||||
* rmodels - Basic functions to draw 3d shapes and load and draw 3d models
|
* rmodels - Basic functions to draw 3d shapes and load and draw 3d models
|
||||||
*
|
*
|
||||||
* CONFIGURATION:
|
* CONFIGURATION:
|
||||||
|
* #define SUPPORT_MODULE_RMODELS
|
||||||
|
* rmodels module is included in the build
|
||||||
*
|
*
|
||||||
* #define SUPPORT_MODULE_RMODELS
|
* #define SUPPORT_FILEFORMAT_OBJ
|
||||||
* rmodels module is included in the build
|
* #define SUPPORT_FILEFORMAT_MTL
|
||||||
|
* #define SUPPORT_FILEFORMAT_IQM
|
||||||
|
* #define SUPPORT_FILEFORMAT_GLTF
|
||||||
|
* #define SUPPORT_FILEFORMAT_VOX
|
||||||
|
* #define SUPPORT_FILEFORMAT_M3D
|
||||||
|
* Selected desired fileformats to be supported for model data loading.
|
||||||
*
|
*
|
||||||
* #define SUPPORT_FILEFORMAT_OBJ
|
* #define SUPPORT_MESH_GENERATION
|
||||||
* #define SUPPORT_FILEFORMAT_MTL
|
* Support procedural mesh generation functions, uses external par_shapes.h library
|
||||||
* #define SUPPORT_FILEFORMAT_IQM
|
* NOTE: Some generated meshes DO NOT include generated texture coordinates
|
||||||
* #define SUPPORT_FILEFORMAT_GLTF
|
|
||||||
* #define SUPPORT_FILEFORMAT_VOX
|
|
||||||
* #define SUPPORT_FILEFORMAT_M3D
|
|
||||||
* Selected desired fileformats to be supported for model data loading.
|
|
||||||
*
|
|
||||||
* #define SUPPORT_MESH_GENERATION
|
|
||||||
* Support procedural mesh generation functions, uses external par_shapes.h library
|
|
||||||
* NOTE: Some generated meshes DO NOT include generated texture coordinates
|
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* LICENSE: zlib/libpng
|
* LICENSE: zlib/libpng
|
||||||
|
|
|
@ -2,26 +2,25 @@
|
||||||
*
|
*
|
||||||
* rshapes - Basic functions to draw 2d shapes and check collisions
|
* rshapes - Basic functions to draw 2d shapes and check collisions
|
||||||
*
|
*
|
||||||
* NOTES:
|
* ADDITIONAL NOTES:
|
||||||
* Shapes can be draw using 3 types of primitives: LINES, TRIANGLES and QUADS.
|
* Shapes can be draw using 3 types of primitives: LINES, TRIANGLES and QUADS.
|
||||||
* Some functions implement two drawing options: TRIANGLES and QUADS, by default TRIANGLES
|
* Some functions implement two drawing options: TRIANGLES and QUADS, by default TRIANGLES
|
||||||
* are used but QUADS implementation can be selected with SUPPORT_QUADS_DRAW_MODE define
|
* are used but QUADS implementation can be selected with SUPPORT_QUADS_DRAW_MODE define
|
||||||
*
|
*
|
||||||
* Some functions define texture coordinates (rlTexCoord2f()) for the shapes and use a
|
* Some functions define texture coordinates (rlTexCoord2f()) for the shapes and use a
|
||||||
* user-provided texture with SetShapesTexture(), the pourpouse of this implementation
|
* user-provided texture with SetShapesTexture(), the pourpouse of this implementation
|
||||||
* is allowing to reduce draw calls when combined with a texture-atlas.
|
* is allowing to reduce draw calls when combined with a texture-atlas.
|
||||||
*
|
*
|
||||||
* By default, raylib sets the default texture and rectangle at InitWindow()[rcore] to one
|
* By default, raylib sets the default texture and rectangle at InitWindow()[rcore] to one
|
||||||
* white character of default font [rtext], this way, raylib text and shapes can be draw with
|
* white character of default font [rtext], this way, raylib text and shapes can be draw with
|
||||||
* a single draw call and it also allows users to configure it the same way with their own fonts.
|
* a single draw call and it also allows users to configure it the same way with their own fonts.
|
||||||
*
|
*
|
||||||
* CONFIGURATION:
|
* CONFIGURATION:
|
||||||
|
* #define SUPPORT_MODULE_RSHAPES
|
||||||
|
* rshapes module is included in the build
|
||||||
*
|
*
|
||||||
* #define SUPPORT_MODULE_RSHAPES
|
* #define SUPPORT_QUADS_DRAW_MODE
|
||||||
* rshapes module is included in the build
|
* Use QUADS instead of TRIANGLES for drawing when possible. Lines-based shapes still use LINES
|
||||||
*
|
|
||||||
* #define SUPPORT_QUADS_DRAW_MODE
|
|
||||||
* Use QUADS instead of TRIANGLES for drawing when possible. Lines-based shapes still use LINES
|
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* LICENSE: zlib/libpng
|
* LICENSE: zlib/libpng
|
||||||
|
|
28
src/rtext.c
28
src/rtext.c
|
@ -3,25 +3,23 @@
|
||||||
* rtext - Basic functions to load fonts and draw text
|
* rtext - Basic functions to load fonts and draw text
|
||||||
*
|
*
|
||||||
* CONFIGURATION:
|
* CONFIGURATION:
|
||||||
|
* #define SUPPORT_MODULE_RTEXT
|
||||||
|
* rtext module is included in the build
|
||||||
*
|
*
|
||||||
* #define SUPPORT_MODULE_RTEXT
|
* #define SUPPORT_FILEFORMAT_FNT
|
||||||
* rtext module is included in the build
|
* #define SUPPORT_FILEFORMAT_TTF
|
||||||
|
* Selected desired fileformats to be supported for loading. Some of those formats are
|
||||||
|
* supported by default, to remove support, just comment unrequired #define in this module
|
||||||
*
|
*
|
||||||
* #define SUPPORT_FILEFORMAT_FNT
|
* #define SUPPORT_DEFAULT_FONT
|
||||||
* #define SUPPORT_FILEFORMAT_TTF
|
* Load default raylib font on initialization to be used by DrawText() and MeasureText().
|
||||||
* Selected desired fileformats to be supported for loading. Some of those formats are
|
* If no default font loaded, DrawTextEx() and MeasureTextEx() are required.
|
||||||
* supported by default, to remove support, just comment unrequired #define in this module
|
|
||||||
*
|
*
|
||||||
* #define SUPPORT_DEFAULT_FONT
|
* #define TEXTSPLIT_MAX_TEXT_BUFFER_LENGTH
|
||||||
* Load default raylib font on initialization to be used by DrawText() and MeasureText().
|
* TextSplit() function static buffer max size
|
||||||
* If no default font loaded, DrawTextEx() and MeasureTextEx() are required.
|
|
||||||
*
|
|
||||||
* #define TEXTSPLIT_MAX_TEXT_BUFFER_LENGTH
|
|
||||||
* TextSplit() function static buffer max size
|
|
||||||
*
|
|
||||||
* #define MAX_TEXTSPLIT_COUNT
|
|
||||||
* TextSplit() function static substrings pointers array (pointing to static buffer)
|
|
||||||
*
|
*
|
||||||
|
* #define MAX_TEXTSPLIT_COUNT
|
||||||
|
* TextSplit() function static substrings pointers array (pointing to static buffer)
|
||||||
*
|
*
|
||||||
* DEPENDENCIES:
|
* DEPENDENCIES:
|
||||||
* stb_truetype - Load TTF file and rasterize characters data
|
* stb_truetype - Load TTF file and rasterize characters data
|
||||||
|
|
|
@ -3,37 +3,36 @@
|
||||||
* rtextures - Basic functions to load and draw textures
|
* rtextures - Basic functions to load and draw textures
|
||||||
*
|
*
|
||||||
* CONFIGURATION:
|
* CONFIGURATION:
|
||||||
|
* #define SUPPORT_MODULE_RTEXTURES
|
||||||
|
* rtextures module is included in the build
|
||||||
*
|
*
|
||||||
* #define SUPPORT_MODULE_RTEXTURES
|
* #define SUPPORT_FILEFORMAT_BMP
|
||||||
* rtextures module is included in the build
|
* #define SUPPORT_FILEFORMAT_PNG
|
||||||
|
* #define SUPPORT_FILEFORMAT_TGA
|
||||||
|
* #define SUPPORT_FILEFORMAT_JPG
|
||||||
|
* #define SUPPORT_FILEFORMAT_GIF
|
||||||
|
* #define SUPPORT_FILEFORMAT_QOI
|
||||||
|
* #define SUPPORT_FILEFORMAT_PSD
|
||||||
|
* #define SUPPORT_FILEFORMAT_HDR
|
||||||
|
* #define SUPPORT_FILEFORMAT_PIC
|
||||||
|
* #define SUPPORT_FILEFORMAT_PNM
|
||||||
|
* #define SUPPORT_FILEFORMAT_DDS
|
||||||
|
* #define SUPPORT_FILEFORMAT_PKM
|
||||||
|
* #define SUPPORT_FILEFORMAT_KTX
|
||||||
|
* #define SUPPORT_FILEFORMAT_PVR
|
||||||
|
* #define SUPPORT_FILEFORMAT_ASTC
|
||||||
|
* Select desired fileformats to be supported for image data loading. Some of those formats are
|
||||||
|
* supported by default, to remove support, just comment unrequired #define in this module
|
||||||
*
|
*
|
||||||
* #define SUPPORT_FILEFORMAT_BMP
|
* #define SUPPORT_IMAGE_EXPORT
|
||||||
* #define SUPPORT_FILEFORMAT_PNG
|
* Support image export in multiple file formats
|
||||||
* #define SUPPORT_FILEFORMAT_TGA
|
|
||||||
* #define SUPPORT_FILEFORMAT_JPG
|
|
||||||
* #define SUPPORT_FILEFORMAT_GIF
|
|
||||||
* #define SUPPORT_FILEFORMAT_QOI
|
|
||||||
* #define SUPPORT_FILEFORMAT_PSD
|
|
||||||
* #define SUPPORT_FILEFORMAT_HDR
|
|
||||||
* #define SUPPORT_FILEFORMAT_PIC
|
|
||||||
* #define SUPPORT_FILEFORMAT_PNM
|
|
||||||
* #define SUPPORT_FILEFORMAT_DDS
|
|
||||||
* #define SUPPORT_FILEFORMAT_PKM
|
|
||||||
* #define SUPPORT_FILEFORMAT_KTX
|
|
||||||
* #define SUPPORT_FILEFORMAT_PVR
|
|
||||||
* #define SUPPORT_FILEFORMAT_ASTC
|
|
||||||
* Select desired fileformats to be supported for image data loading. Some of those formats are
|
|
||||||
* supported by default, to remove support, just comment unrequired #define in this module
|
|
||||||
*
|
*
|
||||||
* #define SUPPORT_IMAGE_EXPORT
|
* #define SUPPORT_IMAGE_MANIPULATION
|
||||||
* Support image export in multiple file formats
|
* Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop...
|
||||||
|
* If not defined only some image editing functions supported: ImageFormat(), ImageAlphaMask(), ImageResize*()
|
||||||
*
|
*
|
||||||
* #define SUPPORT_IMAGE_MANIPULATION
|
* #define SUPPORT_IMAGE_GENERATION
|
||||||
* Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop...
|
* Support procedural image generation functionality (gradient, spot, perlin-noise, cellular)
|
||||||
* If not defined only some image editing functions supported: ImageFormat(), ImageAlphaMask(), ImageResize*()
|
|
||||||
*
|
|
||||||
* #define SUPPORT_IMAGE_GENERATION
|
|
||||||
* Support procedural image generation functionality (gradient, spot, perlin-noise, cellular)
|
|
||||||
*
|
*
|
||||||
* DEPENDENCIES:
|
* DEPENDENCIES:
|
||||||
* stb_image - Multiple image formats loading (JPEG, PNG, BMP, TGA, PSD, GIF, PIC)
|
* stb_image - Multiple image formats loading (JPEG, PNG, BMP, TGA, PSD, GIF, PIC)
|
||||||
|
|
|
@ -3,10 +3,9 @@
|
||||||
* raylib.utils - Some common utility functions
|
* raylib.utils - Some common utility functions
|
||||||
*
|
*
|
||||||
* CONFIGURATION:
|
* CONFIGURATION:
|
||||||
*
|
* #define SUPPORT_TRACELOG
|
||||||
* #define SUPPORT_TRACELOG
|
* Show TraceLog() output messages
|
||||||
* Show TraceLog() output messages
|
* NOTE: By default LOG_DEBUG traces not shown
|
||||||
* NOTE: By default LOG_DEBUG traces not shown
|
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* LICENSE: zlib/libpng
|
* LICENSE: zlib/libpng
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue