|
@@ -14,7 +14,7 @@ RLAPI bool IsWindowMaximized(void); // Check if wi
|
|
RLAPI bool IsWindowFocused(void); // Check if window is currently focused (only PLATFORM_DESKTOP)
|
|
RLAPI bool IsWindowFocused(void); // Check if window is currently focused (only PLATFORM_DESKTOP)
|
|
RLAPI bool IsWindowResized(void); // Check if window has been resized last frame
|
|
RLAPI bool IsWindowResized(void); // Check if window has been resized last frame
|
|
RLAPI bool IsWindowState(unsigned int flag); // Check if one specific window flag is enabled
|
|
RLAPI bool IsWindowState(unsigned int flag); // Check if one specific window flag is enabled
|
|
-RLAPI void SetWindowState(unsigned int flags); // Set window configuration state using flags
|
|
|
|
|
|
+RLAPI void SetWindowState(unsigned int flags); // Set window configuration state using flags (only PLATFORM_DESKTOP)
|
|
RLAPI void ClearWindowState(unsigned int flags); // Clear window configuration state flags
|
|
RLAPI void ClearWindowState(unsigned int flags); // Clear window configuration state flags
|
|
RLAPI void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
|
|
RLAPI void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
|
|
RLAPI void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
|
|
RLAPI void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
|
|
@@ -26,14 +26,17 @@ RLAPI void SetWindowPosition(int x, int y); // Set window
|
|
RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode)
|
|
RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode)
|
|
RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
|
|
RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
|
|
RLAPI void SetWindowSize(int width, int height); // Set window dimensions
|
|
RLAPI void SetWindowSize(int width, int height); // Set window dimensions
|
|
|
|
+RLAPI void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
|
|
RLAPI void *GetWindowHandle(void); // Get native window handle
|
|
RLAPI void *GetWindowHandle(void); // Get native window handle
|
|
RLAPI int GetScreenWidth(void); // Get current screen width
|
|
RLAPI int GetScreenWidth(void); // Get current screen width
|
|
RLAPI int GetScreenHeight(void); // Get current screen height
|
|
RLAPI int GetScreenHeight(void); // Get current screen height
|
|
|
|
+RLAPI int GetRenderWidth(void); // Get current render width (it considers HiDPI)
|
|
|
|
+RLAPI int GetRenderHeight(void); // Get current render height (it considers HiDPI)
|
|
RLAPI int GetMonitorCount(void); // Get number of connected monitors
|
|
RLAPI int GetMonitorCount(void); // Get number of connected monitors
|
|
RLAPI int GetCurrentMonitor(void); // Get current connected monitor
|
|
RLAPI int GetCurrentMonitor(void); // Get current connected monitor
|
|
RLAPI Vector2 GetMonitorPosition(int monitor); // Get specified monitor position
|
|
RLAPI Vector2 GetMonitorPosition(int monitor); // Get specified monitor position
|
|
-RLAPI int GetMonitorWidth(int monitor); // Get specified monitor width (max available by monitor)
|
|
|
|
-RLAPI int GetMonitorHeight(int monitor); // Get specified monitor height (max available by monitor)
|
|
|
|
|
|
+RLAPI int GetMonitorWidth(int monitor); // Get specified monitor width (current video mode used by monitor)
|
|
|
|
+RLAPI int GetMonitorHeight(int monitor); // Get specified monitor height (current video mode used by monitor)
|
|
RLAPI int GetMonitorPhysicalWidth(int monitor); // Get specified monitor physical width in millimetres
|
|
RLAPI int GetMonitorPhysicalWidth(int monitor); // Get specified monitor physical width in millimetres
|
|
RLAPI int GetMonitorPhysicalHeight(int monitor); // Get specified monitor physical height in millimetres
|
|
RLAPI int GetMonitorPhysicalHeight(int monitor); // Get specified monitor physical height in millimetres
|
|
RLAPI int GetMonitorRefreshRate(int monitor); // Get specified monitor refresh rate
|
|
RLAPI int GetMonitorRefreshRate(int monitor); // Get specified monitor refresh rate
|
|
@@ -42,6 +45,8 @@ RLAPI Vector2 GetWindowScaleDPI(void); // Get window
|
|
RLAPI const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the primary monitor
|
|
RLAPI const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the primary monitor
|
|
RLAPI void SetClipboardText(const char *text); // Set clipboard text content
|
|
RLAPI void SetClipboardText(const char *text); // Set clipboard text content
|
|
RLAPI const char *GetClipboardText(void); // Get clipboard text content
|
|
RLAPI const char *GetClipboardText(void); // Get clipboard text content
|
|
|
|
+RLAPI void EnableEventWaiting(void); // Enable waiting for events on EndDrawing(), no automatic event polling
|
|
|
|
+RLAPI void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling
|
|
|
|
|
|
// Custom frame control functions
|
|
// Custom frame control functions
|
|
// NOTE: Those functions are intended for advance users that want full control over the frame processing
|
|
// NOTE: Those functions are intended for advance users that want full control over the frame processing
|
|
@@ -49,7 +54,7 @@ RLAPI const char *GetClipboardText(void); // Get clipboa
|
|
// To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
|
|
// To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
|
|
RLAPI void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
|
|
RLAPI void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
|
|
RLAPI void PollInputEvents(void); // Register all input events
|
|
RLAPI void PollInputEvents(void); // Register all input events
|
|
-RLAPI void WaitTime(float ms); // Wait for some milliseconds (halt program execution)
|
|
|
|
|
|
+RLAPI void WaitTime(double seconds); // Wait for some time (halt program execution)
|
|
|
|
|
|
// Cursor-related functions
|
|
// Cursor-related functions
|
|
RLAPI void ShowCursor(void); // Shows cursor
|
|
RLAPI void ShowCursor(void); // Shows cursor
|
|
@@ -99,9 +104,9 @@ RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Get a ray t
|
|
RLAPI Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
|
|
RLAPI Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
|
|
RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
|
|
RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
|
|
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Get the screen space position for a 3d world space position
|
|
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Get the screen space position for a 3d world space position
|
|
|
|
+RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
|
|
RLAPI Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Get size position for a 3d world space position
|
|
RLAPI Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Get size position for a 3d world space position
|
|
RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get the screen space position for a 2d camera world space position
|
|
RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get the screen space position for a 2d camera world space position
|
|
-RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
|
|
|
|
|
|
|
|
// Timing-related functions
|
|
// Timing-related functions
|
|
RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum)
|
|
RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum)
|
|
@@ -121,6 +126,8 @@ RLAPI void *MemAlloc(int size); // Internal me
|
|
RLAPI void *MemRealloc(void *ptr, int size); // Internal memory reallocator
|
|
RLAPI void *MemRealloc(void *ptr, int size); // Internal memory reallocator
|
|
RLAPI void MemFree(void *ptr); // Internal memory free
|
|
RLAPI void MemFree(void *ptr); // Internal memory free
|
|
|
|
|
|
|
|
+RLAPI void OpenURL(const char *url); // Open URL with default system browser (if available)
|
|
|
|
+
|
|
// Set custom callbacks
|
|
// Set custom callbacks
|
|
// WARNING: Callbacks setup is intended for advance users
|
|
// WARNING: Callbacks setup is intended for advance users
|
|
RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log
|
|
RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log
|
|
@@ -130,40 +137,39 @@ RLAPI void SetLoadFileTextCallback(LoadFileTextCallback callback); // Set custom
|
|
RLAPI void SetSaveFileTextCallback(SaveFileTextCallback callback); // Set custom file text data saver
|
|
RLAPI void SetSaveFileTextCallback(SaveFileTextCallback callback); // Set custom file text data saver
|
|
|
|
|
|
// Files management functions
|
|
// Files management functions
|
|
-RLAPI unsigned char *LoadFileData(const char *fileName, unsigned int *bytesRead); // Load file data as byte array (read)
|
|
|
|
|
|
+RLAPI unsigned char *LoadFileData(const char *fileName, unsigned int *bytesRead); // Load file data as byte array (read)
|
|
RLAPI void UnloadFileData(unsigned char *data); // Unload file data allocated by LoadFileData()
|
|
RLAPI void UnloadFileData(unsigned char *data); // Unload file data allocated by LoadFileData()
|
|
-RLAPI bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite); // Save data to file from byte array (write), returns true on success
|
|
|
|
|
|
+RLAPI bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite); // Save data to file from byte array (write), returns true on success
|
|
|
|
+RLAPI bool ExportDataAsCode(const char *data, unsigned int size, const char *fileName); // Export data to code (.h), returns true on success
|
|
RLAPI char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string
|
|
RLAPI char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string
|
|
RLAPI void UnloadFileText(char *text); // Unload file text data allocated by LoadFileText()
|
|
RLAPI void UnloadFileText(char *text); // Unload file text data allocated by LoadFileText()
|
|
RLAPI bool SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success
|
|
RLAPI bool SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success
|
|
RLAPI bool FileExists(const char *fileName); // Check if file exists
|
|
RLAPI bool FileExists(const char *fileName); // Check if file exists
|
|
RLAPI bool DirectoryExists(const char *dirPath); // Check if a directory path exists
|
|
RLAPI bool DirectoryExists(const char *dirPath); // Check if a directory path exists
|
|
-RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension (including point: .png, .wav)
|
|
|
|
|
|
+RLAPI bool IsFileExtension(const char *fileName, const char *ext); // Check file extension (including point: .png, .wav)
|
|
|
|
+RLAPI int GetFileLength(const char *fileName); // Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
|
|
RLAPI const char *GetFileExtension(const char *fileName); // Get pointer to extension for a filename string (includes dot: '.png')
|
|
RLAPI const char *GetFileExtension(const char *fileName); // Get pointer to extension for a filename string (includes dot: '.png')
|
|
RLAPI const char *GetFileName(const char *filePath); // Get pointer to filename for a path string
|
|
RLAPI const char *GetFileName(const char *filePath); // Get pointer to filename for a path string
|
|
RLAPI const char *GetFileNameWithoutExt(const char *filePath); // Get filename string without extension (uses static string)
|
|
RLAPI const char *GetFileNameWithoutExt(const char *filePath); // Get filename string without extension (uses static string)
|
|
RLAPI const char *GetDirectoryPath(const char *filePath); // Get full path for a given fileName with path (uses static string)
|
|
RLAPI const char *GetDirectoryPath(const char *filePath); // Get full path for a given fileName with path (uses static string)
|
|
RLAPI const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
|
|
RLAPI const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
|
|
RLAPI const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
|
|
RLAPI const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
|
|
-RLAPI char **GetDirectoryFiles(const char *dirPath, int *count); // Get filenames in a directory path (memory should be freed)
|
|
|
|
-RLAPI void ClearDirectoryFiles(void); // Clear directory files paths buffers (free memory)
|
|
|
|
|
|
+RLAPI const char *GetApplicationDirectory(void); // Get the directory if the running application (uses static string)
|
|
RLAPI bool ChangeDirectory(const char *dir); // Change working directory, return true on success
|
|
RLAPI bool ChangeDirectory(const char *dir); // Change working directory, return true on success
|
|
|
|
+RLAPI bool IsPathFile(const char *path); // Check if a given path is a file or a directory
|
|
|
|
+RLAPI FilePathList LoadDirectoryFiles(const char *dirPath); // Load directory filepaths
|
|
|
|
+RLAPI FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and recursive directory scan
|
|
|
|
+RLAPI void UnloadDirectoryFiles(FilePathList files); // Unload filepaths
|
|
RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window
|
|
RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window
|
|
-RLAPI char **LoadDroppedFiles(int *count); // Get dropped files names (memory should be freed)
|
|
|
|
-RLAPI void UnloadDroppedFiles(void); // Clear dropped files paths buffer (free memory)
|
|
|
|
|
|
+RLAPI FilePathList LoadDroppedFiles(void); // Load dropped filepaths
|
|
|
|
+RLAPI void UnloadDroppedFiles(FilePathList files); // Unload dropped filepaths
|
|
RLAPI long GetFileModTime(const char *fileName); // Get file modification time (last write time)
|
|
RLAPI long GetFileModTime(const char *fileName); // Get file modification time (last write time)
|
|
|
|
|
|
// Compression/Encoding functionality
|
|
// Compression/Encoding functionality
|
|
-RLAPI unsigned char *CompressData(unsigned char *data, int dataLength, int *compDataLength); // Compress data (DEFLATE algorithm)
|
|
|
|
-RLAPI unsigned char *DecompressData(unsigned char *compData, int compDataLength, int *dataLength); // Decompress data (DEFLATE algorithm)
|
|
|
|
-RLAPI char *EncodeDataBase64(const unsigned char *data, int dataLength, int *outputLength); // Encode data to Base64 string
|
|
|
|
-RLAPI unsigned char *DecodeDataBase64(unsigned char *data, int *outputLength); // Decode Base64 string data
|
|
|
|
-
|
|
|
|
-// Persistent storage management
|
|
|
|
-RLAPI bool SaveStorageValue(unsigned int position, int value); // Save integer value to storage file (to defined position), returns true on success
|
|
|
|
-RLAPI int LoadStorageValue(unsigned int position); // Load integer value from storage file (from defined position)
|
|
|
|
-
|
|
|
|
-RLAPI void OpenURL(const char *url); // Open URL with default system browser (if available)
|
|
|
|
|
|
+RLAPI unsigned char *CompressData(const unsigned char *data, int dataSize, int *compDataSize); // Compress data (DEFLATE algorithm), memory must be MemFree()
|
|
|
|
+RLAPI unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // Decompress data (DEFLATE algorithm), memory must be MemFree()
|
|
|
|
+RLAPI char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string, memory must be MemFree()
|
|
|
|
+RLAPI unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize); // Decode Base64 string data, memory must be MemFree()
|
|
|
|
|
|
//------------------------------------------------------------------------------------
|
|
//------------------------------------------------------------------------------------
|
|
// Input Handling Functions (Module: core)
|
|
// Input Handling Functions (Module: core)
|
|
@@ -202,7 +208,8 @@ RLAPI Vector2 GetMouseDelta(void); // Get mouse delta
|
|
RLAPI void SetMousePosition(int x, int y); // Set mouse position XY
|
|
RLAPI void SetMousePosition(int x, int y); // Set mouse position XY
|
|
RLAPI void SetMouseOffset(int offsetX, int offsetY); // Set mouse offset
|
|
RLAPI void SetMouseOffset(int offsetX, int offsetY); // Set mouse offset
|
|
RLAPI void SetMouseScale(float scaleX, float scaleY); // Set mouse scaling
|
|
RLAPI void SetMouseScale(float scaleX, float scaleY); // Set mouse scaling
|
|
-RLAPI float GetMouseWheelMove(void); // Get mouse wheel movement Y
|
|
|
|
|
|
+RLAPI float GetMouseWheelMove(void); // Get mouse wheel movement for X or Y, whichever is larger
|
|
|
|
+RLAPI Vector2 GetMouseWheelMoveV(void); // Get mouse wheel movement for both X and Y
|
|
RLAPI void SetMouseCursor(int cursor); // Set mouse cursor
|
|
RLAPI void SetMouseCursor(int cursor); // Set mouse cursor
|
|
|
|
|
|
// Input-related functions: touch
|
|
// Input-related functions: touch
|
|
@@ -391,10 +398,10 @@ RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint);
|
|
RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters
|
|
RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters
|
|
RLAPI void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
|
|
RLAPI void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
|
|
RLAPI void DrawTextureQuad(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint); // Draw texture quad with tiling and offset parameters
|
|
RLAPI void DrawTextureQuad(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint); // Draw texture quad with tiling and offset parameters
|
|
-RLAPI void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint); // Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.
|
|
|
|
|
|
+RLAPI void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint); // Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.
|
|
RLAPI void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
|
|
RLAPI void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
|
|
RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
|
|
RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
|
|
-RLAPI void DrawTexturePoly(Texture2D texture, Vector2 center, Vector2 *points, Vector2 *texcoords, int pointCount, Color tint); // Draw a textured polygon
|
|
|
|
|
|
+RLAPI void DrawTexturePoly(Texture2D texture, Vector2 center, Vector2 *points, Vector2 *texcoords, int pointCount, Color tint); // Draw a textured polygon
|
|
|
|
|
|
// Color/pixel related functions
|
|
// Color/pixel related functions
|
|
RLAPI Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
|
RLAPI Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
|
@@ -417,20 +424,22 @@ RLAPI int GetPixelDataSize(int width, int height, int format); // G
|
|
// Font loading/unloading functions
|
|
// Font loading/unloading functions
|
|
RLAPI Font GetFontDefault(void); // Get the default Font
|
|
RLAPI Font GetFontDefault(void); // Get the default Font
|
|
RLAPI Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
|
|
RLAPI Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
|
|
-RLAPI Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int glyphCount); // Load font from file with extended parameters
|
|
|
|
|
|
+RLAPI Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int glyphCount); // Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set
|
|
RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
|
|
RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
|
|
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
|
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
|
-RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount, int type); // Load font data for further use
|
|
|
|
-RLAPI Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **recs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
|
|
|
-RLAPI void UnloadFontData(GlyphInfo *chars, int glyphCount); // Unload font chars info data (RAM)
|
|
|
|
-RLAPI void UnloadFont(Font font); // Unload Font from GPU memory (VRAM)
|
|
|
|
|
|
+RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount, int type); // Load font data for further use
|
|
|
|
+RLAPI Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **recs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
|
|
|
+RLAPI void UnloadFontData(GlyphInfo *chars, int glyphCount); // Unload font chars info data (RAM)
|
|
|
|
+RLAPI void UnloadFont(Font font); // Unload font from GPU memory (VRAM)
|
|
|
|
+RLAPI bool ExportFontAsCode(Font font, const char *fileName); // Export font as code file, returns true on success
|
|
|
|
|
|
// Text drawing functions
|
|
// Text drawing functions
|
|
RLAPI void DrawFPS(int posX, int posY); // Draw current FPS
|
|
RLAPI void DrawFPS(int posX, int posY); // Draw current FPS
|
|
RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font)
|
|
RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font)
|
|
-RLAPI void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
|
|
|
|
|
|
+RLAPI void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
|
|
RLAPI void DrawTextPro(Font font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); // Draw text using Font and pro parameters (rotation)
|
|
RLAPI void DrawTextPro(Font font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); // Draw text using Font and pro parameters (rotation)
|
|
-RLAPI void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint); // Draw one character (codepoint)
|
|
|
|
|
|
+RLAPI void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint); // Draw one character (codepoint)
|
|
|
|
+RLAPI void DrawTextCodepoints(Font font, const int *codepoints, int count, Vector2 position, float fontSize, float spacing, Color tint); // Draw multiple character (codepoint)
|
|
|
|
|
|
// Text font info functions
|
|
// Text font info functions
|
|
RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font
|
|
RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font
|
|
@@ -445,7 +454,7 @@ RLAPI void UnloadCodepoints(int *codepoints); // Unload
|
|
RLAPI int GetCodepointCount(const char *text); // Get total number of codepoints in a UTF-8 encoded string
|
|
RLAPI int GetCodepointCount(const char *text); // Get total number of codepoints in a UTF-8 encoded string
|
|
RLAPI int GetCodepoint(const char *text, int *bytesProcessed); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
|
|
RLAPI int GetCodepoint(const char *text, int *bytesProcessed); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
|
|
RLAPI const char *CodepointToUTF8(int codepoint, int *byteSize); // Encode one codepoint into UTF-8 byte array (array length returned as parameter)
|
|
RLAPI const char *CodepointToUTF8(int codepoint, int *byteSize); // Encode one codepoint into UTF-8 byte array (array length returned as parameter)
|
|
-RLAPI char *TextCodepointsToUTF8(int *codepoints, int length); // Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)
|
|
|
|
|
|
+RLAPI char *TextCodepointsToUTF8(const int *codepoints, int length); // Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)
|
|
|
|
|
|
// Text strings management functions (no UTF-8 strings, only byte chars)
|
|
// Text strings management functions (no UTF-8 strings, only byte chars)
|
|
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
|
|
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
|
|
@@ -474,7 +483,7 @@ RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color);
|
|
RLAPI void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
|
|
RLAPI void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
|
|
RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
|
|
RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
|
|
RLAPI void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
|
RLAPI void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
|
-RLAPI void DrawTriangleStrip3D(Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
|
|
|
|
|
+RLAPI void DrawTriangleStrip3D(Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
|
RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
|
|
RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
|
|
RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
|
RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
|
RLAPI void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires
|
|
RLAPI void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires
|
|
@@ -515,14 +524,13 @@ RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source,
|
|
|
|
|
|
// Mesh management functions
|
|
// Mesh management functions
|
|
RLAPI void UploadMesh(Mesh *mesh, bool dynamic); // Upload mesh vertex data in GPU and provide VAO/VBO ids
|
|
RLAPI void UploadMesh(Mesh *mesh, bool dynamic); // Upload mesh vertex data in GPU and provide VAO/VBO ids
|
|
-RLAPI void UpdateMeshBuffer(Mesh mesh, int index, void *data, int dataSize, int offset); // Update mesh vertex data in GPU for a specific buffer index
|
|
|
|
|
|
+RLAPI void UpdateMeshBuffer(Mesh mesh, int index, const void *data, int dataSize, int offset); // Update mesh vertex data in GPU for a specific buffer index
|
|
RLAPI void UnloadMesh(Mesh mesh); // Unload mesh data from CPU and GPU
|
|
RLAPI void UnloadMesh(Mesh mesh); // Unload mesh data from CPU and GPU
|
|
RLAPI void DrawMesh(Mesh mesh, Material material, Matrix transform); // Draw a 3d mesh with material and transform
|
|
RLAPI void DrawMesh(Mesh mesh, Material material, Matrix transform); // Draw a 3d mesh with material and transform
|
|
-RLAPI void DrawMeshInstanced(Mesh mesh, Material material, Matrix *transforms, int instances); // Draw multiple mesh instances with material and different transforms
|
|
|
|
|
|
+RLAPI void DrawMeshInstanced(Mesh mesh, Material material, const Matrix *transforms, int instances); // Draw multiple mesh instances with material and different transforms
|
|
RLAPI bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success
|
|
RLAPI bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success
|
|
RLAPI BoundingBox GetMeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits
|
|
RLAPI BoundingBox GetMeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits
|
|
RLAPI void GenMeshTangents(Mesh *mesh); // Compute mesh tangents
|
|
RLAPI void GenMeshTangents(Mesh *mesh); // Compute mesh tangents
|
|
-RLAPI void GenMeshBinormals(Mesh *mesh); // Compute mesh binormals
|
|
|
|
|
|
|
|
// Mesh generation functions
|
|
// Mesh generation functions
|
|
RLAPI Mesh GenMeshPoly(int sides, float radius); // Generate polygonal mesh
|
|
RLAPI Mesh GenMeshPoly(int sides, float radius); // Generate polygonal mesh
|
|
@@ -548,23 +556,23 @@ RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId);
|
|
RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, unsigned int *animCount); // Load model animations from file
|
|
RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, unsigned int *animCount); // Load model animations from file
|
|
RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose
|
|
RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose
|
|
RLAPI void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
|
|
RLAPI void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
|
|
-RLAPI void UnloadModelAnimations(ModelAnimation* animations, unsigned int count); // Unload animation array data
|
|
|
|
|
|
+RLAPI void UnloadModelAnimations(ModelAnimation *animations, unsigned int count); // Unload animation array data
|
|
RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
|
|
RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
|
|
|
|
|
|
// Collision detection functions
|
|
// Collision detection functions
|
|
-RLAPI bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres
|
|
|
|
-RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Check collision between two bounding boxes
|
|
|
|
-RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius); // Check collision between box and sphere
|
|
|
|
-RLAPI RayCollision GetRayCollisionSphere(Ray ray, Vector3 center, float radius); // Get collision info between ray and sphere
|
|
|
|
-RLAPI RayCollision GetRayCollisionBox(Ray ray, BoundingBox box); // Get collision info between ray and box
|
|
|
|
-RLAPI RayCollision GetRayCollisionModel(Ray ray, Model model); // Get collision info between ray and model
|
|
|
|
-RLAPI RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform); // Get collision info between ray and mesh
|
|
|
|
-RLAPI RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle
|
|
|
|
-RLAPI RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4); // Get collision info between ray and quad
|
|
|
|
|
|
+RLAPI bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres
|
|
|
|
+RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Check collision between two bounding boxes
|
|
|
|
+RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius); // Check collision between box and sphere
|
|
|
|
+RLAPI RayCollision GetRayCollisionSphere(Ray ray, Vector3 center, float radius); // Get collision info between ray and sphere
|
|
|
|
+RLAPI RayCollision GetRayCollisionBox(Ray ray, BoundingBox box); // Get collision info between ray and box
|
|
|
|
+RLAPI RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform); // Get collision info between ray and mesh
|
|
|
|
+RLAPI RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle
|
|
|
|
+RLAPI RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4); // Get collision info between ray and quad
|
|
|
|
|
|
//------------------------------------------------------------------------------------
|
|
//------------------------------------------------------------------------------------
|
|
// Audio Loading and Playing Functions (Module: audio)
|
|
// Audio Loading and Playing Functions (Module: audio)
|
|
//------------------------------------------------------------------------------------
|
|
//------------------------------------------------------------------------------------
|
|
|
|
+typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|
|
|
|
|
// Audio device management functions
|
|
// Audio device management functions
|
|
RLAPI void InitAudioDevice(void); // Initialize audio device and context
|
|
RLAPI void InitAudioDevice(void); // Initialize audio device and context
|
|
@@ -594,15 +602,16 @@ RLAPI int GetSoundsPlaying(void); // Get num
|
|
RLAPI bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
|
|
RLAPI bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
|
|
RLAPI void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
|
|
RLAPI void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
|
|
RLAPI void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
|
|
RLAPI void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
|
|
-RLAPI void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format
|
|
|
|
|
|
+RLAPI void SetSoundPan(Sound sound, float pan); // Set pan for a sound (0.5 is center)
|
|
RLAPI Wave WaveCopy(Wave wave); // Copy a wave to a new wave
|
|
RLAPI Wave WaveCopy(Wave wave); // Copy a wave to a new wave
|
|
RLAPI void WaveCrop(Wave *wave, int initSample, int finalSample); // Crop a wave to defined samples range
|
|
RLAPI void WaveCrop(Wave *wave, int initSample, int finalSample); // Crop a wave to defined samples range
|
|
-RLAPI float *LoadWaveSamples(Wave wave); // Load samples data from wave as a floats array
|
|
|
|
|
|
+RLAPI void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format
|
|
|
|
+RLAPI float *LoadWaveSamples(Wave wave); // Load samples data from wave as a 32bit float data array
|
|
RLAPI void UnloadWaveSamples(float *samples); // Unload samples data loaded with LoadWaveSamples()
|
|
RLAPI void UnloadWaveSamples(float *samples); // Unload samples data loaded with LoadWaveSamples()
|
|
|
|
|
|
// Music management functions
|
|
// Music management functions
|
|
RLAPI Music LoadMusicStream(const char *fileName); // Load music stream from file
|
|
RLAPI Music LoadMusicStream(const char *fileName); // Load music stream from file
|
|
-RLAPI Music LoadMusicStreamFromMemory(const char *fileType, unsigned char *data, int dataSize); // Load music stream from data
|
|
|
|
|
|
+RLAPI Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data, int dataSize); // Load music stream from data
|
|
RLAPI void UnloadMusicStream(Music music); // Unload music stream
|
|
RLAPI void UnloadMusicStream(Music music); // Unload music stream
|
|
RLAPI void PlayMusicStream(Music music); // Start music playing
|
|
RLAPI void PlayMusicStream(Music music); // Start music playing
|
|
RLAPI bool IsMusicStreamPlaying(Music music); // Check if music is playing
|
|
RLAPI bool IsMusicStreamPlaying(Music music); // Check if music is playing
|
|
@@ -613,12 +622,13 @@ RLAPI void ResumeMusicStream(Music music); // Resume
|
|
RLAPI void SeekMusicStream(Music music, float position); // Seek music to a position (in seconds)
|
|
RLAPI void SeekMusicStream(Music music, float position); // Seek music to a position (in seconds)
|
|
RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level)
|
|
RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level)
|
|
RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level)
|
|
RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level)
|
|
|
|
+RLAPI void SetMusicPan(Music music, float pan); // Set pan for a music (0.5 is center)
|
|
RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds)
|
|
RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds)
|
|
RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
|
|
RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
|
|
|
|
|
|
// AudioStream management functions
|
|
// AudioStream management functions
|
|
RLAPI AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Load audio stream (to stream raw audio pcm data)
|
|
RLAPI AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Load audio stream (to stream raw audio pcm data)
|
|
-RLAPI void UnloadAudioStream(AudioStream stream); // Unload audio stream and free memory
|
|
|
|
|
|
+RLAPI void UnloadAudioStream(AudioStream stream); // Unload audio stream and free memory
|
|
RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int frameCount); // Update audio stream buffers with data
|
|
RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int frameCount); // Update audio stream buffers with data
|
|
RLAPI bool IsAudioStreamProcessed(AudioStream stream); // Check if any audio stream buffers requires refill
|
|
RLAPI bool IsAudioStreamProcessed(AudioStream stream); // Check if any audio stream buffers requires refill
|
|
RLAPI void PlayAudioStream(AudioStream stream); // Play audio stream
|
|
RLAPI void PlayAudioStream(AudioStream stream); // Play audio stream
|
|
@@ -628,4 +638,10 @@ RLAPI bool IsAudioStreamPlaying(AudioStream stream); // Check i
|
|
RLAPI void StopAudioStream(AudioStream stream); // Stop audio stream
|
|
RLAPI void StopAudioStream(AudioStream stream); // Stop audio stream
|
|
RLAPI void SetAudioStreamVolume(AudioStream stream, float volume); // Set volume for audio stream (1.0 is max level)
|
|
RLAPI void SetAudioStreamVolume(AudioStream stream, float volume); // Set volume for audio stream (1.0 is max level)
|
|
RLAPI void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pitch for audio stream (1.0 is base level)
|
|
RLAPI void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pitch for audio stream (1.0 is base level)
|
|
|
|
+RLAPI void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (0.5 is centered)
|
|
RLAPI void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
|
|
RLAPI void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
|
|
|
|
+RLAPI void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data
|
|
|
|
+
|
|
|
|
+RLAPI void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream
|
|
|
|
+RLAPI void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream
|
|
|
|
+
|