raylib 5.0.0.4__cp311-cp311-manylinux2014_x86_64.whl → 5.5.0.0.dev3__cp311-cp311-manylinux2014_x86_64.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.
- pyray/__init__.pyi +298 -97
- raylib/__init__.py +2 -8
- raylib/__init__.pyi +295 -90
- raylib/_raylib_cffi.cpython-311-x86_64-linux-gnu.so +0 -0
- raylib/build.py +43 -13
- raylib/defines.py +27 -5
- raylib/enums.py +16 -10
- raylib/glfw3.h.modified +226 -110
- raylib/raygui.h.modified +53 -31
- raylib/raylib.h.modified +97 -65
- raylib/raymath.h.modified +36 -8
- raylib/rlgl.h.modified +49 -32
- raylib/version.py +1 -1
- {raylib-5.0.0.4.dist-info → raylib-5.5.0.0.dev3.dist-info}/METADATA +74 -30
- raylib-5.5.0.0.dev3.dist-info/RECORD +21 -0
- raylib-5.0.0.4.dist-info/RECORD +0 -21
- {raylib-5.0.0.4.dist-info → raylib-5.5.0.0.dev3.dist-info}/LICENSE +0 -0
- {raylib-5.0.0.4.dist-info → raylib-5.5.0.0.dev3.dist-info}/WHEEL +0 -0
- {raylib-5.0.0.4.dist-info → raylib-5.5.0.0.dev3.dist-info}/top_level.txt +0 -0
raylib/raylib.h.modified
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**********************************************************************************************
|
|
2
2
|
*
|
|
3
|
-
* raylib v5.
|
|
3
|
+
* raylib v5.5-dev - 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
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
58
58
|
* BSD-like license that allows static linking with closed source software:
|
|
59
59
|
*
|
|
60
|
-
* Copyright (c) 2013-
|
|
60
|
+
* Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
|
|
61
61
|
*
|
|
62
62
|
* This software is provided "as-is", without any express or implied warranty. In no event
|
|
63
63
|
* will the authors be held liable for any damages arising from the use of this software.
|
|
@@ -75,8 +75,9 @@
|
|
|
75
75
|
* 3. This notice may not be removed or altered from any source distribution.
|
|
76
76
|
*
|
|
77
77
|
**********************************************************************************************/
|
|
78
|
-
// Function specifiers in case library is build/used as a shared library
|
|
78
|
+
// Function specifiers in case library is build/used as a shared library
|
|
79
79
|
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
|
|
80
|
+
// NOTE: visibility("default") attribute makes symbols "visible" when compiled with -fvisibility=hidden
|
|
80
81
|
//----------------------------------------------------------------------------------
|
|
81
82
|
// Some basic Defines
|
|
82
83
|
//----------------------------------------------------------------------------------
|
|
@@ -224,8 +225,10 @@ typedef struct Mesh {
|
|
|
224
225
|
// Animation vertex data
|
|
225
226
|
float *animVertices; // Animated vertex positions (after bones transformations)
|
|
226
227
|
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)
|
|
228
|
+
unsigned char *boneIds; // Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6)
|
|
229
|
+
float *boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)
|
|
230
|
+
Matrix *boneMatrices; // Bones animated transformation matrices
|
|
231
|
+
int boneCount; // Number of bones
|
|
229
232
|
// OpenGL identifiers
|
|
230
233
|
unsigned int vaoId; // OpenGL Vertex Array Object id
|
|
231
234
|
unsigned int *vboId; // OpenGL Vertex Buffer Objects id (default vertex data)
|
|
@@ -282,7 +285,7 @@ typedef struct ModelAnimation {
|
|
|
282
285
|
// Ray, ray for raycasting
|
|
283
286
|
typedef struct Ray {
|
|
284
287
|
Vector3 position; // Ray position (origin)
|
|
285
|
-
Vector3 direction; // Ray direction
|
|
288
|
+
Vector3 direction; // Ray direction (normalized)
|
|
286
289
|
} Ray;
|
|
287
290
|
// RayCollision, ray hit information
|
|
288
291
|
typedef struct RayCollision {
|
|
@@ -335,7 +338,6 @@ typedef struct VrDeviceInfo {
|
|
|
335
338
|
int vResolution; // Vertical resolution in pixels
|
|
336
339
|
float hScreenSize; // Horizontal size in meters
|
|
337
340
|
float vScreenSize; // Vertical size in meters
|
|
338
|
-
float vScreenCenter; // Screen center in meters
|
|
339
341
|
float eyeToScreenDistance; // Distance between eye and display in meters
|
|
340
342
|
float lensSeparationDistance; // Lens separation distance in meters
|
|
341
343
|
float interpupillaryDistance; // IPD (distance between pupils) in meters
|
|
@@ -522,7 +524,7 @@ typedef enum {
|
|
|
522
524
|
KEY_KP_EQUAL = 336, // Key: Keypad =
|
|
523
525
|
// Android key buttons
|
|
524
526
|
KEY_BACK = 4, // Key: Android back button
|
|
525
|
-
KEY_MENU =
|
|
527
|
+
KEY_MENU = 5, // Key: Android menu button
|
|
526
528
|
KEY_VOLUME_UP = 24, // Key: Android volume up button
|
|
527
529
|
KEY_VOLUME_DOWN = 25 // Key: Android volume down button
|
|
528
530
|
} KeyboardKey;
|
|
@@ -559,12 +561,12 @@ typedef enum {
|
|
|
559
561
|
GAMEPAD_BUTTON_LEFT_FACE_DOWN, // Gamepad left DPAD down button
|
|
560
562
|
GAMEPAD_BUTTON_LEFT_FACE_LEFT, // Gamepad left DPAD left button
|
|
561
563
|
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:
|
|
564
|
+
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT, // Gamepad right button right (i.e. PS3: Circle, Xbox: B)
|
|
563
565
|
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:
|
|
566
|
+
GAMEPAD_BUTTON_RIGHT_FACE_LEFT, // Gamepad right button left (i.e. PS3: Square, Xbox: X)
|
|
565
567
|
GAMEPAD_BUTTON_LEFT_TRIGGER_1, // Gamepad top/back trigger left (first), it could be a trailing button
|
|
566
568
|
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 (
|
|
569
|
+
GAMEPAD_BUTTON_RIGHT_TRIGGER_1, // Gamepad top/back trigger right (first), it could be a trailing button
|
|
568
570
|
GAMEPAD_BUTTON_RIGHT_TRIGGER_2, // Gamepad top/back trigger right (second), it could be a trailing button
|
|
569
571
|
GAMEPAD_BUTTON_MIDDLE_LEFT, // Gamepad center buttons, left one (i.e. PS3: Select)
|
|
570
572
|
GAMEPAD_BUTTON_MIDDLE, // Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
|
|
@@ -622,7 +624,10 @@ typedef enum {
|
|
|
622
624
|
SHADER_LOC_MAP_CUBEMAP, // Shader location: samplerCube texture: cubemap
|
|
623
625
|
SHADER_LOC_MAP_IRRADIANCE, // Shader location: samplerCube texture: irradiance
|
|
624
626
|
SHADER_LOC_MAP_PREFILTER, // Shader location: samplerCube texture: prefilter
|
|
625
|
-
SHADER_LOC_MAP_BRDF // Shader location: sampler2d texture: brdf
|
|
627
|
+
SHADER_LOC_MAP_BRDF, // Shader location: sampler2d texture: brdf
|
|
628
|
+
SHADER_LOC_VERTEX_BONEIDS, // Shader location: vertex attribute: boneIds
|
|
629
|
+
SHADER_LOC_VERTEX_BONEWEIGHTS, // Shader location: vertex attribute: boneWeights
|
|
630
|
+
SHADER_LOC_BONE_MATRICES // Shader location: array of matrices uniform: boneMatrices
|
|
626
631
|
} ShaderLocationIndex;
|
|
627
632
|
// Shader uniform data type
|
|
628
633
|
typedef enum {
|
|
@@ -732,11 +737,11 @@ typedef enum {
|
|
|
732
737
|
} Gesture;
|
|
733
738
|
// Camera system modes
|
|
734
739
|
typedef enum {
|
|
735
|
-
CAMERA_CUSTOM = 0, //
|
|
736
|
-
CAMERA_FREE, //
|
|
737
|
-
CAMERA_ORBITAL, //
|
|
738
|
-
CAMERA_FIRST_PERSON, //
|
|
739
|
-
CAMERA_THIRD_PERSON //
|
|
740
|
+
CAMERA_CUSTOM = 0, // Camera custom, controlled by user (UpdateCamera() does nothing)
|
|
741
|
+
CAMERA_FREE, // Camera free mode
|
|
742
|
+
CAMERA_ORBITAL, // Camera orbital, around target, zoom supported
|
|
743
|
+
CAMERA_FIRST_PERSON, // Camera first person
|
|
744
|
+
CAMERA_THIRD_PERSON // Camera third person
|
|
740
745
|
} CameraMode;
|
|
741
746
|
// Camera projection
|
|
742
747
|
typedef enum {
|
|
@@ -750,7 +755,7 @@ typedef enum {
|
|
|
750
755
|
NPATCH_THREE_PATCH_HORIZONTAL // Npatch layout: 3x1 tiles
|
|
751
756
|
} NPatchLayout;
|
|
752
757
|
// Callbacks to hook some internal functions
|
|
753
|
-
// WARNING: These callbacks are intended for
|
|
758
|
+
// WARNING: These callbacks are intended for advanced users
|
|
754
759
|
typedef void (*TraceLogCallback)(int logLevel, const char *text, void * args); // Logging: Redirect trace log messages
|
|
755
760
|
typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, int *dataSize); // FileIO: Load binary data
|
|
756
761
|
typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, int dataSize); // FileIO: Save binary data
|
|
@@ -777,8 +782,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
777
782
|
bool IsWindowState(unsigned int flag); // Check if one specific window flag is enabled
|
|
778
783
|
void SetWindowState(unsigned int flags); // Set window configuration state using flags (only PLATFORM_DESKTOP)
|
|
779
784
|
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)
|
|
785
|
+
void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed [resizes monitor to match window resolution] (only PLATFORM_DESKTOP)
|
|
786
|
+
void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed [resizes window to match monitor resolution] (only PLATFORM_DESKTOP)
|
|
782
787
|
void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
|
|
783
788
|
void MinimizeWindow(void); // Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
|
|
784
789
|
void RestoreWindow(void); // Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
|
|
@@ -844,7 +849,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
844
849
|
// NOTE: Shader functionality is not available on OpenGL 1.1
|
|
845
850
|
Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations
|
|
846
851
|
Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations
|
|
847
|
-
bool
|
|
852
|
+
bool IsShaderValid(Shader shader); // Check if a shader is valid (loaded on GPU)
|
|
848
853
|
int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
|
|
849
854
|
int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
|
|
850
855
|
void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value
|
|
@@ -853,20 +858,21 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
853
858
|
void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value for texture (sampler2d)
|
|
854
859
|
void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM)
|
|
855
860
|
// Screen-space-related functions
|
|
856
|
-
Ray
|
|
857
|
-
|
|
858
|
-
Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
|
|
861
|
+
Ray GetScreenToWorldRay(Vector2 position, Camera camera); // Get a ray trace from screen position (i.e mouse)
|
|
862
|
+
Ray GetScreenToWorldRayEx(Vector2 position, Camera camera, int width, int height); // Get a ray trace from screen position (i.e mouse) in a viewport
|
|
859
863
|
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
864
|
Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Get size position for a 3d world space position
|
|
862
865
|
Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get the screen space position for a 2d camera world space position
|
|
866
|
+
Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
|
|
867
|
+
Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
|
|
868
|
+
Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
|
|
863
869
|
// Timing-related functions
|
|
864
870
|
void SetTargetFPS(int fps); // Set target FPS (maximum)
|
|
865
871
|
float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time)
|
|
866
872
|
double GetTime(void); // Get elapsed time in seconds since InitWindow()
|
|
867
873
|
int GetFPS(void); // Get current FPS
|
|
868
874
|
// Custom frame control functions
|
|
869
|
-
// NOTE: Those functions are intended for
|
|
875
|
+
// NOTE: Those functions are intended for advanced users that want full control over the frame processing
|
|
870
876
|
// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents()
|
|
871
877
|
// To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
|
|
872
878
|
void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
|
|
@@ -889,7 +895,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
889
895
|
void *MemRealloc(void *ptr, unsigned int size); // Internal memory reallocator
|
|
890
896
|
void MemFree(void *ptr); // Internal memory free
|
|
891
897
|
// Set custom callbacks
|
|
892
|
-
// WARNING: Callbacks setup is intended for
|
|
898
|
+
// WARNING: Callbacks setup is intended for advanced users
|
|
893
899
|
void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log
|
|
894
900
|
void SetLoadFileDataCallback(LoadFileDataCallback callback); // Set custom file binary data loader
|
|
895
901
|
void SetSaveFileDataCallback(SaveFileDataCallback callback); // Set custom file binary data saver
|
|
@@ -916,10 +922,12 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
916
922
|
const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
|
|
917
923
|
const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
|
|
918
924
|
const char *GetApplicationDirectory(void); // Get the directory of the running application (uses static string)
|
|
925
|
+
int MakeDirectory(const char *dirPath); // Create directories (including full path requested), returns 0 on success
|
|
919
926
|
bool ChangeDirectory(const char *dir); // Change working directory, return true on success
|
|
920
927
|
bool IsPathFile(const char *path); // Check if a given path is a file or a directory
|
|
928
|
+
bool IsFileNameValid(const char *fileName); // Check if fileName is valid for the platform/OS
|
|
921
929
|
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
|
|
930
|
+
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
931
|
void UnloadDirectoryFiles(FilePathList files); // Unload filepaths
|
|
924
932
|
bool IsFileDropped(void); // Check if a file has been dropped into window
|
|
925
933
|
FilePathList LoadDroppedFiles(void); // Load dropped filepaths
|
|
@@ -930,9 +938,11 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
930
938
|
unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // Decompress data (DEFLATE algorithm), memory must be MemFree()
|
|
931
939
|
char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string, memory must be MemFree()
|
|
932
940
|
unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize); // Decode Base64 string data, memory must be MemFree()
|
|
941
|
+
unsigned int ComputeCRC32(unsigned char *data, int dataSize); // Compute CRC32 hash code
|
|
942
|
+
unsigned int *ComputeMD5(unsigned char *data, int dataSize); // Compute MD5 hash code, returns static int[4] (16 bytes)
|
|
933
943
|
// Automation events functionality
|
|
934
944
|
AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
|
|
935
|
-
void UnloadAutomationEventList(AutomationEventList
|
|
945
|
+
void UnloadAutomationEventList(AutomationEventList list); // Unload automation events list from file
|
|
936
946
|
bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file
|
|
937
947
|
void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to
|
|
938
948
|
void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording
|
|
@@ -962,6 +972,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
962
972
|
int GetGamepadAxisCount(int gamepad); // Get gamepad axis count for a gamepad
|
|
963
973
|
float GetGamepadAxisMovement(int gamepad, int axis); // Get axis movement value for a gamepad axis
|
|
964
974
|
int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB)
|
|
975
|
+
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor); // Set gamepad vibration for both motors
|
|
965
976
|
// Input-related functions: mouse
|
|
966
977
|
bool IsMouseButtonPressed(int button); // Check if a mouse button has been pressed once
|
|
967
978
|
bool IsMouseButtonDown(int button); // Check if a mouse button is being pressed
|
|
@@ -1006,18 +1017,20 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1006
1017
|
// NOTE: It can be useful when using basic shapes and one single font,
|
|
1007
1018
|
// defining a font char white rectangle would allow drawing everything in a single draw call
|
|
1008
1019
|
void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing
|
|
1020
|
+
Texture2D GetShapesTexture(void); // Get texture that is used for shapes drawing
|
|
1021
|
+
Rectangle GetShapesTextureRectangle(void); // Get texture source rectangle that is used for shapes drawing
|
|
1009
1022
|
// 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)
|
|
1023
|
+
void DrawPixel(int posX, int posY, Color color); // Draw a pixel using geometry [Can be slow, use with care]
|
|
1024
|
+
void DrawPixelV(Vector2 position, Color color); // Draw a pixel using geometry (Vector version) [Can be slow, use with care]
|
|
1012
1025
|
void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line
|
|
1013
1026
|
void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (using gl lines)
|
|
1014
1027
|
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)
|
|
1028
|
+
void DrawLineStrip(const Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
|
|
1016
1029
|
void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation
|
|
1017
1030
|
void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
|
|
1018
1031
|
void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
|
|
1019
1032
|
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
|
|
1033
|
+
void DrawCircleGradient(int centerX, int centerY, float radius, Color inner, Color outer); // Draw a gradient-filled circle
|
|
1021
1034
|
void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
|
|
1022
1035
|
void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
|
|
1023
1036
|
void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version)
|
|
@@ -1029,26 +1042,27 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1029
1042
|
void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
|
|
1030
1043
|
void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
|
|
1031
1044
|
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
|
|
1033
|
-
void DrawRectangleGradientH(int posX, int posY, int width, int height, Color
|
|
1034
|
-
void DrawRectangleGradientEx(Rectangle rec, Color
|
|
1045
|
+
void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); // Draw a vertical-gradient-filled rectangle
|
|
1046
|
+
void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); // Draw a horizontal-gradient-filled rectangle
|
|
1047
|
+
void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color topRight, Color bottomRight); // Draw a gradient-filled rectangle with custom vertex colors
|
|
1035
1048
|
void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
|
|
1036
1049
|
void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters
|
|
1037
1050
|
void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
|
|
1038
|
-
void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments,
|
|
1051
|
+
void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle lines with rounded edges
|
|
1052
|
+
void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
|
|
1039
1053
|
void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
|
1040
1054
|
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
|
|
1055
|
+
void DrawTriangleFan(const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
|
1056
|
+
void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
|
1043
1057
|
void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
|
|
1044
1058
|
void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
|
|
1045
1059
|
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
1060
|
// 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...]
|
|
1061
|
+
void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
|
|
1062
|
+
void DrawSplineBasis(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
|
|
1063
|
+
void DrawSplineCatmullRom(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
|
|
1064
|
+
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...]
|
|
1065
|
+
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
1066
|
void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); // Draw spline segment: Linear, 2 points
|
|
1053
1067
|
void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: B-Spline, 4 points
|
|
1054
1068
|
void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: Catmull-Rom, 4 points
|
|
@@ -1067,9 +1081,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1067
1081
|
bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle
|
|
1068
1082
|
bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle
|
|
1069
1083
|
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
|
|
1084
|
+
bool CheckCollisionPointPoly(Vector2 point, const Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices
|
|
1071
1085
|
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
1086
|
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]
|
|
1087
|
+
bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2); // Check if circle collides with a line created betweeen two points [p1] and [p2]
|
|
1073
1088
|
Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision
|
|
1074
1089
|
//------------------------------------------------------------------------------------
|
|
1075
1090
|
// Texture Loading and Drawing Functions (Module: textures)
|
|
@@ -1078,12 +1093,12 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1078
1093
|
// NOTE: These functions do not require GPU access
|
|
1079
1094
|
Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
|
|
1080
1095
|
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
1096
|
Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data)
|
|
1097
|
+
Image LoadImageAnimFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int *frames); // Load image sequence from memory buffer
|
|
1083
1098
|
Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. '.png'
|
|
1084
1099
|
Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data
|
|
1085
1100
|
Image LoadImageFromScreen(void); // Load image from screen buffer and (screenshot)
|
|
1086
|
-
bool
|
|
1101
|
+
bool IsImageValid(Image image); // Check if an image is valid (data and parameters)
|
|
1087
1102
|
void UnloadImage(Image image); // Unload image from CPU memory (RAM)
|
|
1088
1103
|
bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success
|
|
1089
1104
|
unsigned char *ExportImageToMemory(Image image, const char *fileType, int *fileSize); // Export image to memory buffer
|
|
@@ -1101,6 +1116,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1101
1116
|
// Image manipulation functions
|
|
1102
1117
|
Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
|
|
1103
1118
|
Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
|
|
1119
|
+
Image ImageFromChannel(Image image, int selectedChannel); // Create an image from a selected channel of another image (GRAYSCALE)
|
|
1104
1120
|
Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
|
|
1105
1121
|
Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
|
|
1106
1122
|
void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
|
|
@@ -1111,6 +1127,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1111
1127
|
void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
|
1112
1128
|
void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
|
|
1113
1129
|
void ImageBlurGaussian(Image *image, int blurSize); // Apply Gaussian blur using a box blur approximation
|
|
1130
|
+
void ImageKernelConvolution(Image *image, const float *kernel, int kernelSize); // Apply custom square convolution kernel to image
|
|
1114
1131
|
void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
|
|
1115
1132
|
void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
|
|
1116
1133
|
void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
|
|
@@ -1140,6 +1157,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1140
1157
|
void ImageDrawPixelV(Image *dst, Vector2 position, Color color); // Draw pixel within an image (Vector version)
|
|
1141
1158
|
void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw line within an image
|
|
1142
1159
|
void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); // Draw line within an image (Vector version)
|
|
1160
|
+
void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color color); // Draw a line defining thickness within an image
|
|
1143
1161
|
void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw a filled circle within an image
|
|
1144
1162
|
void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version)
|
|
1145
1163
|
void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image
|
|
@@ -1148,6 +1166,11 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1148
1166
|
void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
|
|
1149
1167
|
void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
|
1150
1168
|
void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
|
|
1169
|
+
void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image
|
|
1170
|
+
void ImageDrawTriangleEx(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image
|
|
1171
|
+
void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image
|
|
1172
|
+
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)
|
|
1173
|
+
void ImageDrawTriangleStrip(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image
|
|
1151
1174
|
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
1175
|
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
1176
|
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 +1180,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1157
1180
|
Texture2D LoadTextureFromImage(Image image); // Load texture from image data
|
|
1158
1181
|
TextureCubemap LoadTextureCubemap(Image image, int layout); // Load cubemap from image, multiple image cubemap layouts supported
|
|
1159
1182
|
RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer)
|
|
1160
|
-
bool
|
|
1183
|
+
bool IsTextureValid(Texture2D texture); // Check if a texture is valid (loaded in GPU)
|
|
1161
1184
|
void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
|
|
1162
|
-
bool
|
|
1185
|
+
bool IsRenderTextureValid(RenderTexture2D target); // Check if a render texture is valid (loaded in GPU)
|
|
1163
1186
|
void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
|
|
1164
1187
|
void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
|
|
1165
1188
|
void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data
|
|
@@ -1175,8 +1198,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1175
1198
|
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
1199
|
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
1200
|
// Color/pixel related functions
|
|
1201
|
+
bool ColorIsEqual(Color col1, Color col2); // Check if two colors are equal
|
|
1178
1202
|
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
|
|
1203
|
+
int ColorToInt(Color color); // Get hexadecimal value for a Color (0xRRGGBBAA)
|
|
1180
1204
|
Vector4 ColorNormalize(Color color); // Get Color normalized as float [0..1]
|
|
1181
1205
|
Color ColorFromNormalized(Vector4 normalized); // Get Color from normalized values [0..1]
|
|
1182
1206
|
Vector3 ColorToHSV(Color color); // Get HSV values for a Color, hue [0..360], saturation/value [0..1]
|
|
@@ -1186,6 +1210,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1186
1210
|
Color ColorContrast(Color color, float contrast); // Get color with contrast correction, contrast values between -1.0f and 1.0f
|
|
1187
1211
|
Color ColorAlpha(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
|
1188
1212
|
Color ColorAlphaBlend(Color dst, Color src, Color tint); // Get src alpha-blended into dst color with tint
|
|
1213
|
+
Color ColorLerp(Color color1, Color color2, float factor); // Get color lerp interpolation between two colors, factor [0.0f..1.0f]
|
|
1189
1214
|
Color GetColor(unsigned int hexValue); // Get Color structure from hexadecimal value
|
|
1190
1215
|
Color GetPixelColor(void *srcPtr, int format); // Get Color from a source pixel pointer of certain format
|
|
1191
1216
|
void SetPixelColor(void *dstPtr, Color color, int format); // Set color formatted into destination pixel pointer
|
|
@@ -1196,10 +1221,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1196
1221
|
// Font loading/unloading functions
|
|
1197
1222
|
Font GetFontDefault(void); // Get the default Font
|
|
1198
1223
|
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
|
|
1224
|
+
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
1225
|
Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
|
|
1201
1226
|
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
|
|
1227
|
+
bool IsFontValid(Font font); // Check if a font is valid (font data loaded, WARNING: GPU texture not checked)
|
|
1203
1228
|
GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use
|
|
1204
1229
|
Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
|
1205
1230
|
void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM)
|
|
@@ -1236,7 +1261,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1236
1261
|
unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
|
|
1237
1262
|
const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf() style)
|
|
1238
1263
|
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!)
|
|
1264
|
+
char *TextReplace(const char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!)
|
|
1240
1265
|
char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (WARNING: memory must be freed!)
|
|
1241
1266
|
const char *TextJoin(const char **textList, int count, const char *delimiter); // Join text strings with delimiter
|
|
1242
1267
|
const char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings
|
|
@@ -1245,7 +1270,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1245
1270
|
const char *TextToUpper(const char *text); // Get upper case version of provided string
|
|
1246
1271
|
const char *TextToLower(const char *text); // Get lower case version of provided string
|
|
1247
1272
|
const char *TextToPascal(const char *text); // Get Pascal case notation version of provided string
|
|
1273
|
+
const char *TextToSnake(const char *text); // Get Snake case notation version of provided string
|
|
1274
|
+
const char *TextToCamel(const char *text); // Get Camel case notation version of provided string
|
|
1248
1275
|
int TextToInteger(const char *text); // Get integer value from text (negative values not supported)
|
|
1276
|
+
float TextToFloat(const char *text); // Get float value from text (negative values not supported)
|
|
1249
1277
|
//------------------------------------------------------------------------------------
|
|
1250
1278
|
// Basic 3d Shapes Drawing Functions (Module: models)
|
|
1251
1279
|
//------------------------------------------------------------------------------------
|
|
@@ -1254,7 +1282,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1254
1282
|
void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
|
|
1255
1283
|
void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
|
|
1256
1284
|
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
|
|
1285
|
+
void DrawTriangleStrip3D(const Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
|
1258
1286
|
void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
|
|
1259
1287
|
void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
|
1260
1288
|
void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires
|
|
@@ -1277,7 +1305,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1277
1305
|
// Model management functions
|
|
1278
1306
|
Model LoadModel(const char *fileName); // Load model from files (meshes and materials)
|
|
1279
1307
|
Model LoadModelFromMesh(Mesh mesh); // Load model from generated mesh (default material)
|
|
1280
|
-
bool
|
|
1308
|
+
bool IsModelValid(Model model); // Check if a model is valid (loaded in GPU, VAO/VBOs)
|
|
1281
1309
|
void UnloadModel(Model model); // Unload model (including meshes) from memory (RAM and/or VRAM)
|
|
1282
1310
|
BoundingBox GetModelBoundingBox(Model model); // Compute model bounding box limits (considers all meshes)
|
|
1283
1311
|
// Model drawing functions
|
|
@@ -1285,8 +1313,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1285
1313
|
void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters
|
|
1286
1314
|
void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set)
|
|
1287
1315
|
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
|
|
1316
|
+
void DrawModelPoints(Model model, Vector3 position, float scale, Color tint); // Draw a model as points
|
|
1317
|
+
void DrawModelPointsEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model as points with extended parameters
|
|
1288
1318
|
void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires)
|
|
1289
|
-
void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float
|
|
1319
|
+
void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a billboard texture
|
|
1290
1320
|
void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
|
|
1291
1321
|
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
1322
|
// Mesh management functions
|
|
@@ -1295,9 +1325,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1295
1325
|
void UnloadMesh(Mesh mesh); // Unload mesh data from CPU and GPU
|
|
1296
1326
|
void DrawMesh(Mesh mesh, Material material, Matrix transform); // Draw a 3d mesh with material and transform
|
|
1297
1327
|
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
1328
|
BoundingBox GetMeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits
|
|
1300
1329
|
void GenMeshTangents(Mesh *mesh); // Compute mesh tangents
|
|
1330
|
+
bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success
|
|
1331
|
+
bool ExportMeshAsCode(Mesh mesh, const char *fileName); // Export mesh as code file (.h) defining multiple arrays of vertex attributes
|
|
1301
1332
|
// Mesh generation functions
|
|
1302
1333
|
Mesh GenMeshPoly(int sides, float radius); // Generate polygonal mesh
|
|
1303
1334
|
Mesh GenMeshPlane(float width, float length, int resX, int resZ); // Generate plane mesh (with subdivisions)
|
|
@@ -1313,7 +1344,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1313
1344
|
// Material loading/unloading functions
|
|
1314
1345
|
Material *LoadMaterials(const char *fileName, int *materialCount); // Load materials from model file
|
|
1315
1346
|
Material LoadMaterialDefault(void); // Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
|
|
1316
|
-
bool
|
|
1347
|
+
bool IsMaterialValid(Material material); // Check if a material is valid (shader assigned, map textures loaded in GPU)
|
|
1317
1348
|
void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM)
|
|
1318
1349
|
void SetMaterialTexture(Material *material, int mapType, Texture2D texture); // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
|
|
1319
1350
|
void SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh
|
|
@@ -1323,6 +1354,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|
|
1323
1354
|
void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
|
|
1324
1355
|
void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data
|
|
1325
1356
|
bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
|
|
1357
|
+
void UpdateModelAnimationBoneMatrices(Model model, ModelAnimation anim, int frame); // Update model animation mesh bone matrices (Note GPU skinning does not work on Mac)
|
|
1326
1358
|
// Collision detection functions
|
|
1327
1359
|
bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres
|
|
1328
1360
|
bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Check collision between two bounding boxes
|
|
@@ -1345,11 +1377,11 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|
|
1345
1377
|
// Wave/Sound loading/unloading functions
|
|
1346
1378
|
Wave LoadWave(const char *fileName); // Load wave data from file
|
|
1347
1379
|
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
|
|
1380
|
+
bool IsWaveValid(Wave wave); // Checks if wave data is valid (data loaded and parameters)
|
|
1349
1381
|
Sound LoadSound(const char *fileName); // Load sound from file
|
|
1350
1382
|
Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
|
|
1351
1383
|
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
|
|
1384
|
+
bool IsSoundValid(Sound sound); // Checks if a sound is valid (data loaded and buffers initialized)
|
|
1353
1385
|
void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data
|
|
1354
1386
|
void UnloadWave(Wave wave); // Unload wave data
|
|
1355
1387
|
void UnloadSound(Sound sound); // Unload sound
|
|
@@ -1366,14 +1398,14 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|
|
1366
1398
|
void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
|
|
1367
1399
|
void SetSoundPan(Sound sound, float pan); // Set pan for a sound (0.5 is center)
|
|
1368
1400
|
Wave WaveCopy(Wave wave); // Copy a wave to a new wave
|
|
1369
|
-
void WaveCrop(Wave *wave, int
|
|
1401
|
+
void WaveCrop(Wave *wave, int initFrame, int finalFrame); // Crop a wave to defined frames range
|
|
1370
1402
|
void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format
|
|
1371
1403
|
float *LoadWaveSamples(Wave wave); // Load samples data from wave as a 32bit float data array
|
|
1372
1404
|
void UnloadWaveSamples(float *samples); // Unload samples data loaded with LoadWaveSamples()
|
|
1373
1405
|
// Music management functions
|
|
1374
1406
|
Music LoadMusicStream(const char *fileName); // Load music stream from file
|
|
1375
1407
|
Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data, int dataSize); // Load music stream from data
|
|
1376
|
-
bool
|
|
1408
|
+
bool IsMusicValid(Music music); // Checks if a music stream is valid (context and buffers initialized)
|
|
1377
1409
|
void UnloadMusicStream(Music music); // Unload music stream
|
|
1378
1410
|
void PlayMusicStream(Music music); // Start music playing
|
|
1379
1411
|
bool IsMusicStreamPlaying(Music music); // Check if music is playing
|
|
@@ -1389,7 +1421,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|
|
1389
1421
|
float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
|
|
1390
1422
|
// AudioStream management functions
|
|
1391
1423
|
AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Load audio stream (to stream raw audio pcm data)
|
|
1392
|
-
bool
|
|
1424
|
+
bool IsAudioStreamValid(AudioStream stream); // Checks if an audio stream is valid (buffers initialized)
|
|
1393
1425
|
void UnloadAudioStream(AudioStream stream); // Unload audio stream and free memory
|
|
1394
1426
|
void UpdateAudioStream(AudioStream stream, const void *data, int frameCount); // Update audio stream buffers with data
|
|
1395
1427
|
bool IsAudioStreamProcessed(AudioStream stream); // Check if any audio stream buffers requires refill
|
|
@@ -1403,7 +1435,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|
|
1403
1435
|
void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (0.5 is centered)
|
|
1404
1436
|
void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
|
|
1405
1437
|
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
|
|
1438
|
+
void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as 'float'
|
|
1407
1439
|
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
|
|
1440
|
+
void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'
|
|
1409
1441
|
void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline
|