comparison third_party/raylib/include/raylib.h @ 276:b55c22cff335

Add interactive infinite canvas prototype
author MrJuneJune <me@mrjunejune.com>
date Mon, 17 Aug 2026 16:57:56 -0700
parents f33d9ff8b6e8
children
comparison
equal deleted inserted replaced
274:c9be578316a6 276:b55c22cff335
1 /********************************************************************************************** 1 /**********************************************************************************************
2 * 2 *
3 * raylib v5.5 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com) 3 * raylib v6.0 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
4 * 4 *
5 * FEATURES: 5 * FEATURES:
6 * - NO external dependencies, all required libraries included with raylib 6 * - NO external dependencies, all required libraries included with raylib
7 * - Multiplatform: Windows, Linux, FreeBSD, OpenBSD, NetBSD, DragonFly, 7 * - Multiplatform: Windows, Linux, macOS, FreeBSD, Web, Android, Raspberry Pi, DRM native...
8 * MacOS, Haiku, Android, Raspberry Pi, DRM native, HTML5.
9 * - Written in plain C code (C99) in PascalCase/camelCase notation 8 * - Written in plain C code (C99) in PascalCase/camelCase notation
10 * - Hardware accelerated with OpenGL (1.1, 2.1, 3.3, 4.3, ES2, ES3 - choose at compile) 9 * - Hardware accelerated with OpenGL (1.1, 2.1, 3.3, 4.3, ES2, ES3 - choose at compile)
11 * - Unique OpenGL abstraction layer (usable as standalone module): [rlgl] 10 * - Software renderer optional, for systems with no GPU: [rlsw]
11 * - Custom OpenGL abstraction layer (usable as standalone module): [rlgl]
12 * - Multiple Fonts formats supported (TTF, OTF, FNT, BDF, Sprite fonts) 12 * - Multiple Fonts formats supported (TTF, OTF, FNT, BDF, Sprite fonts)
13 * - Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC) 13 * - Many texture formats supported, including compressed formats (DXT, ETC, ASTC)
14 * - Full 3d support for 3d Shapes, Models, Billboards, Heightmaps and more! 14 * - Full 3d support for 3d Shapes, Models, Billboards, Heightmaps and more!
15 * - Flexible Materials system, supporting classic maps and PBR maps 15 * - Flexible Materials system, supporting classic maps and PBR maps
16 * - Animated 3D models supported (skeletal bones animation) (IQM, M3D, GLTF) 16 * - Animated 3D models supported (skeletal bones animation) (IQM, M3D, GLTF)
17 * - Shaders support, including Model shaders and Postprocessing shaders 17 * - Shaders support, including Model shaders and Postprocessing shaders
18 * - Powerful math module for Vector, Matrix and Quaternion operations: [raymath] 18 * - Powerful math module for Vector, Matrix and Quaternion operations: [raymath]
24 * - One default Font is loaded on InitWindow()->LoadFontDefault() [core, text] 24 * - One default Font is loaded on InitWindow()->LoadFontDefault() [core, text]
25 * - One default Texture2D is loaded on rlglInit(), 1x1 white pixel R8G8B8A8 [rlgl] (OpenGL 3.3 or ES2) 25 * - One default Texture2D is loaded on rlglInit(), 1x1 white pixel R8G8B8A8 [rlgl] (OpenGL 3.3 or ES2)
26 * - One default Shader is loaded on rlglInit()->rlLoadShaderDefault() [rlgl] (OpenGL 3.3 or ES2) 26 * - One default Shader is loaded on rlglInit()->rlLoadShaderDefault() [rlgl] (OpenGL 3.3 or ES2)
27 * - One default RenderBatch is loaded on rlglInit()->rlLoadRenderBatch() [rlgl] (OpenGL 3.3 or ES2) 27 * - One default RenderBatch is loaded on rlglInit()->rlLoadRenderBatch() [rlgl] (OpenGL 3.3 or ES2)
28 * 28 *
29 * DEPENDENCIES (included): 29 * DEPENDENCIES:
30 * [rcore][GLFW] rglfw (Camilla Löwy - github.com/glfw/glfw) for window/context management and input 30 * [rcore] Depends on the selected platform backend, check rcore.c header for details
31 * [rcore][RGFW] rgfw (ColleagueRiley - github.com/ColleagueRiley/RGFW) for window/context management and input 31 * [rlgl] glad/glad_gles2 (David Herberth - github.com/Dav1dde/glad) for OpenGL extensions loading
32 * [rlgl] glad/glad_gles2 (David Herberth - github.com/Dav1dde/glad) for OpenGL 3.3 extensions loading
33 * [raudio] miniaudio (David Reid - github.com/mackron/miniaudio) for audio device/context management 32 * [raudio] miniaudio (David Reid - github.com/mackron/miniaudio) for audio device/context management
34 * 33 *
35 * OPTIONAL DEPENDENCIES (included): 34 * OPTIONAL DEPENDENCIES (included):
36 * [rcore] msf_gif (Miles Fogle) for GIF recording
37 * [rcore] sinfl (Micha Mettke) for DEFLATE decompression algorithm 35 * [rcore] sinfl (Micha Mettke) for DEFLATE decompression algorithm
38 * [rcore] sdefl (Micha Mettke) for DEFLATE compression algorithm 36 * [rcore] sdefl (Micha Mettke) for DEFLATE compression algorithm
39 * [rcore] rprand (Ramon Snatamaria) for pseudo-random numbers generation 37 * [rcore] rprand (Ramon Santamaria) for pseudo-random numbers generation
40 * [rtextures] qoi (Dominic Szablewski - https://phoboslab.org) for QOI image manage 38 * [rtextures] qoi (Dominic Szablewski - https://phoboslab.org) for QOI image management
41 * [rtextures] stb_image (Sean Barret) for images loading (BMP, TGA, PNG, JPEG, HDR...) 39 * [rtextures] stb_image (Sean Barrett) for images loading (BMP, TGA, PNG, JPEG, HDR...)
42 * [rtextures] stb_image_write (Sean Barret) for image writing (BMP, TGA, PNG, JPG) 40 * [rtextures] stb_image_write (Sean Barrett) for image writing (BMP, TGA, PNG, JPG)
43 * [rtextures] stb_image_resize2 (Sean Barret) for image resizing algorithms 41 * [rtextures] stb_image_resize2 (Sean Barrett) for image resizing algorithms
44 * [rtextures] stb_perlin (Sean Barret) for Perlin Noise image generation 42 * [rtextures] stb_perlin (Sean Barrett) for Perlin Noise image generation
45 * [rtext] stb_truetype (Sean Barret) for ttf fonts loading 43 * [rtextures] rltexgpu (Ramon Santamaria) for GPU-compressed texture formats
46 * [rtext] stb_rect_pack (Sean Barret) for rectangles packing 44 * [rtext] stb_truetype (Sean Barrett) for ttf fonts loading
45 * [rtext] stb_rect_pack (Sean Barrett) for rectangles packing
47 * [rmodels] par_shapes (Philip Rideout) for parametric 3d shapes generation 46 * [rmodels] par_shapes (Philip Rideout) for parametric 3d shapes generation
48 * [rmodels] tinyobj_loader_c (Syoyo Fujita) for models loading (OBJ, MTL) 47 * [rmodels] tinyobj_loader_c (Syoyo Fujita) for models loading (OBJ, MTL)
49 * [rmodels] cgltf (Johannes Kuhlmann) for models loading (glTF) 48 * [rmodels] cgltf (Johannes Kuhlmann) for models loading (glTF)
50 * [rmodels] m3d (bzt) for models loading (M3D, https://bztsrc.gitlab.io/model3d) 49 * [rmodels] m3d (bzt) for models loading (M3D, https://bztsrc.gitlab.io/model3d)
51 * [rmodels] vox_loader (Johann Nadalutti) for models loading (VOX) 50 * [rmodels] vox_loader (Johann Nadalutti) for models loading (VOX)
52 * [raudio] dr_wav (David Reid) for WAV audio file loading 51 * [raudio] dr_wav (David Reid) for WAV audio file loading
53 * [raudio] dr_flac (David Reid) for FLAC audio file loading 52 * [raudio] dr_flac (David Reid) for FLAC audio file loading
54 * [raudio] dr_mp3 (David Reid) for MP3 audio file loading 53 * [raudio] dr_mp3 (David Reid) for MP3 audio file loading
55 * [raudio] stb_vorbis (Sean Barret) for OGG audio loading 54 * [raudio] stb_vorbis (Sean Barrett) for OGG audio loading
56 * [raudio] jar_xm (Joshua Reisenauer) for XM audio module loading 55 * [raudio] jar_xm (Joshua Reisenauer) for XM audio module loading
57 * [raudio] jar_mod (Joshua Reisenauer) for MOD audio module loading 56 * [raudio] jar_mod (Joshua Reisenauer) for MOD audio module loading
58 * [raudio] qoa (Dominic Szablewski - https://phoboslab.org) for QOA audio manage 57 * [raudio] qoa (Dominic Szablewski - https://phoboslab.org) for QOA audio management
59 * 58 *
60 * 59 *
61 * LICENSE: zlib/libpng 60 * LICENSE: zlib/libpng
62 * 61 *
63 * raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, 62 * raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
64 * BSD-like license that allows static linking with closed source software: 63 * BSD-like license that allows static linking with closed source software:
65 * 64 *
66 * Copyright (c) 2013-2024 Ramon Santamaria (@raysan5) 65 * Copyright (c) 2013-2026 Ramon Santamaria (@raysan5)
67 * 66 *
68 * This software is provided "as-is", without any express or implied warranty. In no event 67 * This software is provided "as-is", without any express or implied warranty. In no event
69 * will the authors be held liable for any damages arising from the use of this software. 68 * will the authors be held liable for any damages arising from the use of this software.
70 * 69 *
71 * Permission is granted to anyone to use this software for any purpose, including commercial 70 * Permission is granted to anyone to use this software for any purpose, including commercial
85 #ifndef RAYLIB_H 84 #ifndef RAYLIB_H
86 #define RAYLIB_H 85 #define RAYLIB_H
87 86
88 #include <stdarg.h> // Required for: va_list - Only used by TraceLogCallback 87 #include <stdarg.h> // Required for: va_list - Only used by TraceLogCallback
89 88
90 #define RAYLIB_VERSION_MAJOR 5 89 #define RAYLIB_VERSION_MAJOR 6
91 #define RAYLIB_VERSION_MINOR 5 90 #define RAYLIB_VERSION_MINOR 0
92 #define RAYLIB_VERSION_PATCH 0 91 #define RAYLIB_VERSION_PATCH 0
93 #define RAYLIB_VERSION "5.5" 92 #define RAYLIB_VERSION "6.0"
94 93
95 // Function specifiers in case library is build/used as a shared library 94 // Function specifiers in case library is build/used as a shared library
96 // NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll 95 // NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
97 // NOTE: visibility("default") attribute makes symbols "visible" when compiled with -fvisibility=hidden 96 // NOTE: visibility("default") attribute makes symbols "visible" when compiled with -fvisibility=hidden
98 #if defined(_WIN32) 97 #if defined(_WIN32)
99 #if defined(__TINYC__) 98 #if defined(__TINYC__)
100 #define __declspec(x) __attribute__((x)) 99 #define __declspec(x) __attribute__((x))
101 #endif 100 #endif
102 #if defined(BUILD_LIBTYPE_SHARED) 101 #if defined(BUILD_LIBTYPE_SHARED)
103 #define RLAPI __declspec(dllexport) // We are building the library as a Win32 shared library (.dll) 102 #define RLAPI __declspec(dllexport) // Building the library as a Win32 shared library (.dll)
104 #elif defined(USE_LIBTYPE_SHARED) 103 #elif defined(USE_LIBTYPE_SHARED)
105 #define RLAPI __declspec(dllimport) // We are using the library as a Win32 shared library (.dll) 104 #define RLAPI __declspec(dllimport) // Using the library as a Win32 shared library (.dll)
106 #endif 105 #endif
107 #else 106 #else
108 #if defined(BUILD_LIBTYPE_SHARED) 107 #if defined(BUILD_LIBTYPE_SHARED)
109 #define RLAPI __attribute__((visibility("default"))) // We are building as a Unix shared library (.so/.dylib) 108 #define RLAPI __attribute__((visibility("default"))) // Building as a Unix shared library (.so/.dylib)
110 #endif 109 #endif
111 #endif 110 #endif
112 111
113 #ifndef RLAPI 112 #ifndef RLAPI
114 #define RLAPI // Functions defined as 'extern' by default (implicit specifiers) 113 #define RLAPI // Functions defined as 'extern' by default (implicit specifiers)
115 #endif 114 #endif
116 115
117 //---------------------------------------------------------------------------------- 116 //----------------------------------------------------------------------------------
118 // Some basic Defines 117 // Defines and Macros
119 //---------------------------------------------------------------------------------- 118 //----------------------------------------------------------------------------------
120 #ifndef PI 119 #ifndef PI
121 #define PI 3.14159265358979323846f 120 #define PI 3.14159265358979323846f
122 #endif 121 #endif
123 #ifndef DEG2RAD 122 #ifndef DEG2RAD
156 // So, give a more clear error stating how to fix this 155 // So, give a more clear error stating how to fix this
157 #if !defined(_MSC_VER) && (defined(__cplusplus) && __cplusplus < 201103L) 156 #if !defined(_MSC_VER) && (defined(__cplusplus) && __cplusplus < 201103L)
158 #error "C++11 or later is required. Add -std=c++11" 157 #error "C++11 or later is required. Add -std=c++11"
159 #endif 158 #endif
160 159
161 // NOTE: We set some defines with some data types declared by raylib 160 // NOTE: Set some defines with some data types declared by raylib
162 // Other modules (raymath, rlgl) also require some of those types, so, 161 // Other modules (raymath, rlgl) also require some of those types, so,
163 // to be able to use those other modules as standalone (not depending on raylib) 162 // to be able to use those other modules as standalone (not depending on raylib)
164 // this defines are very useful for internal check and avoid type (re)definitions 163 // this defines are useful for internal check and avoid type (re)definitions
165 #define RL_COLOR_TYPE 164 #define RL_COLOR_TYPE
166 #define RL_RECTANGLE_TYPE 165 #define RL_RECTANGLE_TYPE
167 #define RL_VECTOR2_TYPE 166 #define RL_VECTOR2_TYPE
168 #define RL_VECTOR3_TYPE 167 #define RL_VECTOR3_TYPE
169 #define RL_VECTOR4_TYPE 168 #define RL_VECTOR4_TYPE
199 #define BLANK CLITERAL(Color){ 0, 0, 0, 0 } // Blank (Transparent) 198 #define BLANK CLITERAL(Color){ 0, 0, 0, 0 } // Blank (Transparent)
200 #define MAGENTA CLITERAL(Color){ 255, 0, 255, 255 } // Magenta 199 #define MAGENTA CLITERAL(Color){ 255, 0, 255, 255 } // Magenta
201 #define RAYWHITE CLITERAL(Color){ 245, 245, 245, 255 } // My own White (raylib logo) 200 #define RAYWHITE CLITERAL(Color){ 245, 245, 245, 255 } // My own White (raylib logo)
202 201
203 //---------------------------------------------------------------------------------- 202 //----------------------------------------------------------------------------------
204 // Structures Definition 203 // Types and Structures Definition
205 //---------------------------------------------------------------------------------- 204 //----------------------------------------------------------------------------------
206 // Boolean type 205 // Boolean type
207 #if (defined(__STDC__) && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800) 206 #if (defined(__STDC__) && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
208 #include <stdbool.h> 207 #include <stdbool.h>
209 #elif !defined(__cplusplus) && !defined(bool) 208 #elif !defined(__cplusplus) && !defined(bool)
325 // Camera, defines position/orientation in 3d space 324 // Camera, defines position/orientation in 3d space
326 typedef struct Camera3D { 325 typedef struct Camera3D {
327 Vector3 position; // Camera position 326 Vector3 position; // Camera position
328 Vector3 target; // Camera target it looks-at 327 Vector3 target; // Camera target it looks-at
329 Vector3 up; // Camera up vector (rotation over its axis) 328 Vector3 up; // Camera up vector (rotation over its axis)
330 float fovy; // Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic 329 float fovy; // Camera field-of-view aperture in Y (degrees) in perspective, used as near plane height in world units in orthographic
331 int projection; // Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC 330 int projection; // Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
332 } Camera3D; 331 } Camera3D;
333 332
334 typedef Camera3D Camera; // Camera type fallback, defaults to Camera3D 333 typedef Camera3D Camera; // Camera type fallback, defaults to Camera3D
335 334
336 // Camera2D, defines position/orientation in 2d space 335 // Camera2D, defines position/orientation in 2d space
337 typedef struct Camera2D { 336 typedef struct Camera2D {
338 Vector2 offset; // Camera offset (displacement from target) 337 Vector2 offset; // Camera offset (screen space offset from window origin)
339 Vector2 target; // Camera target (rotation and zoom origin) 338 Vector2 target; // Camera target (world space target point that is mapped to screen space offset)
340 float rotation; // Camera rotation in degrees 339 float rotation; // Camera rotation in degrees (pivots around target)
341 float zoom; // Camera zoom (scaling), should be 1.0f by default 340 float zoom; // Camera zoom (scaling around target), must not be set to 0, set to 1.0f for no scale
342 } Camera2D; 341 } Camera2D;
343 342
344 // Mesh, vertex data and vao/vbo 343 // Mesh, vertex data and vao/vbo
345 typedef struct Mesh { 344 typedef struct Mesh {
346 int vertexCount; // Number of vertices stored in arrays 345 int vertexCount; // Number of vertices stored in arrays
350 float *vertices; // Vertex position (XYZ - 3 components per vertex) (shader-location = 0) 349 float *vertices; // Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
351 float *texcoords; // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) 350 float *texcoords; // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
352 float *texcoords2; // Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5) 351 float *texcoords2; // Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5)
353 float *normals; // Vertex normals (XYZ - 3 components per vertex) (shader-location = 2) 352 float *normals; // Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)
354 float *tangents; // Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4) 353 float *tangents; // Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)
355 unsigned char *colors; // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) 354 unsigned char *colors; // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
356 unsigned short *indices; // Vertex indices (in case vertex data comes indexed) 355 unsigned short *indices; // Vertex indices (in case vertex data comes indexed)
357 356
358 // Animation vertex data 357 // Skin data for animation
358 int boneCount; // Number of bones (MAX: 256 bones)
359 unsigned char *boneIndices; // Vertex bone indices, up to 4 bones influence by vertex (skinning) (shader-location = 6)
360 float *boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)
361
362 // Runtime animation vertex data (CPU skinning)
363 // NOTE: In case of GPU skinning, not used, pointers are NULL
359 float *animVertices; // Animated vertex positions (after bones transformations) 364 float *animVertices; // Animated vertex positions (after bones transformations)
360 float *animNormals; // Animated normals (after bones transformations) 365 float *animNormals; // Animated normals (after bones transformations)
361 unsigned char *boneIds; // Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6)
362 float *boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)
363 Matrix *boneMatrices; // Bones animated transformation matrices
364 int boneCount; // Number of bones
365 366
366 // OpenGL identifiers 367 // OpenGL identifiers
367 unsigned int vaoId; // OpenGL Vertex Array Object id 368 unsigned int vaoId; // OpenGL Vertex Array Object id
368 unsigned int *vboId; // OpenGL Vertex Buffer Objects id (default vertex data) 369 unsigned int *vboId; // OpenGL Vertex Buffer Objects id (default vertex data)
369 } Mesh; 370 } Mesh;
393 Vector3 translation; // Translation 394 Vector3 translation; // Translation
394 Quaternion rotation; // Rotation 395 Quaternion rotation; // Rotation
395 Vector3 scale; // Scale 396 Vector3 scale; // Scale
396 } Transform; 397 } Transform;
397 398
399 // Anim pose, an array of Transform[]
400 typedef Transform *ModelAnimPose;
401
398 // Bone, skeletal animation bone 402 // Bone, skeletal animation bone
399 typedef struct BoneInfo { 403 typedef struct BoneInfo {
400 char name[32]; // Bone name 404 char name[32]; // Bone name
401 int parent; // Bone parent 405 int parent; // Bone parent
402 } BoneInfo; 406 } BoneInfo;
403 407
408 // Skeleton, animation bones hierarchy
409 typedef struct ModelSkeleton {
410 int boneCount; // Number of bones
411 BoneInfo *bones; // Bones information (skeleton)
412 ModelAnimPose bindPose; // Bones base transformation (Transform[])
413 } ModelSkeleton;
414
404 // Model, meshes, materials and animation data 415 // Model, meshes, materials and animation data
405 typedef struct Model { 416 typedef struct Model {
406 Matrix transform; // Local transform matrix 417 Matrix transform; // Local transform matrix
407 418
408 int meshCount; // Number of meshes 419 int meshCount; // Number of meshes
410 Mesh *meshes; // Meshes array 421 Mesh *meshes; // Meshes array
411 Material *materials; // Materials array 422 Material *materials; // Materials array
412 int *meshMaterial; // Mesh material number 423 int *meshMaterial; // Mesh material number
413 424
414 // Animation data 425 // Animation data
415 int boneCount; // Number of bones 426 ModelSkeleton skeleton; // Skeleton for animation
416 BoneInfo *bones; // Bones information (skeleton) 427
417 Transform *bindPose; // Bones base transformation (pose) 428 // Runtime animation data (CPU/GPU skinning)
429 ModelAnimPose currentPose; // Current animation pose (Transform[])
430 Matrix *boneMatrices; // Bones animated transformation matrices
418 } Model; 431 } Model;
419 432
420 // ModelAnimation 433 // ModelAnimation, contains a full animation sequence
421 typedef struct ModelAnimation { 434 typedef struct ModelAnimation {
422 int boneCount; // Number of bones
423 int frameCount; // Number of animation frames
424 BoneInfo *bones; // Bones information (skeleton)
425 Transform **framePoses; // Poses array by frame
426 char name[32]; // Animation name 435 char name[32]; // Animation name
436
437 int boneCount; // Number of bones (per pose)
438 int keyframeCount; // Number of animation key frames
439 ModelAnimPose *keyframePoses; // Animation sequence keyframe poses [keyframe][pose]
427 } ModelAnimation; 440 } ModelAnimation;
428 441
429 // Ray, ray for raycasting 442 // Ray, ray for raycasting
430 typedef struct Ray { 443 typedef struct Ray {
431 Vector3 position; // Ray position (origin) 444 Vector3 position; // Ray position (origin)
511 float scaleIn[2]; // VR distortion scale in 524 float scaleIn[2]; // VR distortion scale in
512 } VrStereoConfig; 525 } VrStereoConfig;
513 526
514 // File path list 527 // File path list
515 typedef struct FilePathList { 528 typedef struct FilePathList {
516 unsigned int capacity; // Filepaths max entries
517 unsigned int count; // Filepaths entries count 529 unsigned int count; // Filepaths entries count
518 char **paths; // Filepaths entries 530 char **paths; // Filepaths entries
519 } FilePathList; 531 } FilePathList;
520 532
521 // Automation event 533 // Automation event
569 LOG_FATAL, // Fatal logging, used to abort program: exit(EXIT_FAILURE) 581 LOG_FATAL, // Fatal logging, used to abort program: exit(EXIT_FAILURE)
570 LOG_NONE // Disable logging 582 LOG_NONE // Disable logging
571 } TraceLogLevel; 583 } TraceLogLevel;
572 584
573 // Keyboard keys (US keyboard layout) 585 // Keyboard keys (US keyboard layout)
574 // NOTE: Use GetKeyPressed() to allow redefining 586 // NOTE: Use GetKeyPressed() to allow redefining required keys for alternative layouts
575 // required keys for alternative layouts
576 typedef enum { 587 typedef enum {
577 KEY_NULL = 0, // Key: NULL, used for no key pressed 588 KEY_NULL = 0, // Key: NULL, used for no key pressed
578 // Alphanumeric keys 589 // Alphanumeric keys
579 KEY_APOSTROPHE = 39, // Key: ' 590 KEY_APOSTROPHE = 39, // Key: '
580 KEY_COMMA = 44, // Key: , 591 KEY_COMMA = 44, // Key: ,
721 MOUSE_CURSOR_NOT_ALLOWED = 10 // The operation-not-allowed shape 732 MOUSE_CURSOR_NOT_ALLOWED = 10 // The operation-not-allowed shape
722 } MouseCursor; 733 } MouseCursor;
723 734
724 // Gamepad buttons 735 // Gamepad buttons
725 typedef enum { 736 typedef enum {
726 GAMEPAD_BUTTON_UNKNOWN = 0, // Unknown button, just for error checking 737 GAMEPAD_BUTTON_UNKNOWN = 0, // Unknown button, for error checking
727 GAMEPAD_BUTTON_LEFT_FACE_UP, // Gamepad left DPAD up button 738 GAMEPAD_BUTTON_LEFT_FACE_UP, // Gamepad left DPAD up button
728 GAMEPAD_BUTTON_LEFT_FACE_RIGHT, // Gamepad left DPAD right button 739 GAMEPAD_BUTTON_LEFT_FACE_RIGHT, // Gamepad left DPAD right button
729 GAMEPAD_BUTTON_LEFT_FACE_DOWN, // Gamepad left DPAD down button 740 GAMEPAD_BUTTON_LEFT_FACE_DOWN, // Gamepad left DPAD down button
730 GAMEPAD_BUTTON_LEFT_FACE_LEFT, // Gamepad left DPAD left button 741 GAMEPAD_BUTTON_LEFT_FACE_LEFT, // Gamepad left DPAD left button
731 GAMEPAD_BUTTON_RIGHT_FACE_UP, // Gamepad right button up (i.e. PS3: Triangle, Xbox: Y) 742 GAMEPAD_BUTTON_RIGHT_FACE_UP, // Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
741 GAMEPAD_BUTTON_MIDDLE_RIGHT, // Gamepad center buttons, right one (i.e. PS3: Start) 752 GAMEPAD_BUTTON_MIDDLE_RIGHT, // Gamepad center buttons, right one (i.e. PS3: Start)
742 GAMEPAD_BUTTON_LEFT_THUMB, // Gamepad joystick pressed button left 753 GAMEPAD_BUTTON_LEFT_THUMB, // Gamepad joystick pressed button left
743 GAMEPAD_BUTTON_RIGHT_THUMB // Gamepad joystick pressed button right 754 GAMEPAD_BUTTON_RIGHT_THUMB // Gamepad joystick pressed button right
744 } GamepadButton; 755 } GamepadButton;
745 756
746 // Gamepad axis 757 // Gamepad axes
747 typedef enum { 758 typedef enum {
748 GAMEPAD_AXIS_LEFT_X = 0, // Gamepad left stick X axis 759 GAMEPAD_AXIS_LEFT_X = 0, // Gamepad left stick X axis
749 GAMEPAD_AXIS_LEFT_Y = 1, // Gamepad left stick Y axis 760 GAMEPAD_AXIS_LEFT_Y = 1, // Gamepad left stick Y axis
750 GAMEPAD_AXIS_RIGHT_X = 2, // Gamepad right stick X axis 761 GAMEPAD_AXIS_RIGHT_X = 2, // Gamepad right stick X axis
751 GAMEPAD_AXIS_RIGHT_Y = 3, // Gamepad right stick Y axis 762 GAMEPAD_AXIS_RIGHT_Y = 3, // Gamepad right stick Y axis
770 781
771 #define MATERIAL_MAP_DIFFUSE MATERIAL_MAP_ALBEDO 782 #define MATERIAL_MAP_DIFFUSE MATERIAL_MAP_ALBEDO
772 #define MATERIAL_MAP_SPECULAR MATERIAL_MAP_METALNESS 783 #define MATERIAL_MAP_SPECULAR MATERIAL_MAP_METALNESS
773 784
774 // Shader location index 785 // Shader location index
786 // NOTE: Some locations are tried to be set automatically on shader loading,
787 // but only if default attributes/uniforms names are found, check config.h for names
775 typedef enum { 788 typedef enum {
776 SHADER_LOC_VERTEX_POSITION = 0, // Shader location: vertex attribute: position 789 SHADER_LOC_VERTEX_POSITION = 0, // Shader location: vertex attribute: position
777 SHADER_LOC_VERTEX_TEXCOORD01, // Shader location: vertex attribute: texcoord01 790 SHADER_LOC_VERTEX_TEXCOORD01, // Shader location: vertex attribute: texcoord01
778 SHADER_LOC_VERTEX_TEXCOORD02, // Shader location: vertex attribute: texcoord02 791 SHADER_LOC_VERTEX_TEXCOORD02, // Shader location: vertex attribute: texcoord02
779 SHADER_LOC_VERTEX_NORMAL, // Shader location: vertex attribute: normal 792 SHADER_LOC_VERTEX_NORMAL, // Shader location: vertex attribute: normal
792 SHADER_LOC_MAP_METALNESS, // Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR) 805 SHADER_LOC_MAP_METALNESS, // Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR)
793 SHADER_LOC_MAP_NORMAL, // Shader location: sampler2d texture: normal 806 SHADER_LOC_MAP_NORMAL, // Shader location: sampler2d texture: normal
794 SHADER_LOC_MAP_ROUGHNESS, // Shader location: sampler2d texture: roughness 807 SHADER_LOC_MAP_ROUGHNESS, // Shader location: sampler2d texture: roughness
795 SHADER_LOC_MAP_OCCLUSION, // Shader location: sampler2d texture: occlusion 808 SHADER_LOC_MAP_OCCLUSION, // Shader location: sampler2d texture: occlusion
796 SHADER_LOC_MAP_EMISSION, // Shader location: sampler2d texture: emission 809 SHADER_LOC_MAP_EMISSION, // Shader location: sampler2d texture: emission
797 SHADER_LOC_MAP_HEIGHT, // Shader location: sampler2d texture: height 810 SHADER_LOC_MAP_HEIGHT, // Shader location: sampler2d texture: heightmap
798 SHADER_LOC_MAP_CUBEMAP, // Shader location: samplerCube texture: cubemap 811 SHADER_LOC_MAP_CUBEMAP, // Shader location: samplerCube texture: cubemap
799 SHADER_LOC_MAP_IRRADIANCE, // Shader location: samplerCube texture: irradiance 812 SHADER_LOC_MAP_IRRADIANCE, // Shader location: samplerCube texture: irradiance
800 SHADER_LOC_MAP_PREFILTER, // Shader location: samplerCube texture: prefilter 813 SHADER_LOC_MAP_PREFILTER, // Shader location: samplerCube texture: prefilter
801 SHADER_LOC_MAP_BRDF, // Shader location: sampler2d texture: brdf 814 SHADER_LOC_MAP_BRDF, // Shader location: sampler2d texture: brdf
802 SHADER_LOC_VERTEX_BONEIDS, // Shader location: vertex attribute: boneIds 815 SHADER_LOC_VERTEX_BONEIDS, // Shader location: vertex attribute: bone indices
803 SHADER_LOC_VERTEX_BONEWEIGHTS, // Shader location: vertex attribute: boneWeights 816 SHADER_LOC_VERTEX_BONEWEIGHTS, // Shader location: vertex attribute: bone weights
804 SHADER_LOC_BONE_MATRICES // Shader location: array of matrices uniform: boneMatrices 817 SHADER_LOC_MATRIX_BONETRANSFORMS, // Shader location: matrix attribute: bone transforms (animation)
818 SHADER_LOC_VERTEX_INSTANCETRANSFORM // Shader location: vertex attribute: instance transforms
805 } ShaderLocationIndex; 819 } ShaderLocationIndex;
806 820
807 #define SHADER_LOC_MAP_DIFFUSE SHADER_LOC_MAP_ALBEDO 821 #define SHADER_LOC_MAP_DIFFUSE SHADER_LOC_MAP_ALBEDO
808 #define SHADER_LOC_MAP_SPECULAR SHADER_LOC_MAP_METALNESS 822 #define SHADER_LOC_MAP_SPECULAR SHADER_LOC_MAP_METALNESS
809 823
815 SHADER_UNIFORM_VEC4, // Shader uniform type: vec4 (4 float) 829 SHADER_UNIFORM_VEC4, // Shader uniform type: vec4 (4 float)
816 SHADER_UNIFORM_INT, // Shader uniform type: int 830 SHADER_UNIFORM_INT, // Shader uniform type: int
817 SHADER_UNIFORM_IVEC2, // Shader uniform type: ivec2 (2 int) 831 SHADER_UNIFORM_IVEC2, // Shader uniform type: ivec2 (2 int)
818 SHADER_UNIFORM_IVEC3, // Shader uniform type: ivec3 (3 int) 832 SHADER_UNIFORM_IVEC3, // Shader uniform type: ivec3 (3 int)
819 SHADER_UNIFORM_IVEC4, // Shader uniform type: ivec4 (4 int) 833 SHADER_UNIFORM_IVEC4, // Shader uniform type: ivec4 (4 int)
834 SHADER_UNIFORM_UINT, // Shader uniform type: unsigned int
835 SHADER_UNIFORM_UIVEC2, // Shader uniform type: uivec2 (2 unsigned int)
836 SHADER_UNIFORM_UIVEC3, // Shader uniform type: uivec3 (3 unsigned int)
837 SHADER_UNIFORM_UIVEC4, // Shader uniform type: uivec4 (4 unsigned int)
820 SHADER_UNIFORM_SAMPLER2D // Shader uniform type: sampler2d 838 SHADER_UNIFORM_SAMPLER2D // Shader uniform type: sampler2d
821 } ShaderUniformDataType; 839 } ShaderUniformDataType;
822 840
823 // Shader attribute data types 841 // Shader attribute data types
824 typedef enum { 842 typedef enum {
859 877
860 // Texture parameters: filter mode 878 // Texture parameters: filter mode
861 // NOTE 1: Filtering considers mipmaps if available in the texture 879 // NOTE 1: Filtering considers mipmaps if available in the texture
862 // NOTE 2: Filter is accordingly set for minification and magnification 880 // NOTE 2: Filter is accordingly set for minification and magnification
863 typedef enum { 881 typedef enum {
864 TEXTURE_FILTER_POINT = 0, // No filter, just pixel approximation 882 TEXTURE_FILTER_POINT = 0, // No filter, pixel approximation
865 TEXTURE_FILTER_BILINEAR, // Linear filtering 883 TEXTURE_FILTER_BILINEAR, // Linear filtering
866 TEXTURE_FILTER_TRILINEAR, // Trilinear filtering (linear with mipmaps) 884 TEXTURE_FILTER_TRILINEAR, // Trilinear filtering (linear with mipmaps)
867 TEXTURE_FILTER_ANISOTROPIC_4X, // Anisotropic filtering 4x 885 TEXTURE_FILTER_ANISOTROPIC_4X, // Anisotropic filtering 4x
868 TEXTURE_FILTER_ANISOTROPIC_8X, // Anisotropic filtering 8x 886 TEXTURE_FILTER_ANISOTROPIC_8X, // Anisotropic filtering 8x
869 TEXTURE_FILTER_ANISOTROPIC_16X, // Anisotropic filtering 16x 887 TEXTURE_FILTER_ANISOTROPIC_16X, // Anisotropic filtering 16x
947 // WARNING: These callbacks are intended for advanced users 965 // WARNING: These callbacks are intended for advanced users
948 typedef void (*TraceLogCallback)(int logLevel, const char *text, va_list args); // Logging: Redirect trace log messages 966 typedef void (*TraceLogCallback)(int logLevel, const char *text, va_list args); // Logging: Redirect trace log messages
949 typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, int *dataSize); // FileIO: Load binary data 967 typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, int *dataSize); // FileIO: Load binary data
950 typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, int dataSize); // FileIO: Save binary data 968 typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, int dataSize); // FileIO: Save binary data
951 typedef char *(*LoadFileTextCallback)(const char *fileName); // FileIO: Load text data 969 typedef char *(*LoadFileTextCallback)(const char *fileName); // FileIO: Load text data
952 typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileIO: Save text data 970 typedef bool (*SaveFileTextCallback)(const char *fileName, const char *text); // FileIO: Save text data
953 971
954 //------------------------------------------------------------------------------------ 972 //------------------------------------------------------------------------------------
955 // Global Variables Definition 973 // Global Variables Definition
956 //------------------------------------------------------------------------------------ 974 //------------------------------------------------------------------------------------
957 // It's lonely here... 975 // It's lonely here...
980 RLAPI void ClearWindowState(unsigned int flags); // Clear window configuration state flags 998 RLAPI void ClearWindowState(unsigned int flags); // Clear window configuration state flags
981 RLAPI void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed, resizes monitor to match window resolution 999 RLAPI void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed, resizes monitor to match window resolution
982 RLAPI void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed, resizes window to match monitor resolution 1000 RLAPI void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed, resizes window to match monitor resolution
983 RLAPI void MaximizeWindow(void); // Set window state: maximized, if resizable 1001 RLAPI void MaximizeWindow(void); // Set window state: maximized, if resizable
984 RLAPI void MinimizeWindow(void); // Set window state: minimized, if resizable 1002 RLAPI void MinimizeWindow(void); // Set window state: minimized, if resizable
985 RLAPI void RestoreWindow(void); // Set window state: not minimized/maximized 1003 RLAPI void RestoreWindow(void); // Restore window from being minimized/maximized
986 RLAPI void SetWindowIcon(Image image); // Set icon for window (single image, RGBA 32bit) 1004 RLAPI void SetWindowIcon(Image image); // Set icon for window (single image, RGBA 32bit)
987 RLAPI void SetWindowIcons(Image *images, int count); // Set icon for window (multiple images, RGBA 32bit) 1005 RLAPI void SetWindowIcons(Image *images, int count); // Set icon for window (multiple images, RGBA 32bit)
988 RLAPI void SetWindowTitle(const char *title); // Set title for window 1006 RLAPI void SetWindowTitle(const char *title); // Set title for window
989 RLAPI void SetWindowPosition(int x, int y); // Set window position on screen 1007 RLAPI void SetWindowPosition(int x, int y); // Set window position on screen
990 RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window 1008 RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window
1051 RLAPI Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations 1069 RLAPI Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations
1052 RLAPI Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations 1070 RLAPI Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations
1053 RLAPI bool IsShaderValid(Shader shader); // Check if a shader is valid (loaded on GPU) 1071 RLAPI bool IsShaderValid(Shader shader); // Check if a shader is valid (loaded on GPU)
1054 RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location 1072 RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
1055 RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location 1073 RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
1056 RLAPI void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value 1074 RLAPI void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value
1057 RLAPI void SetShaderValueV(Shader shader, int locIndex, const void *value, int uniformType, int count); // Set shader uniform value vector 1075 RLAPI void SetShaderValueV(Shader shader, int locIndex, const void *value, int uniformType, int count); // Set shader uniform value vector
1058 RLAPI void SetShaderValueMatrix(Shader shader, int locIndex, Matrix mat); // Set shader uniform value (matrix 4x4) 1076 RLAPI void SetShaderValueMatrix(Shader shader, int locIndex, Matrix mat); // Set shader uniform value (matrix 4x4)
1059 RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value for texture (sampler2d) 1077 RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value and bind the texture (sampler2d)
1060 RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) 1078 RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM)
1061 1079
1062 // Screen-space-related functions 1080 // Screen-space-related functions
1063 #define GetMouseRay GetScreenToWorldRay // Compatibility hack for previous raylib versions 1081 #define GetMouseRay GetScreenToWorldRay // Compatibility hack for previous raylib versions
1064 RLAPI Ray GetScreenToWorldRay(Vector2 position, Camera camera); // Get a ray trace from screen position (i.e mouse) 1082 RLAPI Ray GetScreenToWorldRay(Vector2 position, Camera camera); // Get a ray trace from screen position (i.e mouse)
1069 RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position 1087 RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
1070 RLAPI Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix) 1088 RLAPI Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
1071 RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix 1089 RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
1072 1090
1073 // Timing-related functions 1091 // Timing-related functions
1074 RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum) 1092 RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum)
1075 RLAPI float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time) 1093 RLAPI float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time)
1076 RLAPI double GetTime(void); // Get elapsed time in seconds since InitWindow() 1094 RLAPI double GetTime(void); // Get elapsed time in seconds since InitWindow()
1077 RLAPI int GetFPS(void); // Get current FPS 1095 RLAPI int GetFPS(void); // Get current FPS
1078 1096
1079 // Custom frame control functions 1097 // Custom frame control functions
1080 // NOTE: Those functions are intended for advanced users that want full control over the frame processing 1098 // NOTE: Those functions are intended for advanced users that want full control over the frame processing
1081 // By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents() 1099 // By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents()
1082 // To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL 1100 // To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
1083 RLAPI void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing) 1101 RLAPI void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
1084 RLAPI void PollInputEvents(void); // Register all input events 1102 RLAPI void PollInputEvents(void); // Register all input events
1085 RLAPI void WaitTime(double seconds); // Wait for some time (halt program execution) 1103 RLAPI void WaitTime(double seconds); // Wait for some time (halt program execution)
1086 1104
1087 // Random values generation functions 1105 // Random values generation functions
1088 RLAPI void SetRandomSeed(unsigned int seed); // Set the seed for the random number generator 1106 RLAPI void SetRandomSeed(unsigned int seed); // Set the seed for the random number generator
1089 RLAPI int GetRandomValue(int min, int max); // Get a random value between min and max (both included) 1107 RLAPI int GetRandomValue(int min, int max); // Get a random value between min and max (both included)
1090 RLAPI int *LoadRandomSequence(unsigned int count, int min, int max); // Load random values sequence, no values repeated 1108 RLAPI int *LoadRandomSequence(unsigned int count, int min, int max); // Load random values sequence, no values repeated
1091 RLAPI void UnloadRandomSequence(int *sequence); // Unload random values sequence 1109 RLAPI void UnloadRandomSequence(int *sequence); // Unload random values sequence
1092 1110
1093 // Misc. functions 1111 // Misc. functions
1094 RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (filename extension defines format) 1112 RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (filename extension defines format)
1095 RLAPI void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS) 1113 RLAPI void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS)
1096 RLAPI void OpenURL(const char *url); // Open URL with default system browser (if available) 1114 RLAPI void OpenURL(const char *url); // Open URL with default system browser (if available)
1097 1115
1098 // NOTE: Following functions implemented in module [utils] 1116 // Logging system
1099 //------------------------------------------------------------------ 1117 RLAPI void SetTraceLogLevel(int logLevel); // Set the current threshold (minimum) log level
1100 RLAPI void TraceLog(int logLevel, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...) 1118 RLAPI void TraceLog(int logLevel, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
1101 RLAPI void SetTraceLogLevel(int logLevel); // Set the current threshold (minimum) log level 1119 RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log
1102 RLAPI void *MemAlloc(unsigned int size); // Internal memory allocator 1120
1103 RLAPI void *MemRealloc(void *ptr, unsigned int size); // Internal memory reallocator 1121 // Memory management, using internal allocators
1104 RLAPI void MemFree(void *ptr); // Internal memory free 1122 RLAPI void *MemAlloc(unsigned int size); // Internal memory allocator
1105 1123 RLAPI void *MemRealloc(void *ptr, unsigned int size); // Internal memory reallocator
1106 // Set custom callbacks 1124 RLAPI void MemFree(void *ptr); // Internal memory free
1107 // WARNING: Callbacks setup is intended for advanced users 1125
1108 RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log 1126 // File system management functions
1109 RLAPI void SetLoadFileDataCallback(LoadFileDataCallback callback); // Set custom file binary data loader
1110 RLAPI void SetSaveFileDataCallback(SaveFileDataCallback callback); // Set custom file binary data saver
1111 RLAPI void SetLoadFileTextCallback(LoadFileTextCallback callback); // Set custom file text data loader
1112 RLAPI void SetSaveFileTextCallback(SaveFileTextCallback callback); // Set custom file text data saver
1113
1114 // Files management functions
1115 RLAPI unsigned char *LoadFileData(const char *fileName, int *dataSize); // Load file data as byte array (read) 1127 RLAPI unsigned char *LoadFileData(const char *fileName, int *dataSize); // Load file data as byte array (read)
1116 RLAPI void UnloadFileData(unsigned char *data); // Unload file data allocated by LoadFileData() 1128 RLAPI void UnloadFileData(unsigned char *data); // Unload file data allocated by LoadFileData()
1117 RLAPI bool SaveFileData(const char *fileName, void *data, int dataSize); // Save data to file from byte array (write), returns true on success 1129 RLAPI bool SaveFileData(const char *fileName, void *data, int dataSize); // Save data to file from byte array (write), returns true on success
1118 RLAPI bool ExportDataAsCode(const unsigned char *data, int dataSize, const char *fileName); // Export data to code (.h), returns true on success 1130 RLAPI bool ExportDataAsCode(const unsigned char *data, int dataSize, const char *fileName); // Export data to code (.h), returns true on success
1119 RLAPI char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string 1131 RLAPI char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string
1120 RLAPI void UnloadFileText(char *text); // Unload file text data allocated by LoadFileText() 1132 RLAPI void UnloadFileText(char *text); // Unload file text data allocated by LoadFileText()
1121 RLAPI bool SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success 1133 RLAPI bool SaveFileText(const char *fileName, const char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success
1122 //------------------------------------------------------------------ 1134
1123 1135 // File access custom callbacks
1124 // File system functions 1136 // WARNING: Callbacks setup is intended for advanced users
1125 RLAPI bool FileExists(const char *fileName); // Check if file exists 1137 RLAPI void SetLoadFileDataCallback(LoadFileDataCallback callback); // Set custom file binary data loader
1126 RLAPI bool DirectoryExists(const char *dirPath); // Check if a directory path exists 1138 RLAPI void SetSaveFileDataCallback(SaveFileDataCallback callback); // Set custom file binary data saver
1127 RLAPI bool IsFileExtension(const char *fileName, const char *ext); // Check file extension (including point: .png, .wav) 1139 RLAPI void SetLoadFileTextCallback(LoadFileTextCallback callback); // Set custom file text data loader
1128 RLAPI int GetFileLength(const char *fileName); // Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h) 1140 RLAPI void SetSaveFileTextCallback(SaveFileTextCallback callback); // Set custom file text data saver
1129 RLAPI const char *GetFileExtension(const char *fileName); // Get pointer to extension for a filename string (includes dot: '.png') 1141
1130 RLAPI const char *GetFileName(const char *filePath); // Get pointer to filename for a path string 1142 RLAPI int FileRename(const char *fileName, const char *fileRename); // Rename file (if exists)
1131 RLAPI const char *GetFileNameWithoutExt(const char *filePath); // Get filename string without extension (uses static string) 1143 RLAPI int FileRemove(const char *fileName); // Remove file (if exists)
1132 RLAPI const char *GetDirectoryPath(const char *filePath); // Get full path for a given fileName with path (uses static string) 1144 RLAPI int FileCopy(const char *srcPath, const char *dstPath); // Copy file from one path to another, dstPath created if it doesn't exist
1133 RLAPI const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string) 1145 RLAPI int FileMove(const char *srcPath, const char *dstPath); // Move file from one directory to another, dstPath created if it doesn't exist
1134 RLAPI const char *GetWorkingDirectory(void); // Get current working directory (uses static string) 1146 RLAPI int FileTextReplace(const char *fileName, const char *search, const char *replacement); // Replace text in an existing file
1135 RLAPI const char *GetApplicationDirectory(void); // Get the directory of the running application (uses static string) 1147 RLAPI int FileTextFindIndex(const char *fileName, const char *search); // Find text in existing file
1136 RLAPI int MakeDirectory(const char *dirPath); // Create directories (including full path requested), returns 0 on success 1148 RLAPI bool FileExists(const char *fileName); // Check if file exists
1137 RLAPI bool ChangeDirectory(const char *dir); // Change working directory, return true on success 1149 RLAPI bool DirectoryExists(const char *dirPath); // Check if a directory path exists
1138 RLAPI bool IsPathFile(const char *path); // Check if a given path is a file or a directory 1150 RLAPI bool IsFileExtension(const char *fileName, const char *ext); // Check file extension (recommended include point: .png, .wav)
1139 RLAPI bool IsFileNameValid(const char *fileName); // Check if fileName is valid for the platform/OS 1151 RLAPI int GetFileLength(const char *fileName); // Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
1140 RLAPI FilePathList LoadDirectoryFiles(const char *dirPath); // Load directory filepaths 1152 RLAPI long GetFileModTime(const char *fileName); // Get file modification time (last write time)
1141 RLAPI 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 1153 RLAPI const char *GetFileExtension(const char *fileName); // Get pointer to extension for a filename string (includes dot: '.png')
1142 RLAPI void UnloadDirectoryFiles(FilePathList files); // Unload filepaths 1154 RLAPI const char *GetFileName(const char *filePath); // Get pointer to filename for a path string
1143 RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window 1155 RLAPI const char *GetFileNameWithoutExt(const char *filePath); // Get filename string without extension (uses static string)
1144 RLAPI FilePathList LoadDroppedFiles(void); // Load dropped filepaths 1156 RLAPI const char *GetDirectoryPath(const char *filePath); // Get full path for a given fileName with path (uses static string)
1145 RLAPI void UnloadDroppedFiles(FilePathList files); // Unload dropped filepaths 1157 RLAPI const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
1146 RLAPI long GetFileModTime(const char *fileName); // Get file modification time (last write time) 1158 RLAPI const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
1159 RLAPI const char *GetApplicationDirectory(void); // Get the directory of the running application (uses static string)
1160 RLAPI int MakeDirectory(const char *dirPath); // Create directories (including full path requested), returns 0 on success
1161 RLAPI bool ChangeDirectory(const char *dirPath); // Change working directory, return true on success
1162 RLAPI bool IsPathFile(const char *path); // Check if a given path is a file or a directory
1163 RLAPI bool IsFileNameValid(const char *fileName); // Check if fileName is valid for the platform/OS
1164 RLAPI FilePathList LoadDirectoryFiles(const char *dirPath); // Load directory filepaths, files and directories, no subdirs scan
1165 RLAPI FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and subdir scan; some filters available: "*.*", "FILES*", "DIRS*"
1166 RLAPI void UnloadDirectoryFiles(FilePathList files); // Unload filepaths
1167 RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window
1168 RLAPI FilePathList LoadDroppedFiles(void); // Load dropped filepaths
1169 RLAPI void UnloadDroppedFiles(FilePathList files); // Unload dropped filepaths
1170 RLAPI unsigned int GetDirectoryFileCount(const char *dirPath); // Get the file count in a directory
1171 RLAPI unsigned int GetDirectoryFileCountEx(const char *basePath, const char *filter, bool scanSubdirs); // Get the file count in a directory with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result
1147 1172
1148 // Compression/Encoding functionality 1173 // Compression/Encoding functionality
1149 RLAPI unsigned char *CompressData(const unsigned char *data, int dataSize, int *compDataSize); // Compress data (DEFLATE algorithm), memory must be MemFree() 1174 RLAPI unsigned char *CompressData(const unsigned char *data, int dataSize, int *compDataSize); // Compress data (DEFLATE algorithm), memory must be MemFree()
1150 RLAPI unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // Decompress data (DEFLATE algorithm), memory must be MemFree() 1175 RLAPI unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // Decompress data (DEFLATE algorithm), memory must be MemFree()
1151 RLAPI char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string, memory must be MemFree() 1176 RLAPI char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string (includes NULL terminator), memory must be MemFree()
1152 RLAPI unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize); // Decode Base64 string data, memory must be MemFree() 1177 RLAPI unsigned char *DecodeDataBase64(const char *text, int *outputSize); // Decode Base64 string (expected NULL terminated), memory must be MemFree()
1153 RLAPI unsigned int ComputeCRC32(unsigned char *data, int dataSize); // Compute CRC32 hash code 1178 RLAPI unsigned int ComputeCRC32(unsigned char *data, int dataSize); // Compute CRC32 hash code
1154 RLAPI unsigned int *ComputeMD5(unsigned char *data, int dataSize); // Compute MD5 hash code, returns static int[4] (16 bytes) 1179 RLAPI unsigned int *ComputeMD5(unsigned char *data, int dataSize); // Compute MD5 hash code, returns static int[4] (16 bytes)
1155 RLAPI unsigned int *ComputeSHA1(unsigned char *data, int dataSize); // Compute SHA1 hash code, returns static int[5] (20 bytes) 1180 RLAPI unsigned int *ComputeSHA1(unsigned char *data, int dataSize); // Compute SHA1 hash code, returns static int[5] (20 bytes)
1156 1181 RLAPI unsigned int *ComputeSHA256(unsigned char *data, int dataSize); // Compute SHA256 hash code, returns static int[8] (32 bytes)
1157 1182
1158 // Automation events functionality 1183 // Automation events functionality
1159 RLAPI AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS 1184 RLAPI AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
1160 RLAPI void UnloadAutomationEventList(AutomationEventList list); // Unload automation events list from file 1185 RLAPI void UnloadAutomationEventList(AutomationEventList list); // Unload automation events list from file
1161 RLAPI bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file 1186 RLAPI bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file
1162 RLAPI void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to 1187 RLAPI void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to
1163 RLAPI void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording 1188 RLAPI void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording
1164 RLAPI void StartAutomationEventRecording(void); // Start recording automation events (AutomationEventList must be set) 1189 RLAPI void StartAutomationEventRecording(void); // Start recording automation events (AutomationEventList must be set)
1165 RLAPI void StopAutomationEventRecording(void); // Stop recording automation events 1190 RLAPI void StopAutomationEventRecording(void); // Stop recording automation events
1166 RLAPI void PlayAutomationEvent(AutomationEvent event); // Play a recorded automation event 1191 RLAPI void PlayAutomationEvent(AutomationEvent event); // Play a recorded automation event
1167 1192
1168 //------------------------------------------------------------------------------------ 1193 //------------------------------------------------------------------------------------
1169 // Input Handling Functions (Module: core) 1194 // Input Handling Functions (Module: core)
1170 //------------------------------------------------------------------------------------ 1195 //------------------------------------------------------------------------------------
1171 1196
1175 RLAPI bool IsKeyDown(int key); // Check if a key is being pressed 1200 RLAPI bool IsKeyDown(int key); // Check if a key is being pressed
1176 RLAPI bool IsKeyReleased(int key); // Check if a key has been released once 1201 RLAPI bool IsKeyReleased(int key); // Check if a key has been released once
1177 RLAPI bool IsKeyUp(int key); // Check if a key is NOT being pressed 1202 RLAPI bool IsKeyUp(int key); // Check if a key is NOT being pressed
1178 RLAPI int GetKeyPressed(void); // Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty 1203 RLAPI int GetKeyPressed(void); // Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
1179 RLAPI int GetCharPressed(void); // Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty 1204 RLAPI int GetCharPressed(void); // Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
1205 RLAPI const char *GetKeyName(int key); // Get name of a QWERTY key on the current keyboard layout (eg returns string 'q' for KEY_A on an AZERTY keyboard)
1180 RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC) 1206 RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
1181 1207
1182 // Input-related functions: gamepads 1208 // Input-related functions: gamepads
1183 RLAPI bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available 1209 RLAPI bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available
1184 RLAPI const char *GetGamepadName(int gamepad); // Get gamepad internal name id 1210 RLAPI const char *GetGamepadName(int gamepad); // Get gamepad internal name id
1185 RLAPI bool IsGamepadButtonPressed(int gamepad, int button); // Check if a gamepad button has been pressed once 1211 RLAPI bool IsGamepadButtonPressed(int gamepad, int button); // Check if a gamepad button has been pressed once
1186 RLAPI bool IsGamepadButtonDown(int gamepad, int button); // Check if a gamepad button is being pressed 1212 RLAPI bool IsGamepadButtonDown(int gamepad, int button); // Check if a gamepad button is being pressed
1187 RLAPI bool IsGamepadButtonReleased(int gamepad, int button); // Check if a gamepad button has been released once 1213 RLAPI bool IsGamepadButtonReleased(int gamepad, int button); // Check if a gamepad button has been released once
1188 RLAPI bool IsGamepadButtonUp(int gamepad, int button); // Check if a gamepad button is NOT being pressed 1214 RLAPI bool IsGamepadButtonUp(int gamepad, int button); // Check if a gamepad button is NOT being pressed
1189 RLAPI int GetGamepadButtonPressed(void); // Get the last gamepad button pressed 1215 RLAPI int GetGamepadButtonPressed(void); // Get the last gamepad button pressed
1190 RLAPI int GetGamepadAxisCount(int gamepad); // Get gamepad axis count for a gamepad 1216 RLAPI int GetGamepadAxisCount(int gamepad); // Get axis count for a gamepad
1191 RLAPI float GetGamepadAxisMovement(int gamepad, int axis); // Get axis movement value for a gamepad axis 1217 RLAPI float GetGamepadAxisMovement(int gamepad, int axis); // Get movement value for a gamepad axis
1192 RLAPI int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB) 1218 RLAPI int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB)
1193 RLAPI void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration); // Set gamepad vibration for both motors (duration in seconds) 1219 RLAPI void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration); // Set gamepad vibration for both motors (duration in seconds)
1194 1220
1195 // Input-related functions: mouse 1221 // Input-related functions: mouse
1196 RLAPI bool IsMouseButtonPressed(int button); // Check if a mouse button has been pressed once 1222 RLAPI bool IsMouseButtonPressed(int button); // Check if a mouse button has been pressed once
1197 RLAPI bool IsMouseButtonDown(int button); // Check if a mouse button is being pressed 1223 RLAPI bool IsMouseButtonDown(int button); // Check if a mouse button is being pressed
1216 RLAPI int GetTouchPointCount(void); // Get number of touch points 1242 RLAPI int GetTouchPointCount(void); // Get number of touch points
1217 1243
1218 //------------------------------------------------------------------------------------ 1244 //------------------------------------------------------------------------------------
1219 // Gestures and Touch Handling Functions (Module: rgestures) 1245 // Gestures and Touch Handling Functions (Module: rgestures)
1220 //------------------------------------------------------------------------------------ 1246 //------------------------------------------------------------------------------------
1221 RLAPI void SetGesturesEnabled(unsigned int flags); // Enable a set of gestures using flags 1247 RLAPI void SetGesturesEnabled(unsigned int flags); // Enable a set of gestures using flags
1222 RLAPI bool IsGestureDetected(unsigned int gesture); // Check if a gesture have been detected 1248 RLAPI bool IsGestureDetected(unsigned int gesture); // Check if a gesture have been detected
1223 RLAPI int GetGestureDetected(void); // Get latest detected gesture 1249 RLAPI int GetGestureDetected(void); // Get latest detected gesture
1224 RLAPI float GetGestureHoldDuration(void); // Get gesture hold time in seconds 1250 RLAPI float GetGestureHoldDuration(void); // Get gesture hold time in seconds
1225 RLAPI Vector2 GetGestureDragVector(void); // Get gesture drag vector 1251 RLAPI Vector2 GetGestureDragVector(void); // Get gesture drag vector
1226 RLAPI float GetGestureDragAngle(void); // Get gesture drag angle 1252 RLAPI float GetGestureDragAngle(void); // Get gesture drag angle
1227 RLAPI Vector2 GetGesturePinchVector(void); // Get gesture pinch delta 1253 RLAPI Vector2 GetGesturePinchVector(void); // Get gesture pinch delta
1228 RLAPI float GetGesturePinchAngle(void); // Get gesture pinch angle 1254 RLAPI float GetGesturePinchAngle(void); // Get gesture pinch angle
1229 1255
1230 //------------------------------------------------------------------------------------ 1256 //------------------------------------------------------------------------------------
1231 // Camera System Functions (Module: rcamera) 1257 // Camera System Functions (Module: rcamera)
1232 //------------------------------------------------------------------------------------ 1258 //------------------------------------------------------------------------------------
1233 RLAPI void UpdateCamera(Camera *camera, int mode); // Update camera position for selected mode 1259 RLAPI void UpdateCamera(Camera *camera, int mode); // Update camera position for selected mode
1234 RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom); // Update camera movement/rotation 1260 RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom); // Update camera movement/rotation
1235 1261
1236 //------------------------------------------------------------------------------------ 1262 //------------------------------------------------------------------------------------
1237 // Basic Shapes Drawing Functions (Module: shapes) 1263 // Basic Shapes Drawing Functions (Module: shapes)
1238 //------------------------------------------------------------------------------------ 1264 //------------------------------------------------------------------------------------
1239 // Set texture and rectangle to be used on shapes drawing 1265 // Set texture and rectangle to be used on shapes drawing
1240 // NOTE: It can be useful when using basic shapes and one single font, 1266 // NOTE: It can be useful when using basic shapes and one single font,
1241 // defining a font char white rectangle would allow drawing everything in a single draw call 1267 // defining a font char white rectangle would allow drawing everything in a single draw call
1242 RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing 1268 RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing
1243 RLAPI Texture2D GetShapesTexture(void); // Get texture that is used for shapes drawing 1269 RLAPI Texture2D GetShapesTexture(void); // Get texture that is used for shapes drawing
1244 RLAPI Rectangle GetShapesTextureRectangle(void); // Get texture source rectangle that is used for shapes drawing 1270 RLAPI Rectangle GetShapesTextureRectangle(void); // Get texture source rectangle that is used for shapes drawing
1245 1271
1246 // Basic shapes drawing functions 1272 // Basic shapes drawing functions
1247 RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel using geometry [Can be slow, use with care] 1273 RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel using geometry [Can be slow, use with care]
1248 RLAPI void DrawPixelV(Vector2 position, Color color); // Draw a pixel using geometry (Vector version) [Can be slow, use with care] 1274 RLAPI void DrawPixelV(Vector2 position, Color color); // Draw a pixel using geometry (Vector version) [Can be slow, use with care]
1249 RLAPI void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line 1275 RLAPI void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line
1250 RLAPI void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (using gl lines) 1276 RLAPI void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (using gl lines)
1251 RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line (using triangles/quads) 1277 RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line (using triangles/quads)
1252 RLAPI void DrawLineStrip(const Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines) 1278 RLAPI void DrawLineStrip(const Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
1253 RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation 1279 RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation
1280 RLAPI void DrawLineDashed(Vector2 startPos, Vector2 endPos, int dashSize, int spaceSize, Color color); // Draw a dashed line
1254 RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle 1281 RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
1255 RLAPI void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle 1282 RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
1283 RLAPI void DrawCircleGradient(Vector2 center, float radius, Color inner, Color outer); // Draw a gradient-filled circle
1284 RLAPI void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
1256 RLAPI void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline 1285 RLAPI void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
1257 RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color inner, Color outer); // Draw a gradient-filled circle
1258 RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
1259 RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline 1286 RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
1260 RLAPI void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version) 1287 RLAPI void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version)
1261 RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse 1288 RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse
1289 RLAPI void DrawEllipseV(Vector2 center, float radiusH, float radiusV, Color color); // Draw ellipse (Vector version)
1262 RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline 1290 RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
1291 RLAPI void DrawEllipseLinesV(Vector2 center, float radiusH, float radiusV, Color color); // Draw ellipse outline (Vector version)
1263 RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring 1292 RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring
1264 RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring outline 1293 RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring outline
1265 RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle 1294 RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
1266 RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version) 1295 RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
1267 RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle 1296 RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
1268 RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters 1297 RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
1269 RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); // Draw a vertical-gradient-filled rectangle 1298 RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); // Draw a vertical-gradient-filled rectangle
1270 RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); // Draw a horizontal-gradient-filled rectangle 1299 RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); // Draw a horizontal-gradient-filled rectangle
1271 RLAPI void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color topRight, Color bottomRight); // Draw a gradient-filled rectangle with custom vertex colors 1300 RLAPI void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color bottomRight, Color topRight); // Draw a gradient-filled rectangle with custom vertex colors
1272 RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline 1301 RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
1273 RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters 1302 RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters
1274 RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges 1303 RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
1275 RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle lines with rounded edges 1304 RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle lines with rounded edges
1276 RLAPI void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline 1305 RLAPI void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
1281 RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version) 1310 RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
1282 RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides 1311 RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
1283 RLAPI void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters 1312 RLAPI void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters
1284 1313
1285 // Splines drawing functions 1314 // Splines drawing functions
1286 RLAPI void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points 1315 RLAPI void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
1287 RLAPI void DrawSplineBasis(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points 1316 RLAPI void DrawSplineBasis(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
1288 RLAPI void DrawSplineCatmullRom(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points 1317 RLAPI void DrawSplineCatmullRom(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
1289 RLAPI 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...] 1318 RLAPI 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...]
1290 RLAPI 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...] 1319 RLAPI 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...]
1291 RLAPI void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); // Draw spline segment: Linear, 2 points 1320 RLAPI void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); // Draw spline segment: Linear, 2 points
1292 RLAPI void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: B-Spline, 4 points 1321 RLAPI void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: B-Spline, 4 points
1293 RLAPI void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: Catmull-Rom, 4 points 1322 RLAPI void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: Catmull-Rom, 4 points
1294 RLAPI void DrawSplineSegmentBezierQuadratic(Vector2 p1, Vector2 c2, Vector2 p3, float thick, Color color); // Draw spline segment: Quadratic Bezier, 2 points, 1 control point 1323 RLAPI void DrawSplineSegmentBezierQuadratic(Vector2 p1, Vector2 c2, Vector2 p3, float thick, Color color); // Draw spline segment: Quadratic Bezier, 2 points, 1 control point
1295 RLAPI void DrawSplineSegmentBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float thick, Color color); // Draw spline segment: Cubic Bezier, 2 points, 2 control points 1324 RLAPI void DrawSplineSegmentBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float thick, Color color); // Draw spline segment: Cubic Bezier, 2 points, 2 control points
1328 RLAPI Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data 1357 RLAPI Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data
1329 RLAPI Image LoadImageFromScreen(void); // Load image from screen buffer and (screenshot) 1358 RLAPI Image LoadImageFromScreen(void); // Load image from screen buffer and (screenshot)
1330 RLAPI bool IsImageValid(Image image); // Check if an image is valid (data and parameters) 1359 RLAPI bool IsImageValid(Image image); // Check if an image is valid (data and parameters)
1331 RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM) 1360 RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM)
1332 RLAPI bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success 1361 RLAPI bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success
1333 RLAPI unsigned char *ExportImageToMemory(Image image, const char *fileType, int *fileSize); // Export image to memory buffer 1362 RLAPI unsigned char *ExportImageToMemory(Image image, const char *fileType, int *fileSize); // Export image to memory buffer, memory must be MemFree()
1334 RLAPI bool ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes, returns true on success 1363 RLAPI bool ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes, returns true on success
1335 1364
1336 // Image generation functions 1365 // Image generation functions
1337 RLAPI Image GenImageColor(int width, int height, Color color); // Generate image: plain color 1366 RLAPI Image GenImageColor(int width, int height, Color color); // Generate image: plain color
1338 RLAPI Image GenImageGradientLinear(int width, int height, int direction, Color start, Color end); // Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient 1367 RLAPI Image GenImageGradientLinear(int width, int height, int direction, Color start, Color end); // Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient
1358 RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image 1387 RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
1359 RLAPI void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel 1388 RLAPI void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
1360 RLAPI void ImageBlurGaussian(Image *image, int blurSize); // Apply Gaussian blur using a box blur approximation 1389 RLAPI void ImageBlurGaussian(Image *image, int blurSize); // Apply Gaussian blur using a box blur approximation
1361 RLAPI void ImageKernelConvolution(Image *image, const float *kernel, int kernelSize); // Apply custom square convolution kernel to image 1390 RLAPI void ImageKernelConvolution(Image *image, const float *kernel, int kernelSize); // Apply custom square convolution kernel to image
1362 RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm) 1391 RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
1363 RLAPI void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm) 1392 RLAPI void ImageResizeNN(Image *image, int newWidth, int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
1364 RLAPI void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color 1393 RLAPI void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
1365 RLAPI void ImageMipmaps(Image *image); // Compute all mipmap levels for a provided image 1394 RLAPI void ImageMipmaps(Image *image); // Compute all mipmap levels for a provided image
1366 RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering) 1395 RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
1367 RLAPI void ImageFlipVertical(Image *image); // Flip image vertically 1396 RLAPI void ImageFlipVertical(Image *image); // Flip image vertically
1368 RLAPI void ImageFlipHorizontal(Image *image); // Flip image horizontally 1397 RLAPI void ImageFlipHorizontal(Image *image); // Flip image horizontally
1399 RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image 1428 RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
1400 RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image 1429 RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
1401 RLAPI void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image 1430 RLAPI void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image
1402 RLAPI void ImageDrawTriangleEx(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image 1431 RLAPI void ImageDrawTriangleEx(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image
1403 RLAPI void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image 1432 RLAPI void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image
1404 RLAPI 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) 1433 RLAPI void ImageDrawTriangleFan(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center)
1405 RLAPI void ImageDrawTriangleStrip(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image 1434 RLAPI void ImageDrawTriangleStrip(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image
1406 RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source) 1435 RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source)
1407 RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination) 1436 RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination)
1408 RLAPI 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) 1437 RLAPI 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)
1409 1438
1410 // Texture loading functions 1439 // Texture loading functions
1415 RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer) 1444 RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer)
1416 RLAPI bool IsTextureValid(Texture2D texture); // Check if a texture is valid (loaded in GPU) 1445 RLAPI bool IsTextureValid(Texture2D texture); // Check if a texture is valid (loaded in GPU)
1417 RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM) 1446 RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
1418 RLAPI bool IsRenderTextureValid(RenderTexture2D target); // Check if a render texture is valid (loaded in GPU) 1447 RLAPI bool IsRenderTextureValid(RenderTexture2D target); // Check if a render texture is valid (loaded in GPU)
1419 RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM) 1448 RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
1420 RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data 1449 RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data (pixels should be able to fill texture)
1421 RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data 1450 RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data (pixels and rec should fit in texture)
1422 1451
1423 // Texture configuration functions 1452 // Texture configuration functions
1424 RLAPI void GenTextureMipmaps(Texture2D *texture); // Generate GPU mipmaps for a texture 1453 RLAPI void GenTextureMipmaps(Texture2D *texture); // Generate GPU mipmaps for a texture
1425 RLAPI void SetTextureFilter(Texture2D texture, int filter); // Set texture scaling filter mode 1454 RLAPI void SetTextureFilter(Texture2D texture, int filter); // Set texture scaling filter mode
1426 RLAPI void SetTextureWrap(Texture2D texture, int wrap); // Set texture wrapping mode 1455 RLAPI void SetTextureWrap(Texture2D texture, int wrap); // Set texture wrapping mode
1457 //------------------------------------------------------------------------------------ 1486 //------------------------------------------------------------------------------------
1458 1487
1459 // Font loading/unloading functions 1488 // Font loading/unloading functions
1460 RLAPI Font GetFontDefault(void); // Get the default Font 1489 RLAPI Font GetFontDefault(void); // Get the default Font
1461 RLAPI Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM) 1490 RLAPI Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
1462 RLAPI 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 1491 RLAPI Font LoadFontEx(const char *fileName, int fontSize, const 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
1463 RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style) 1492 RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
1464 RLAPI 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' 1493 RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, const int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
1465 RLAPI bool IsFontValid(Font font); // Check if a font is valid (font data loaded, WARNING: GPU texture not checked) 1494 RLAPI bool IsFontValid(Font font); // Check if a font is valid (font data loaded, WARNING: GPU texture not checked)
1466 RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use 1495 RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, const int *codepoints, int codepointCount, int type, int *glyphCount); // Load font data for further use
1467 RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info 1496 RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
1468 RLAPI void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM) 1497 RLAPI void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM)
1469 RLAPI void UnloadFont(Font font); // Unload font from GPU memory (VRAM) 1498 RLAPI void UnloadFont(Font font); // Unload font from GPU memory (VRAM)
1470 RLAPI bool ExportFontAsCode(Font font, const char *fileName); // Export font as code file, returns true on success 1499 RLAPI bool ExportFontAsCode(Font font, const char *fileName); // Export font as code file, returns true on success
1471 1500
1479 1508
1480 // Text font info functions 1509 // Text font info functions
1481 RLAPI void SetTextLineSpacing(int spacing); // Set vertical line spacing when drawing with line-breaks 1510 RLAPI void SetTextLineSpacing(int spacing); // Set vertical line spacing when drawing with line-breaks
1482 RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font 1511 RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font
1483 RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font 1512 RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
1513 RLAPI Vector2 MeasureTextCodepoints(Font font, const int *codepoints, int length, float fontSize, float spacing); // Measure string size for an existing array of codepoints for Font
1484 RLAPI int GetGlyphIndex(Font font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found 1514 RLAPI int GetGlyphIndex(Font font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
1485 RLAPI GlyphInfo GetGlyphInfo(Font font, int codepoint); // Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found 1515 RLAPI GlyphInfo GetGlyphInfo(Font font, int codepoint); // Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found
1486 RLAPI Rectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found 1516 RLAPI Rectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
1487 1517
1488 // Text codepoints management functions (unicode characters) 1518 // Text codepoints management functions (unicode characters)
1489 RLAPI char *LoadUTF8(const int *codepoints, int length); // Load UTF-8 text encoded from codepoints array 1519 RLAPI char *LoadUTF8(const int *codepoints, int length); // Load UTF-8 text encoded from codepoints array
1490 RLAPI void UnloadUTF8(char *text); // Unload UTF-8 text encoded from codepoints array 1520 RLAPI void UnloadUTF8(char *text); // Unload UTF-8 text encoded from codepoints array
1491 RLAPI int *LoadCodepoints(const char *text, int *count); // Load all codepoints from a UTF-8 text string, codepoints count returned by parameter 1521 RLAPI int *LoadCodepoints(const char *text, int *count); // Load all codepoints from a UTF-8 text string, codepoints count returned by parameter
1492 RLAPI void UnloadCodepoints(int *codepoints); // Unload codepoints data from memory 1522 RLAPI void UnloadCodepoints(int *codepoints); // Unload codepoints data from memory
1493 RLAPI int GetCodepointCount(const char *text); // Get total number of codepoints in a UTF-8 encoded string 1523 RLAPI int GetCodepointCount(const char *text); // Get total number of codepoints in a UTF-8 encoded string
1494 RLAPI int GetCodepoint(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure 1524 RLAPI int GetCodepoint(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
1495 RLAPI int GetCodepointNext(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure 1525 RLAPI int GetCodepointNext(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
1496 RLAPI int GetCodepointPrevious(const char *text, int *codepointSize); // Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure 1526 RLAPI int GetCodepointPrevious(const char *text, int *codepointSize); // Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
1497 RLAPI const char *CodepointToUTF8(int codepoint, int *utf8Size); // Encode one codepoint into UTF-8 byte array (array length returned as parameter) 1527 RLAPI const char *CodepointToUTF8(int codepoint, int *utf8Size); // Encode one codepoint into UTF-8 byte array (array length returned as parameter)
1498 1528
1499 // Text strings management functions (no UTF-8 strings, only byte chars) 1529 // Text strings management functions (no UTF-8 strings, only byte chars)
1500 // NOTE: Some strings allocate memory internally for returned strings, just be careful! 1530 // WARNING 1: Most of these functions use internal static buffers[], it's recommended to store returned data on user-side for re-use
1531 // WARNING 2: Some functions allocate memory internally for the returned strings, those strings must be freed by user using MemFree()
1532 RLAPI char **LoadTextLines(const char *text, int *count); // Load text as separate lines ('\n')
1533 RLAPI void UnloadTextLines(char **text, int lineCount); // Unload text lines
1501 RLAPI int TextCopy(char *dst, const char *src); // Copy one string to another, returns bytes copied 1534 RLAPI int TextCopy(char *dst, const char *src); // Copy one string to another, returns bytes copied
1502 RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text string are equal 1535 RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text string are equal
1503 RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending 1536 RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
1504 RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf() style) 1537 RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf() style)
1505 RLAPI const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string 1538 RLAPI const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string
1506 RLAPI char *TextReplace(const char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!) 1539 RLAPI const char *TextRemoveSpaces(const char *text); // Remove text spaces, concat words
1507 RLAPI char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (WARNING: memory must be freed!) 1540 RLAPI char *GetTextBetween(const char *text, const char *begin, const char *end); // Get text between two strings
1508 RLAPI const char *TextJoin(const char **textList, int count, const char *delimiter); // Join text strings with delimiter 1541 RLAPI char *TextReplace(const char *text, const char *search, const char *replacement); // Replace text string with new string
1509 RLAPI const char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings 1542 RLAPI char *TextReplaceAlloc(const char *text, const char *search, const char *replacement); // Replace text string with new string, memory must be MemFree()
1510 RLAPI void TextAppend(char *text, const char *append, int *position); // Append text at specific position and move cursor! 1543 RLAPI char *TextReplaceBetween(const char *text, const char *begin, const char *end, const char *replacement); // Replace text between two specific strings
1511 RLAPI int TextFindIndex(const char *text, const char *find); // Find first text occurrence within a string 1544 RLAPI char *TextReplaceBetweenAlloc(const char *text, const char *begin, const char *end, const char *replacement); // Replace text between two specific strings, memory must be MemFree()
1512 RLAPI const char *TextToUpper(const char *text); // Get upper case version of provided string 1545 RLAPI char *TextInsert(const char *text, const char *insert, int position); // Insert text in a defined byte position
1513 RLAPI const char *TextToLower(const char *text); // Get lower case version of provided string 1546 RLAPI char *TextInsertAlloc(const char *text, const char *insert, int position); // Insert text in a defined byte position, memory must be MemFree()
1514 RLAPI const char *TextToPascal(const char *text); // Get Pascal case notation version of provided string 1547 RLAPI char *TextJoin(char **textList, int count, const char *delimiter); // Join text strings with delimiter
1515 RLAPI const char *TextToSnake(const char *text); // Get Snake case notation version of provided string 1548 RLAPI char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings, using MAX_TEXTSPLIT_COUNT static strings
1516 RLAPI const char *TextToCamel(const char *text); // Get Camel case notation version of provided string 1549 RLAPI void TextAppend(char *text, const char *append, int *position); // Append text at specific position and move cursor
1517 1550 RLAPI int TextFindIndex(const char *text, const char *search); // Find first text occurrence within a string, -1 if not found
1518 RLAPI int TextToInteger(const char *text); // Get integer value from text (negative values not supported) 1551 RLAPI char *TextToUpper(const char *text); // Get upper case version of provided string
1519 RLAPI float TextToFloat(const char *text); // Get float value from text (negative values not supported) 1552 RLAPI char *TextToLower(const char *text); // Get lower case version of provided string
1553 RLAPI char *TextToPascal(const char *text); // Get Pascal case notation version of provided string
1554 RLAPI char *TextToSnake(const char *text); // Get Snake case notation version of provided string
1555 RLAPI char *TextToCamel(const char *text); // Get Camel case notation version of provided string
1556 RLAPI int TextToInteger(const char *text); // Get integer value from text
1557 RLAPI float TextToFloat(const char *text); // Get float value from text
1520 1558
1521 //------------------------------------------------------------------------------------ 1559 //------------------------------------------------------------------------------------
1522 // Basic 3d Shapes Drawing Functions (Module: models) 1560 // Basic 3d Shapes Drawing Functions (Module: models)
1523 //------------------------------------------------------------------------------------ 1561 //------------------------------------------------------------------------------------
1524 1562
1559 // Model drawing functions 1597 // Model drawing functions
1560 RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) 1598 RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
1561 RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters 1599 RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters
1562 RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set) 1600 RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set)
1563 RLAPI 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 1601 RLAPI 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
1564 RLAPI void DrawModelPoints(Model model, Vector3 position, float scale, Color tint); // Draw a model as points
1565 RLAPI void DrawModelPointsEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model as points with extended parameters
1566 RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) 1602 RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires)
1567 RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a billboard texture 1603 RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a billboard texture
1568 RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source 1604 RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
1569 RLAPI 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 1605 RLAPI 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
1570 1606
1571 // Mesh management functions 1607 // Mesh management functions
1572 RLAPI void UploadMesh(Mesh *mesh, bool dynamic); // Upload mesh vertex data in GPU and provide VAO/VBO ids 1608 RLAPI void UploadMesh(Mesh *mesh, bool dynamic); // Upload mesh vertex data in GPU and provide VAO/VBO ids
1600 RLAPI void SetMaterialTexture(Material *material, int mapType, Texture2D texture); // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...) 1636 RLAPI void SetMaterialTexture(Material *material, int mapType, Texture2D texture); // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
1601 RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh 1637 RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh
1602 1638
1603 // Model animations loading/unloading functions 1639 // Model animations loading/unloading functions
1604 RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file 1640 RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file
1605 RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose (CPU) 1641 RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, float frame); // Update model animation pose (vertex buffers and bone matrices)
1606 RLAPI void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame); // Update model animation mesh bone matrices (GPU skinning) 1642 RLAPI void UpdateModelAnimationEx(Model model, ModelAnimation animA, float frameA, ModelAnimation animB, float frameB, float blend); // Update model animation pose, blending two animations
1607 RLAPI void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
1608 RLAPI void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data 1643 RLAPI void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data
1609 RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match 1644 RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
1610 1645
1611 // Collision detection functions 1646 // Collision detection functions
1612 RLAPI bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres 1647 RLAPI bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres
1613 RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Check collision between two bounding boxes 1648 RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Check collision between two bounding boxes
1614 RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius); // Check collision between box and sphere 1649 RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius); // Check collision between box and sphere
1615 RLAPI RayCollision GetRayCollisionSphere(Ray ray, Vector3 center, float radius); // Get collision info between ray and sphere 1650 RLAPI RayCollision GetRayCollisionSphere(Ray ray, Vector3 center, float radius); // Get collision info between ray and sphere
1616 RLAPI RayCollision GetRayCollisionBox(Ray ray, BoundingBox box); // Get collision info between ray and box 1651 RLAPI RayCollision GetRayCollisionBox(Ray ray, BoundingBox box); // Get collision info between ray and box
1617 RLAPI RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform); // Get collision info between ray and mesh 1652 RLAPI RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform); // Get collision info between ray and mesh
1618 RLAPI RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle 1653 RLAPI RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle
1619 RLAPI RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4); // Get collision info between ray and quad 1654 RLAPI RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4); // Get collision info between ray and quad
1620 1655
1621 //------------------------------------------------------------------------------------ 1656 //------------------------------------------------------------------------------------
1622 // Audio Loading and Playing Functions (Module: audio) 1657 // Audio Loading and Playing Functions (Module: audio)
1623 //------------------------------------------------------------------------------------ 1658 //------------------------------------------------------------------------------------
1624 typedef void (*AudioCallback)(void *bufferData, unsigned int frames); 1659 typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
1636 RLAPI bool IsWaveValid(Wave wave); // Checks if wave data is valid (data loaded and parameters) 1671 RLAPI bool IsWaveValid(Wave wave); // Checks if wave data is valid (data loaded and parameters)
1637 RLAPI Sound LoadSound(const char *fileName); // Load sound from file 1672 RLAPI Sound LoadSound(const char *fileName); // Load sound from file
1638 RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data 1673 RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
1639 RLAPI Sound LoadSoundAlias(Sound source); // Create a new sound that shares the same sample data as the source sound, does not own the sound data 1674 RLAPI Sound LoadSoundAlias(Sound source); // Create a new sound that shares the same sample data as the source sound, does not own the sound data
1640 RLAPI bool IsSoundValid(Sound sound); // Checks if a sound is valid (data loaded and buffers initialized) 1675 RLAPI bool IsSoundValid(Sound sound); // Checks if a sound is valid (data loaded and buffers initialized)
1641 RLAPI void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data 1676 RLAPI void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data (default data format: 32 bit float, stereo)
1642 RLAPI void UnloadWave(Wave wave); // Unload wave data 1677 RLAPI void UnloadWave(Wave wave); // Unload wave data
1643 RLAPI void UnloadSound(Sound sound); // Unload sound 1678 RLAPI void UnloadSound(Sound sound); // Unload sound
1644 RLAPI void UnloadSoundAlias(Sound alias); // Unload a sound alias (does not deallocate sample data) 1679 RLAPI void UnloadSoundAlias(Sound alias); // Unload a sound alias (does not deallocate sample data)
1645 RLAPI bool ExportWave(Wave wave, const char *fileName); // Export wave data to file, returns true on success 1680 RLAPI bool ExportWave(Wave wave, const char *fileName); // Export wave data to file, returns true on success
1646 RLAPI bool ExportWaveAsCode(Wave wave, const char *fileName); // Export wave sample data to code (.h), returns true on success 1681 RLAPI bool ExportWaveAsCode(Wave wave, const char *fileName); // Export wave sample data to code (.h), returns true on success
1651 RLAPI void PauseSound(Sound sound); // Pause a sound 1686 RLAPI void PauseSound(Sound sound); // Pause a sound
1652 RLAPI void ResumeSound(Sound sound); // Resume a paused sound 1687 RLAPI void ResumeSound(Sound sound); // Resume a paused sound
1653 RLAPI bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing 1688 RLAPI bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
1654 RLAPI void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level) 1689 RLAPI void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
1655 RLAPI void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level) 1690 RLAPI void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
1656 RLAPI void SetSoundPan(Sound sound, float pan); // Set pan for a sound (0.5 is center) 1691 RLAPI void SetSoundPan(Sound sound, float pan); // Set pan for a sound (-1.0 left, 0.0 center, 1.0 right)
1657 RLAPI Wave WaveCopy(Wave wave); // Copy a wave to a new wave 1692 RLAPI Wave WaveCopy(Wave wave); // Copy a wave to a new wave
1658 RLAPI void WaveCrop(Wave *wave, int initFrame, int finalFrame); // Crop a wave to defined frames range 1693 RLAPI void WaveCrop(Wave *wave, int initFrame, int finalFrame); // Crop a wave to defined frames range
1659 RLAPI void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format 1694 RLAPI void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format
1660 RLAPI float *LoadWaveSamples(Wave wave); // Load samples data from wave as a 32bit float data array 1695 RLAPI float *LoadWaveSamples(Wave wave); // Load samples data from wave as a 32bit float data array
1661 RLAPI void UnloadWaveSamples(float *samples); // Unload samples data loaded with LoadWaveSamples() 1696 RLAPI void UnloadWaveSamples(float *samples); // Unload samples data loaded with LoadWaveSamples()
1672 RLAPI void PauseMusicStream(Music music); // Pause music playing 1707 RLAPI void PauseMusicStream(Music music); // Pause music playing
1673 RLAPI void ResumeMusicStream(Music music); // Resume playing paused music 1708 RLAPI void ResumeMusicStream(Music music); // Resume playing paused music
1674 RLAPI void SeekMusicStream(Music music, float position); // Seek music to a position (in seconds) 1709 RLAPI void SeekMusicStream(Music music, float position); // Seek music to a position (in seconds)
1675 RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level) 1710 RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level)
1676 RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level) 1711 RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level)
1677 RLAPI void SetMusicPan(Music music, float pan); // Set pan for a music (0.5 is center) 1712 RLAPI void SetMusicPan(Music music, float pan); // Set pan for a music (-1.0 left, 0.0 center, 1.0 right)
1678 RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds) 1713 RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds)
1679 RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds) 1714 RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
1680 1715
1681 // AudioStream management functions 1716 // AudioStream management functions
1682 RLAPI AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Load audio stream (to stream raw audio pcm data) 1717 RLAPI AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Load audio stream (to stream raw audio pcm data)
1689 RLAPI void ResumeAudioStream(AudioStream stream); // Resume audio stream 1724 RLAPI void ResumeAudioStream(AudioStream stream); // Resume audio stream
1690 RLAPI bool IsAudioStreamPlaying(AudioStream stream); // Check if audio stream is playing 1725 RLAPI bool IsAudioStreamPlaying(AudioStream stream); // Check if audio stream is playing
1691 RLAPI void StopAudioStream(AudioStream stream); // Stop audio stream 1726 RLAPI void StopAudioStream(AudioStream stream); // Stop audio stream
1692 RLAPI void SetAudioStreamVolume(AudioStream stream, float volume); // Set volume for audio stream (1.0 is max level) 1727 RLAPI void SetAudioStreamVolume(AudioStream stream, float volume); // Set volume for audio stream (1.0 is max level)
1693 RLAPI void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pitch for audio stream (1.0 is base level) 1728 RLAPI void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pitch for audio stream (1.0 is base level)
1694 RLAPI void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (0.5 is centered) 1729 RLAPI void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (-1.0 to 1.0 range, 0.0 is centered)
1695 RLAPI void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams 1730 RLAPI void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
1696 RLAPI void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data 1731 RLAPI void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data
1697 1732
1698 RLAPI void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as 'float' 1733 RLAPI void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives frames x 2 samples as 'float' (stereo)
1699 RLAPI void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream 1734 RLAPI void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream
1700 1735
1701 RLAPI void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as 'float' 1736 RLAPI void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives frames x 2 samples as 'float' (stereo)
1702 RLAPI void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline 1737 RLAPI void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline
1703 1738
1704 #if defined(__cplusplus) 1739 #if defined(__cplusplus)
1705 } 1740 }
1706 #endif 1741 #endif