raylib 5.0.0.5__cp313-cp313-manylinux2014_aarch64.whl → 5.5.0.3__cp313-cp313-manylinux2014_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of raylib might be problematic. Click here for more details.

raylib/raylib.h.modified CHANGED
@@ -1,22 +1,22 @@
1
1
  /**********************************************************************************************
2
2
  *
3
- * raylib v5.0 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
3
+ * raylib v5.5 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
4
4
  *
5
5
  * FEATURES:
6
6
  * - NO external dependencies, all required libraries included with raylib
7
7
  * - Multiplatform: Windows, Linux, FreeBSD, OpenBSD, NetBSD, DragonFly,
8
8
  * MacOS, Haiku, Android, Raspberry Pi, DRM native, HTML5.
9
9
  * - Written in plain C code (C99) in PascalCase/camelCase notation
10
- * - Hardware accelerated with OpenGL (1.1, 2.1, 3.3, 4.3 or ES2 - choose at compile)
10
+ * - Hardware accelerated with OpenGL (1.1, 2.1, 3.3, 4.3, ES2, ES3 - choose at compile)
11
11
  * - Unique OpenGL abstraction layer (usable as standalone module): [rlgl]
12
- * - Multiple Fonts formats supported (TTF, XNA fonts, AngelCode fonts)
12
+ * - Multiple Fonts formats supported (TTF, OTF, FNT, BDF, Sprite fonts)
13
13
  * - Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
14
14
  * - Full 3d support for 3d Shapes, Models, Billboards, Heightmaps and more!
15
15
  * - Flexible Materials system, supporting classic maps and PBR maps
16
- * - Animated 3D models supported (skeletal bones animation) (IQM)
16
+ * - Animated 3D models supported (skeletal bones animation) (IQM, M3D, GLTF)
17
17
  * - Shaders support, including Model shaders and Postprocessing shaders
18
18
  * - Powerful math module for Vector, Matrix and Quaternion operations: [raymath]
19
- * - Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
19
+ * - Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, QOA, XM, MOD)
20
20
  * - VR stereo rendering with configurable HMD device parameters
21
21
  * - Bindings to multiple programming languages available!
22
22
  *
@@ -27,29 +27,35 @@
27
27
  * - One default RenderBatch is loaded on rlglInit()->rlLoadRenderBatch() [rlgl] (OpenGL 3.3 or ES2)
28
28
  *
29
29
  * DEPENDENCIES (included):
30
- * [rcore] rglfw (Camilla Löwy - github.com/glfw/glfw) for window/context management and input (PLATFORM_DESKTOP)
31
- * [rlgl] glad (David Herberth - github.com/Dav1dde/glad) for OpenGL 3.3 extensions loading (PLATFORM_DESKTOP)
30
+ * [rcore][GLFW] rglfw (Camilla Löwy - github.com/glfw/glfw) for window/context management and input
31
+ * [rcore][RGFW] rgfw (ColleagueRiley - github.com/ColleagueRiley/RGFW) for window/context management and input
32
+ * [rlgl] glad/glad_gles2 (David Herberth - github.com/Dav1dde/glad) for OpenGL 3.3 extensions loading
32
33
  * [raudio] miniaudio (David Reid - github.com/mackron/miniaudio) for audio device/context management
33
34
  *
34
35
  * OPTIONAL DEPENDENCIES (included):
35
36
  * [rcore] msf_gif (Miles Fogle) for GIF recording
36
37
  * [rcore] sinfl (Micha Mettke) for DEFLATE decompression algorithm
37
38
  * [rcore] sdefl (Micha Mettke) for DEFLATE compression algorithm
39
+ * [rcore] rprand (Ramon Snatamaria) for pseudo-random numbers generation
40
+ * [rtextures] qoi (Dominic Szablewski - https://phoboslab.org) for QOI image manage
38
41
  * [rtextures] stb_image (Sean Barret) for images loading (BMP, TGA, PNG, JPEG, HDR...)
39
42
  * [rtextures] stb_image_write (Sean Barret) for image writing (BMP, TGA, PNG, JPG)
40
- * [rtextures] stb_image_resize (Sean Barret) for image resizing algorithms
43
+ * [rtextures] stb_image_resize2 (Sean Barret) for image resizing algorithms
44
+ * [rtextures] stb_perlin (Sean Barret) for Perlin Noise image generation
41
45
  * [rtext] stb_truetype (Sean Barret) for ttf fonts loading
42
46
  * [rtext] stb_rect_pack (Sean Barret) for rectangles packing
43
47
  * [rmodels] par_shapes (Philip Rideout) for parametric 3d shapes generation
44
48
  * [rmodels] tinyobj_loader_c (Syoyo Fujita) for models loading (OBJ, MTL)
45
49
  * [rmodels] cgltf (Johannes Kuhlmann) for models loading (glTF)
46
- * [rmodels] Model3D (bzt) for models loading (M3D, https://bztsrc.gitlab.io/model3d)
50
+ * [rmodels] m3d (bzt) for models loading (M3D, https://bztsrc.gitlab.io/model3d)
51
+ * [rmodels] vox_loader (Johann Nadalutti) for models loading (VOX)
47
52
  * [raudio] dr_wav (David Reid) for WAV audio file loading
48
53
  * [raudio] dr_flac (David Reid) for FLAC audio file loading
49
54
  * [raudio] dr_mp3 (David Reid) for MP3 audio file loading
50
55
  * [raudio] stb_vorbis (Sean Barret) for OGG audio loading
51
56
  * [raudio] jar_xm (Joshua Reisenauer) for XM audio module loading
52
57
  * [raudio] jar_mod (Joshua Reisenauer) for MOD audio module loading
58
+ * [raudio] qoa (Dominic Szablewski - https://phoboslab.org) for QOA audio manage
53
59
  *
54
60
  *
55
61
  * LICENSE: zlib/libpng
@@ -57,7 +63,7 @@
57
63
  * raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
58
64
  * BSD-like license that allows static linking with closed source software:
59
65
  *
60
- * Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
66
+ * Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
61
67
  *
62
68
  * This software is provided "as-is", without any express or implied warranty. In no event
63
69
  * will the authors be held liable for any damages arising from the use of this software.
@@ -75,8 +81,9 @@
75
81
  * 3. This notice may not be removed or altered from any source distribution.
76
82
  *
77
83
  **********************************************************************************************/
78
- // Function specifiers in case library is build/used as a shared library (Windows)
84
+ // Function specifiers in case library is build/used as a shared library
79
85
  // NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
86
+ // NOTE: visibility("default") attribute makes symbols "visible" when compiled with -fvisibility=hidden
80
87
  //----------------------------------------------------------------------------------
81
88
  // Some basic Defines
82
89
  //----------------------------------------------------------------------------------
@@ -224,8 +231,10 @@ typedef struct Mesh {
224
231
  // Animation vertex data
225
232
  float *animVertices; // Animated vertex positions (after bones transformations)
226
233
  float *animNormals; // Animated normals (after bones transformations)
227
- unsigned char *boneIds; // Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)
228
- float *boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning)
234
+ unsigned char *boneIds; // Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6)
235
+ float *boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)
236
+ Matrix *boneMatrices; // Bones animated transformation matrices
237
+ int boneCount; // Number of bones
229
238
  // OpenGL identifiers
230
239
  unsigned int vaoId; // OpenGL Vertex Array Object id
231
240
  unsigned int *vboId; // OpenGL Vertex Buffer Objects id (default vertex data)
@@ -282,7 +291,7 @@ typedef struct ModelAnimation {
282
291
  // Ray, ray for raycasting
283
292
  typedef struct Ray {
284
293
  Vector3 position; // Ray position (origin)
285
- Vector3 direction; // Ray direction
294
+ Vector3 direction; // Ray direction (normalized)
286
295
  } Ray;
287
296
  // RayCollision, ray hit information
288
297
  typedef struct RayCollision {
@@ -335,7 +344,6 @@ typedef struct VrDeviceInfo {
335
344
  int vResolution; // Vertical resolution in pixels
336
345
  float hScreenSize; // Horizontal size in meters
337
346
  float vScreenSize; // Vertical size in meters
338
- float vScreenCenter; // Screen center in meters
339
347
  float eyeToScreenDistance; // Distance between eye and display in meters
340
348
  float lensSeparationDistance; // Lens separation distance in meters
341
349
  float interpupillaryDistance; // IPD (distance between pupils) in meters
@@ -522,7 +530,7 @@ typedef enum {
522
530
  KEY_KP_EQUAL = 336, // Key: Keypad =
523
531
  // Android key buttons
524
532
  KEY_BACK = 4, // Key: Android back button
525
- KEY_MENU = 82, // Key: Android menu button
533
+ KEY_MENU = 5, // Key: Android menu button
526
534
  KEY_VOLUME_UP = 24, // Key: Android volume up button
527
535
  KEY_VOLUME_DOWN = 25 // Key: Android volume down button
528
536
  } KeyboardKey;
@@ -559,12 +567,12 @@ typedef enum {
559
567
  GAMEPAD_BUTTON_LEFT_FACE_DOWN, // Gamepad left DPAD down button
560
568
  GAMEPAD_BUTTON_LEFT_FACE_LEFT, // Gamepad left DPAD left button
561
569
  GAMEPAD_BUTTON_RIGHT_FACE_UP, // Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
562
- GAMEPAD_BUTTON_RIGHT_FACE_RIGHT, // Gamepad right button right (i.e. PS3: Square, Xbox: X)
570
+ GAMEPAD_BUTTON_RIGHT_FACE_RIGHT, // Gamepad right button right (i.e. PS3: Circle, Xbox: B)
563
571
  GAMEPAD_BUTTON_RIGHT_FACE_DOWN, // Gamepad right button down (i.e. PS3: Cross, Xbox: A)
564
- GAMEPAD_BUTTON_RIGHT_FACE_LEFT, // Gamepad right button left (i.e. PS3: Circle, Xbox: B)
572
+ GAMEPAD_BUTTON_RIGHT_FACE_LEFT, // Gamepad right button left (i.e. PS3: Square, Xbox: X)
565
573
  GAMEPAD_BUTTON_LEFT_TRIGGER_1, // Gamepad top/back trigger left (first), it could be a trailing button
566
574
  GAMEPAD_BUTTON_LEFT_TRIGGER_2, // Gamepad top/back trigger left (second), it could be a trailing button
567
- GAMEPAD_BUTTON_RIGHT_TRIGGER_1, // Gamepad top/back trigger right (one), it could be a trailing button
575
+ GAMEPAD_BUTTON_RIGHT_TRIGGER_1, // Gamepad top/back trigger right (first), it could be a trailing button
568
576
  GAMEPAD_BUTTON_RIGHT_TRIGGER_2, // Gamepad top/back trigger right (second), it could be a trailing button
569
577
  GAMEPAD_BUTTON_MIDDLE_LEFT, // Gamepad center buttons, left one (i.e. PS3: Select)
570
578
  GAMEPAD_BUTTON_MIDDLE, // Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
@@ -622,7 +630,10 @@ typedef enum {
622
630
  SHADER_LOC_MAP_CUBEMAP, // Shader location: samplerCube texture: cubemap
623
631
  SHADER_LOC_MAP_IRRADIANCE, // Shader location: samplerCube texture: irradiance
624
632
  SHADER_LOC_MAP_PREFILTER, // Shader location: samplerCube texture: prefilter
625
- SHADER_LOC_MAP_BRDF // Shader location: sampler2d texture: brdf
633
+ SHADER_LOC_MAP_BRDF, // Shader location: sampler2d texture: brdf
634
+ SHADER_LOC_VERTEX_BONEIDS, // Shader location: vertex attribute: boneIds
635
+ SHADER_LOC_VERTEX_BONEWEIGHTS, // Shader location: vertex attribute: boneWeights
636
+ SHADER_LOC_BONE_MATRICES // Shader location: array of matrices uniform: boneMatrices
626
637
  } ShaderLocationIndex;
627
638
  // Shader uniform data type
628
639
  typedef enum {
@@ -695,8 +706,7 @@ typedef enum {
695
706
  CUBEMAP_LAYOUT_LINE_VERTICAL, // Layout is defined by a vertical line with faces
696
707
  CUBEMAP_LAYOUT_LINE_HORIZONTAL, // Layout is defined by a horizontal line with faces
697
708
  CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR, // Layout is defined by a 3x4 cross with cubemap faces
698
- CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE, // Layout is defined by a 4x3 cross with cubemap faces
699
- CUBEMAP_LAYOUT_PANORAMA // Layout is defined by a panorama image (equirrectangular map)
709
+ CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE // Layout is defined by a 4x3 cross with cubemap faces
700
710
  } CubemapLayout;
701
711
  // Font type, defines generation method
702
712
  typedef enum {
@@ -732,11 +742,11 @@ typedef enum {
732
742
  } Gesture;
733
743
  // Camera system modes
734
744
  typedef enum {
735
- CAMERA_CUSTOM = 0, // Custom camera
736
- CAMERA_FREE, // Free camera
737
- CAMERA_ORBITAL, // Orbital camera
738
- CAMERA_FIRST_PERSON, // First person camera
739
- CAMERA_THIRD_PERSON // Third person camera
745
+ CAMERA_CUSTOM = 0, // Camera custom, controlled by user (UpdateCamera() does nothing)
746
+ CAMERA_FREE, // Camera free mode
747
+ CAMERA_ORBITAL, // Camera orbital, around target, zoom supported
748
+ CAMERA_FIRST_PERSON, // Camera first person
749
+ CAMERA_THIRD_PERSON // Camera third person
740
750
  } CameraMode;
741
751
  // Camera projection
742
752
  typedef enum {
@@ -750,7 +760,7 @@ typedef enum {
750
760
  NPATCH_THREE_PATCH_HORIZONTAL // Npatch layout: 3x1 tiles
751
761
  } NPatchLayout;
752
762
  // Callbacks to hook some internal functions
753
- // WARNING: These callbacks are intended for advance users
763
+ // WARNING: These callbacks are intended for advanced users
754
764
  typedef void (*TraceLogCallback)(int logLevel, const char *text, void * args); // Logging: Redirect trace log messages
755
765
  typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, int *dataSize); // FileIO: Load binary data
756
766
  typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, int dataSize); // FileIO: Save binary data
@@ -769,36 +779,36 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
769
779
  bool WindowShouldClose(void); // Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)
770
780
  bool IsWindowReady(void); // Check if window has been initialized successfully
771
781
  bool IsWindowFullscreen(void); // Check if window is currently fullscreen
772
- bool IsWindowHidden(void); // Check if window is currently hidden (only PLATFORM_DESKTOP)
773
- bool IsWindowMinimized(void); // Check if window is currently minimized (only PLATFORM_DESKTOP)
774
- bool IsWindowMaximized(void); // Check if window is currently maximized (only PLATFORM_DESKTOP)
775
- bool IsWindowFocused(void); // Check if window is currently focused (only PLATFORM_DESKTOP)
782
+ bool IsWindowHidden(void); // Check if window is currently hidden
783
+ bool IsWindowMinimized(void); // Check if window is currently minimized
784
+ bool IsWindowMaximized(void); // Check if window is currently maximized
785
+ bool IsWindowFocused(void); // Check if window is currently focused
776
786
  bool IsWindowResized(void); // Check if window has been resized last frame
777
787
  bool IsWindowState(unsigned int flag); // Check if one specific window flag is enabled
778
- void SetWindowState(unsigned int flags); // Set window configuration state using flags (only PLATFORM_DESKTOP)
788
+ void SetWindowState(unsigned int flags); // Set window configuration state using flags
779
789
  void ClearWindowState(unsigned int flags); // Clear window configuration state flags
780
- void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
781
- void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed (only PLATFORM_DESKTOP)
782
- void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
783
- void MinimizeWindow(void); // Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
784
- void RestoreWindow(void); // Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
785
- void SetWindowIcon(Image image); // Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
786
- void SetWindowIcons(Image *images, int count); // Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
787
- void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)
788
- void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
790
+ void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed, resizes monitor to match window resolution
791
+ void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed, resizes window to match monitor resolution
792
+ void MaximizeWindow(void); // Set window state: maximized, if resizable
793
+ void MinimizeWindow(void); // Set window state: minimized, if resizable
794
+ void RestoreWindow(void); // Set window state: not minimized/maximized
795
+ void SetWindowIcon(Image image); // Set icon for window (single image, RGBA 32bit)
796
+ void SetWindowIcons(Image *images, int count); // Set icon for window (multiple images, RGBA 32bit)
797
+ void SetWindowTitle(const char *title); // Set title for window
798
+ void SetWindowPosition(int x, int y); // Set window position on screen
789
799
  void SetWindowMonitor(int monitor); // Set monitor for the current window
790
800
  void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
791
801
  void SetWindowMaxSize(int width, int height); // Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)
792
802
  void SetWindowSize(int width, int height); // Set window dimensions
793
- void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
794
- void SetWindowFocused(void); // Set window focused (only PLATFORM_DESKTOP)
803
+ void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f]
804
+ void SetWindowFocused(void); // Set window focused
795
805
  void *GetWindowHandle(void); // Get native window handle
796
806
  int GetScreenWidth(void); // Get current screen width
797
807
  int GetScreenHeight(void); // Get current screen height
798
808
  int GetRenderWidth(void); // Get current render width (it considers HiDPI)
799
809
  int GetRenderHeight(void); // Get current render height (it considers HiDPI)
800
810
  int GetMonitorCount(void); // Get number of connected monitors
801
- int GetCurrentMonitor(void); // Get current connected monitor
811
+ int GetCurrentMonitor(void); // Get current monitor where window is placed
802
812
  Vector2 GetMonitorPosition(int monitor); // Get specified monitor position
803
813
  int GetMonitorWidth(int monitor); // Get specified monitor width (current video mode used by monitor)
804
814
  int GetMonitorHeight(int monitor); // Get specified monitor height (current video mode used by monitor)
@@ -810,6 +820,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
810
820
  const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the specified monitor
811
821
  void SetClipboardText(const char *text); // Set clipboard text content
812
822
  const char *GetClipboardText(void); // Get clipboard text content
823
+ Image GetClipboardImage(void); // Get clipboard image content
813
824
  void EnableEventWaiting(void); // Enable waiting for events on EndDrawing(), no automatic event polling
814
825
  void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling
815
826
  // Cursor-related functions
@@ -844,7 +855,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
844
855
  // NOTE: Shader functionality is not available on OpenGL 1.1
845
856
  Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations
846
857
  Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations
847
- bool IsShaderReady(Shader shader); // Check if a shader is ready
858
+ bool IsShaderValid(Shader shader); // Check if a shader is valid (loaded on GPU)
848
859
  int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
849
860
  int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
850
861
  void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value
@@ -853,20 +864,21 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
853
864
  void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value for texture (sampler2d)
854
865
  void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM)
855
866
  // Screen-space-related functions
856
- Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Get a ray trace from mouse position
857
- Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
858
- Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
867
+ Ray GetScreenToWorldRay(Vector2 position, Camera camera); // Get a ray trace from screen position (i.e mouse)
868
+ Ray GetScreenToWorldRayEx(Vector2 position, Camera camera, int width, int height); // Get a ray trace from screen position (i.e mouse) in a viewport
859
869
  Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Get the screen space position for a 3d world space position
860
- Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
861
870
  Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Get size position for a 3d world space position
862
871
  Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get the screen space position for a 2d camera world space position
872
+ Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
873
+ Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
874
+ Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
863
875
  // Timing-related functions
864
876
  void SetTargetFPS(int fps); // Set target FPS (maximum)
865
877
  float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time)
866
878
  double GetTime(void); // Get elapsed time in seconds since InitWindow()
867
879
  int GetFPS(void); // Get current FPS
868
880
  // Custom frame control functions
869
- // NOTE: Those functions are intended for advance users that want full control over the frame processing
881
+ // NOTE: Those functions are intended for advanced users that want full control over the frame processing
870
882
  // By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents()
871
883
  // To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
872
884
  void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
@@ -889,7 +901,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
889
901
  void *MemRealloc(void *ptr, unsigned int size); // Internal memory reallocator
890
902
  void MemFree(void *ptr); // Internal memory free
891
903
  // Set custom callbacks
892
- // WARNING: Callbacks setup is intended for advance users
904
+ // WARNING: Callbacks setup is intended for advanced users
893
905
  void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log
894
906
  void SetLoadFileDataCallback(LoadFileDataCallback callback); // Set custom file binary data loader
895
907
  void SetSaveFileDataCallback(SaveFileDataCallback callback); // Set custom file binary data saver
@@ -916,10 +928,12 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
916
928
  const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
917
929
  const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
918
930
  const char *GetApplicationDirectory(void); // Get the directory of the running application (uses static string)
931
+ int MakeDirectory(const char *dirPath); // Create directories (including full path requested), returns 0 on success
919
932
  bool ChangeDirectory(const char *dir); // Change working directory, return true on success
920
933
  bool IsPathFile(const char *path); // Check if a given path is a file or a directory
934
+ bool IsFileNameValid(const char *fileName); // Check if fileName is valid for the platform/OS
921
935
  FilePathList LoadDirectoryFiles(const char *dirPath); // Load directory filepaths
922
- FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and recursive directory scan
936
+ FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result
923
937
  void UnloadDirectoryFiles(FilePathList files); // Unload filepaths
924
938
  bool IsFileDropped(void); // Check if a file has been dropped into window
925
939
  FilePathList LoadDroppedFiles(void); // Load dropped filepaths
@@ -930,9 +944,12 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
930
944
  unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // Decompress data (DEFLATE algorithm), memory must be MemFree()
931
945
  char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string, memory must be MemFree()
932
946
  unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize); // Decode Base64 string data, memory must be MemFree()
947
+ unsigned int ComputeCRC32(unsigned char *data, int dataSize); // Compute CRC32 hash code
948
+ unsigned int *ComputeMD5(unsigned char *data, int dataSize); // Compute MD5 hash code, returns static int[4] (16 bytes)
949
+ unsigned int *ComputeSHA1(unsigned char *data, int dataSize); // Compute SHA1 hash code, returns static int[5] (20 bytes)
933
950
  // Automation events functionality
934
951
  AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
935
- void UnloadAutomationEventList(AutomationEventList *list); // Unload automation events list from file
952
+ void UnloadAutomationEventList(AutomationEventList list); // Unload automation events list from file
936
953
  bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file
937
954
  void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to
938
955
  void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording
@@ -944,7 +961,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
944
961
  //------------------------------------------------------------------------------------
945
962
  // Input-related functions: keyboard
946
963
  bool IsKeyPressed(int key); // Check if a key has been pressed once
947
- bool IsKeyPressedRepeat(int key); // Check if a key has been pressed again (Only PLATFORM_DESKTOP)
964
+ bool IsKeyPressedRepeat(int key); // Check if a key has been pressed again
948
965
  bool IsKeyDown(int key); // Check if a key is being pressed
949
966
  bool IsKeyReleased(int key); // Check if a key has been released once
950
967
  bool IsKeyUp(int key); // Check if a key is NOT being pressed
@@ -962,6 +979,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
962
979
  int GetGamepadAxisCount(int gamepad); // Get gamepad axis count for a gamepad
963
980
  float GetGamepadAxisMovement(int gamepad, int axis); // Get axis movement value for a gamepad axis
964
981
  int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB)
982
+ void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration); // Set gamepad vibration for both motors (duration in seconds)
965
983
  // Input-related functions: mouse
966
984
  bool IsMouseButtonPressed(int button); // Check if a mouse button has been pressed once
967
985
  bool IsMouseButtonDown(int button); // Check if a mouse button is being pressed
@@ -989,7 +1007,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
989
1007
  void SetGesturesEnabled(unsigned int flags); // Enable a set of gestures using flags
990
1008
  bool IsGestureDetected(unsigned int gesture); // Check if a gesture have been detected
991
1009
  int GetGestureDetected(void); // Get latest detected gesture
992
- float GetGestureHoldDuration(void); // Get gesture hold time in milliseconds
1010
+ float GetGestureHoldDuration(void); // Get gesture hold time in seconds
993
1011
  Vector2 GetGestureDragVector(void); // Get gesture drag vector
994
1012
  float GetGestureDragAngle(void); // Get gesture drag angle
995
1013
  Vector2 GetGesturePinchVector(void); // Get gesture pinch delta
@@ -1006,18 +1024,20 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1006
1024
  // NOTE: It can be useful when using basic shapes and one single font,
1007
1025
  // defining a font char white rectangle would allow drawing everything in a single draw call
1008
1026
  void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing
1027
+ Texture2D GetShapesTexture(void); // Get texture that is used for shapes drawing
1028
+ Rectangle GetShapesTextureRectangle(void); // Get texture source rectangle that is used for shapes drawing
1009
1029
  // Basic shapes drawing functions
1010
- void DrawPixel(int posX, int posY, Color color); // Draw a pixel
1011
- void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version)
1030
+ void DrawPixel(int posX, int posY, Color color); // Draw a pixel using geometry [Can be slow, use with care]
1031
+ void DrawPixelV(Vector2 position, Color color); // Draw a pixel using geometry (Vector version) [Can be slow, use with care]
1012
1032
  void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line
1013
1033
  void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (using gl lines)
1014
1034
  void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line (using triangles/quads)
1015
- void DrawLineStrip(Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
1035
+ void DrawLineStrip(const Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
1016
1036
  void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation
1017
1037
  void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
1018
1038
  void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
1019
1039
  void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
1020
- void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
1040
+ void DrawCircleGradient(int centerX, int centerY, float radius, Color inner, Color outer); // Draw a gradient-filled circle
1021
1041
  void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
1022
1042
  void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
1023
1043
  void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version)
@@ -1029,26 +1049,27 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1029
1049
  void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
1030
1050
  void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
1031
1051
  void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
1032
- void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rectangle
1033
- void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rectangle
1034
- void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors
1052
+ void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); // Draw a vertical-gradient-filled rectangle
1053
+ void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); // Draw a horizontal-gradient-filled rectangle
1054
+ void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color topRight, Color bottomRight); // Draw a gradient-filled rectangle with custom vertex colors
1035
1055
  void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
1036
1056
  void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters
1037
1057
  void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
1038
- void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
1058
+ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle lines with rounded edges
1059
+ void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
1039
1060
  void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
1040
1061
  void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!)
1041
- void DrawTriangleFan(Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
1042
- void DrawTriangleStrip(Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
1062
+ void DrawTriangleFan(const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
1063
+ void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
1043
1064
  void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
1044
1065
  void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
1045
1066
  void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters
1046
1067
  // Splines drawing functions
1047
- void DrawSplineLinear(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
1048
- void DrawSplineBasis(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
1049
- void DrawSplineCatmullRom(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
1050
- void DrawSplineBezierQuadratic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
1051
- void DrawSplineBezierCubic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
1068
+ void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
1069
+ void DrawSplineBasis(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
1070
+ void DrawSplineCatmullRom(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
1071
+ void DrawSplineBezierQuadratic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
1072
+ void DrawSplineBezierCubic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
1052
1073
  void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); // Draw spline segment: Linear, 2 points
1053
1074
  void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: B-Spline, 4 points
1054
1075
  void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: Catmull-Rom, 4 points
@@ -1064,12 +1085,13 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1064
1085
  bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles
1065
1086
  bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles
1066
1087
  bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec); // Check collision between circle and rectangle
1088
+ bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2); // Check if circle collides with a line created betweeen two points [p1] and [p2]
1067
1089
  bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle
1068
1090
  bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle
1069
1091
  bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle
1070
- bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices
1071
- bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference
1072
1092
  bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
1093
+ bool CheckCollisionPointPoly(Vector2 point, const Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices
1094
+ bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference
1073
1095
  Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision
1074
1096
  //------------------------------------------------------------------------------------
1075
1097
  // Texture Loading and Drawing Functions (Module: textures)
@@ -1078,12 +1100,12 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1078
1100
  // NOTE: These functions do not require GPU access
1079
1101
  Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
1080
1102
  Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
1081
- Image LoadImageSvg(const char *fileNameOrString, int width, int height); // Load image from SVG file data or string with specified size
1082
1103
  Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data)
1104
+ Image LoadImageAnimFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int *frames); // Load image sequence from memory buffer
1083
1105
  Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. '.png'
1084
1106
  Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data
1085
1107
  Image LoadImageFromScreen(void); // Load image from screen buffer and (screenshot)
1086
- bool IsImageReady(Image image); // Check if an image is ready
1108
+ bool IsImageValid(Image image); // Check if an image is valid (data and parameters)
1087
1109
  void UnloadImage(Image image); // Unload image from CPU memory (RAM)
1088
1110
  bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success
1089
1111
  unsigned char *ExportImageToMemory(Image image, const char *fileType, int *fileSize); // Export image to memory buffer
@@ -1101,6 +1123,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1101
1123
  // Image manipulation functions
1102
1124
  Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
1103
1125
  Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
1126
+ Image ImageFromChannel(Image image, int selectedChannel); // Create an image from a selected channel of another image (GRAYSCALE)
1104
1127
  Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
1105
1128
  Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
1106
1129
  void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
@@ -1111,6 +1134,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1111
1134
  void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
1112
1135
  void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
1113
1136
  void ImageBlurGaussian(Image *image, int blurSize); // Apply Gaussian blur using a box blur approximation
1137
+ void ImageKernelConvolution(Image *image, const float *kernel, int kernelSize); // Apply custom square convolution kernel to image
1114
1138
  void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
1115
1139
  void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
1116
1140
  void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
@@ -1140,6 +1164,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1140
1164
  void ImageDrawPixelV(Image *dst, Vector2 position, Color color); // Draw pixel within an image (Vector version)
1141
1165
  void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw line within an image
1142
1166
  void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); // Draw line within an image (Vector version)
1167
+ void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color color); // Draw a line defining thickness within an image
1143
1168
  void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw a filled circle within an image
1144
1169
  void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version)
1145
1170
  void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image
@@ -1148,6 +1173,11 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1148
1173
  void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
1149
1174
  void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
1150
1175
  void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
1176
+ void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image
1177
+ void ImageDrawTriangleEx(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image
1178
+ void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image
1179
+ void ImageDrawTriangleFan(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center)
1180
+ void ImageDrawTriangleStrip(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image
1151
1181
  void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source)
1152
1182
  void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination)
1153
1183
  void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination)
@@ -1157,9 +1187,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1157
1187
  Texture2D LoadTextureFromImage(Image image); // Load texture from image data
1158
1188
  TextureCubemap LoadTextureCubemap(Image image, int layout); // Load cubemap from image, multiple image cubemap layouts supported
1159
1189
  RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer)
1160
- bool IsTextureReady(Texture2D texture); // Check if a texture is ready
1190
+ bool IsTextureValid(Texture2D texture); // Check if a texture is valid (loaded in GPU)
1161
1191
  void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
1162
- bool IsRenderTextureReady(RenderTexture2D target); // Check if a render texture is ready
1192
+ bool IsRenderTextureValid(RenderTexture2D target); // Check if a render texture is valid (loaded in GPU)
1163
1193
  void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
1164
1194
  void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
1165
1195
  void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data
@@ -1175,8 +1205,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1175
1205
  void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
1176
1206
  void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
1177
1207
  // Color/pixel related functions
1208
+ bool ColorIsEqual(Color col1, Color col2); // Check if two colors are equal
1178
1209
  Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
1179
- int ColorToInt(Color color); // Get hexadecimal value for a Color
1210
+ int ColorToInt(Color color); // Get hexadecimal value for a Color (0xRRGGBBAA)
1180
1211
  Vector4 ColorNormalize(Color color); // Get Color normalized as float [0..1]
1181
1212
  Color ColorFromNormalized(Vector4 normalized); // Get Color from normalized values [0..1]
1182
1213
  Vector3 ColorToHSV(Color color); // Get HSV values for a Color, hue [0..360], saturation/value [0..1]
@@ -1186,6 +1217,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1186
1217
  Color ColorContrast(Color color, float contrast); // Get color with contrast correction, contrast values between -1.0f and 1.0f
1187
1218
  Color ColorAlpha(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
1188
1219
  Color ColorAlphaBlend(Color dst, Color src, Color tint); // Get src alpha-blended into dst color with tint
1220
+ Color ColorLerp(Color color1, Color color2, float factor); // Get color lerp interpolation between two colors, factor [0.0f..1.0f]
1189
1221
  Color GetColor(unsigned int hexValue); // Get Color structure from hexadecimal value
1190
1222
  Color GetPixelColor(void *srcPtr, int format); // Get Color from a source pixel pointer of certain format
1191
1223
  void SetPixelColor(void *dstPtr, Color color, int format); // Set color formatted into destination pixel pointer
@@ -1196,10 +1228,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1196
1228
  // Font loading/unloading functions
1197
1229
  Font GetFontDefault(void); // Get the default Font
1198
1230
  Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
1199
- Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set
1231
+ Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height
1200
1232
  Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
1201
1233
  Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
1202
- bool IsFontReady(Font font); // Check if a font is ready
1234
+ bool IsFontValid(Font font); // Check if a font is valid (font data loaded, WARNING: GPU texture not checked)
1203
1235
  GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use
1204
1236
  Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
1205
1237
  void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM)
@@ -1236,7 +1268,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1236
1268
  unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
1237
1269
  const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf() style)
1238
1270
  const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string
1239
- char *TextReplace(char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!)
1271
+ char *TextReplace(const char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!)
1240
1272
  char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (WARNING: memory must be freed!)
1241
1273
  const char *TextJoin(const char **textList, int count, const char *delimiter); // Join text strings with delimiter
1242
1274
  const char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings
@@ -1245,7 +1277,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1245
1277
  const char *TextToUpper(const char *text); // Get upper case version of provided string
1246
1278
  const char *TextToLower(const char *text); // Get lower case version of provided string
1247
1279
  const char *TextToPascal(const char *text); // Get Pascal case notation version of provided string
1280
+ const char *TextToSnake(const char *text); // Get Snake case notation version of provided string
1281
+ const char *TextToCamel(const char *text); // Get Camel case notation version of provided string
1248
1282
  int TextToInteger(const char *text); // Get integer value from text (negative values not supported)
1283
+ float TextToFloat(const char *text); // Get float value from text (negative values not supported)
1249
1284
  //------------------------------------------------------------------------------------
1250
1285
  // Basic 3d Shapes Drawing Functions (Module: models)
1251
1286
  //------------------------------------------------------------------------------------
@@ -1254,7 +1289,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1254
1289
  void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
1255
1290
  void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
1256
1291
  void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
1257
- void DrawTriangleStrip3D(Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
1292
+ void DrawTriangleStrip3D(const Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
1258
1293
  void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
1259
1294
  void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
1260
1295
  void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires
@@ -1277,7 +1312,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1277
1312
  // Model management functions
1278
1313
  Model LoadModel(const char *fileName); // Load model from files (meshes and materials)
1279
1314
  Model LoadModelFromMesh(Mesh mesh); // Load model from generated mesh (default material)
1280
- bool IsModelReady(Model model); // Check if a model is ready
1315
+ bool IsModelValid(Model model); // Check if a model is valid (loaded in GPU, VAO/VBOs)
1281
1316
  void UnloadModel(Model model); // Unload model (including meshes) from memory (RAM and/or VRAM)
1282
1317
  BoundingBox GetModelBoundingBox(Model model); // Compute model bounding box limits (considers all meshes)
1283
1318
  // Model drawing functions
@@ -1285,8 +1320,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1285
1320
  void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters
1286
1321
  void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set)
1287
1322
  void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters
1323
+ void DrawModelPoints(Model model, Vector3 position, float scale, Color tint); // Draw a model as points
1324
+ void DrawModelPointsEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model as points with extended parameters
1288
1325
  void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires)
1289
- void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint); // Draw a billboard texture
1326
+ void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a billboard texture
1290
1327
  void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
1291
1328
  void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation
1292
1329
  // Mesh management functions
@@ -1295,9 +1332,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1295
1332
  void UnloadMesh(Mesh mesh); // Unload mesh data from CPU and GPU
1296
1333
  void DrawMesh(Mesh mesh, Material material, Matrix transform); // Draw a 3d mesh with material and transform
1297
1334
  void DrawMeshInstanced(Mesh mesh, Material material, const Matrix *transforms, int instances); // Draw multiple mesh instances with material and different transforms
1298
- bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success
1299
1335
  BoundingBox GetMeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits
1300
1336
  void GenMeshTangents(Mesh *mesh); // Compute mesh tangents
1337
+ bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success
1338
+ bool ExportMeshAsCode(Mesh mesh, const char *fileName); // Export mesh as code file (.h) defining multiple arrays of vertex attributes
1301
1339
  // Mesh generation functions
1302
1340
  Mesh GenMeshPoly(int sides, float radius); // Generate polygonal mesh
1303
1341
  Mesh GenMeshPlane(float width, float length, int resX, int resZ); // Generate plane mesh (with subdivisions)
@@ -1313,13 +1351,14 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1313
1351
  // Material loading/unloading functions
1314
1352
  Material *LoadMaterials(const char *fileName, int *materialCount); // Load materials from model file
1315
1353
  Material LoadMaterialDefault(void); // Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
1316
- bool IsMaterialReady(Material material); // Check if a material is ready
1354
+ bool IsMaterialValid(Material material); // Check if a material is valid (shader assigned, map textures loaded in GPU)
1317
1355
  void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM)
1318
1356
  void SetMaterialTexture(Material *material, int mapType, Texture2D texture); // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
1319
1357
  void SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh
1320
1358
  // Model animations loading/unloading functions
1321
1359
  ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file
1322
- void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose
1360
+ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose (CPU)
1361
+ void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame); // Update model animation mesh bone matrices (GPU skinning)
1323
1362
  void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
1324
1363
  void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data
1325
1364
  bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
@@ -1345,11 +1384,11 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
1345
1384
  // Wave/Sound loading/unloading functions
1346
1385
  Wave LoadWave(const char *fileName); // Load wave data from file
1347
1386
  Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
1348
- bool IsWaveReady(Wave wave); // Checks if wave data is ready
1387
+ bool IsWaveValid(Wave wave); // Checks if wave data is valid (data loaded and parameters)
1349
1388
  Sound LoadSound(const char *fileName); // Load sound from file
1350
1389
  Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
1351
1390
  Sound LoadSoundAlias(Sound source); // Create a new sound that shares the same sample data as the source sound, does not own the sound data
1352
- bool IsSoundReady(Sound sound); // Checks if a sound is ready
1391
+ bool IsSoundValid(Sound sound); // Checks if a sound is valid (data loaded and buffers initialized)
1353
1392
  void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data
1354
1393
  void UnloadWave(Wave wave); // Unload wave data
1355
1394
  void UnloadSound(Sound sound); // Unload sound
@@ -1366,14 +1405,14 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
1366
1405
  void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
1367
1406
  void SetSoundPan(Sound sound, float pan); // Set pan for a sound (0.5 is center)
1368
1407
  Wave WaveCopy(Wave wave); // Copy a wave to a new wave
1369
- void WaveCrop(Wave *wave, int initSample, int finalSample); // Crop a wave to defined samples range
1408
+ void WaveCrop(Wave *wave, int initFrame, int finalFrame); // Crop a wave to defined frames range
1370
1409
  void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format
1371
1410
  float *LoadWaveSamples(Wave wave); // Load samples data from wave as a 32bit float data array
1372
1411
  void UnloadWaveSamples(float *samples); // Unload samples data loaded with LoadWaveSamples()
1373
1412
  // Music management functions
1374
1413
  Music LoadMusicStream(const char *fileName); // Load music stream from file
1375
1414
  Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data, int dataSize); // Load music stream from data
1376
- bool IsMusicReady(Music music); // Checks if a music stream is ready
1415
+ bool IsMusicValid(Music music); // Checks if a music stream is valid (context and buffers initialized)
1377
1416
  void UnloadMusicStream(Music music); // Unload music stream
1378
1417
  void PlayMusicStream(Music music); // Start music playing
1379
1418
  bool IsMusicStreamPlaying(Music music); // Check if music is playing
@@ -1389,7 +1428,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
1389
1428
  float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
1390
1429
  // AudioStream management functions
1391
1430
  AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Load audio stream (to stream raw audio pcm data)
1392
- bool IsAudioStreamReady(AudioStream stream); // Checks if an audio stream is ready
1431
+ bool IsAudioStreamValid(AudioStream stream); // Checks if an audio stream is valid (buffers initialized)
1393
1432
  void UnloadAudioStream(AudioStream stream); // Unload audio stream and free memory
1394
1433
  void UpdateAudioStream(AudioStream stream, const void *data, int frameCount); // Update audio stream buffers with data
1395
1434
  bool IsAudioStreamProcessed(AudioStream stream); // Check if any audio stream buffers requires refill
@@ -1403,7 +1442,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
1403
1442
  void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (0.5 is centered)
1404
1443
  void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
1405
1444
  void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data
1406
- void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as <float>s
1445
+ void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as 'float'
1407
1446
  void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream
1408
- void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s
1447
+ void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'
1409
1448
  void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline