update to raylib master in preparation for 3.5 release
This commit is contained in:
parent
8824449bc1
commit
23f3cd92e7
7 changed files with 4443 additions and 3238 deletions
|
@ -1 +1 @@
|
||||||
libraylib.so.3.0.0
|
libraylib.so.301
|
Binary file not shown.
Binary file not shown.
1
raylib/dynamic/libraylib.so.301
Symbolic link
1
raylib/dynamic/libraylib.so.301
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
libraylib.so.3.0.0
|
218
raylib/raylib.h
218
raylib/raylib.h
|
@ -99,8 +99,6 @@
|
||||||
#define DEG2RAD (PI/180.0f)
|
#define DEG2RAD (PI/180.0f)
|
||||||
#define RAD2DEG (180.0f/PI)
|
#define RAD2DEG (180.0f/PI)
|
||||||
|
|
||||||
#define MAX_TOUCH_POINTS 10 // Maximum number of touch points supported
|
|
||||||
|
|
||||||
// Allow custom memory allocators
|
// Allow custom memory allocators
|
||||||
#ifndef RL_MALLOC
|
#ifndef RL_MALLOC
|
||||||
#define RL_MALLOC(sz) malloc(sz)
|
#define RL_MALLOC(sz) malloc(sz)
|
||||||
|
@ -159,6 +157,8 @@
|
||||||
#define SubText TextSubtext
|
#define SubText TextSubtext
|
||||||
#define ShowWindow UnhideWindow
|
#define ShowWindow UnhideWindow
|
||||||
#define LoadText LoadFileText
|
#define LoadText LoadFileText
|
||||||
|
#define GetExtension GetFileExtension
|
||||||
|
//#define Fade(c, a) ColorAlpha(c, a)
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Structures Definition
|
// Structures Definition
|
||||||
|
@ -228,32 +228,31 @@ typedef struct Image {
|
||||||
int format; // Data format (PixelFormat type)
|
int format; // Data format (PixelFormat type)
|
||||||
} Image;
|
} Image;
|
||||||
|
|
||||||
// Texture2D type
|
// Texture type
|
||||||
// NOTE: Data stored in GPU memory
|
// NOTE: Data stored in GPU memory
|
||||||
typedef struct Texture2D {
|
typedef struct Texture {
|
||||||
unsigned int id; // OpenGL texture id
|
unsigned int id; // OpenGL texture id
|
||||||
int width; // Texture base width
|
int width; // Texture base width
|
||||||
int height; // Texture base height
|
int height; // Texture base height
|
||||||
int mipmaps; // Mipmap levels, 1 by default
|
int mipmaps; // Mipmap levels, 1 by default
|
||||||
int format; // Data format (PixelFormat type)
|
int format; // Data format (PixelFormat type)
|
||||||
} Texture2D;
|
} Texture;
|
||||||
|
|
||||||
// Texture type, same as Texture2D
|
// Texture2D type, same as Texture
|
||||||
typedef Texture2D Texture;
|
typedef Texture Texture2D;
|
||||||
|
|
||||||
// TextureCubemap type, actually, same as Texture2D
|
// TextureCubemap type, actually, same as Texture
|
||||||
typedef Texture2D TextureCubemap;
|
typedef Texture TextureCubemap;
|
||||||
|
|
||||||
// RenderTexture2D type, for texture rendering
|
// RenderTexture type, for texture rendering
|
||||||
typedef struct RenderTexture2D {
|
typedef struct RenderTexture {
|
||||||
unsigned int id; // OpenGL Framebuffer Object (FBO) id
|
unsigned int id; // OpenGL Framebuffer Object (FBO) id
|
||||||
Texture2D texture; // Color buffer attachment texture
|
Texture texture; // Color buffer attachment texture
|
||||||
Texture2D depth; // Depth buffer attachment texture
|
Texture depth; // Depth buffer attachment texture
|
||||||
bool depthTexture; // Track if depth attachment is a texture or renderbuffer
|
} RenderTexture;
|
||||||
} RenderTexture2D;
|
|
||||||
|
|
||||||
// RenderTexture type, same as RenderTexture2D
|
// RenderTexture2D type, same as RenderTexture
|
||||||
typedef RenderTexture2D RenderTexture;
|
typedef RenderTexture RenderTexture2D;
|
||||||
|
|
||||||
// N-Patch layout info
|
// N-Patch layout info
|
||||||
typedef struct NPatchInfo {
|
typedef struct NPatchInfo {
|
||||||
|
@ -368,9 +367,8 @@ typedef struct Model {
|
||||||
Matrix transform; // Local transform matrix
|
Matrix transform; // Local transform matrix
|
||||||
|
|
||||||
int meshCount; // Number of meshes
|
int meshCount; // Number of meshes
|
||||||
Mesh *meshes; // Meshes array
|
|
||||||
|
|
||||||
int materialCount; // Number of materials
|
int materialCount; // Number of materials
|
||||||
|
Mesh *meshes; // Meshes array
|
||||||
Material *materials; // Materials array
|
Material *materials; // Materials array
|
||||||
int *meshMaterial; // Mesh material number
|
int *meshMaterial; // Mesh material number
|
||||||
|
|
||||||
|
@ -383,9 +381,8 @@ typedef struct Model {
|
||||||
// Model animation
|
// Model animation
|
||||||
typedef struct ModelAnimation {
|
typedef struct ModelAnimation {
|
||||||
int boneCount; // Number of bones
|
int boneCount; // Number of bones
|
||||||
BoneInfo *bones; // Bones information (skeleton)
|
|
||||||
|
|
||||||
int frameCount; // Number of animation frames
|
int frameCount; // Number of animation frames
|
||||||
|
BoneInfo *bones; // Bones information (skeleton)
|
||||||
Transform **framePoses; // Poses array by frame
|
Transform **framePoses; // Poses array by frame
|
||||||
} ModelAnimation;
|
} ModelAnimation;
|
||||||
|
|
||||||
|
@ -423,29 +420,28 @@ typedef struct rAudioBuffer rAudioBuffer;
|
||||||
// Audio stream type
|
// Audio stream type
|
||||||
// NOTE: Useful to create custom audio streams not bound to a specific file
|
// NOTE: Useful to create custom audio streams not bound to a specific file
|
||||||
typedef struct AudioStream {
|
typedef struct AudioStream {
|
||||||
|
rAudioBuffer *buffer; // Pointer to internal data used by the audio system
|
||||||
|
|
||||||
unsigned int sampleRate; // Frequency (samples per second)
|
unsigned int sampleRate; // Frequency (samples per second)
|
||||||
unsigned int sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
|
unsigned int sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
|
||||||
unsigned int channels; // Number of channels (1-mono, 2-stereo)
|
unsigned int channels; // Number of channels (1-mono, 2-stereo)
|
||||||
|
|
||||||
rAudioBuffer *buffer; // Pointer to internal data used by the audio system
|
|
||||||
} AudioStream;
|
} AudioStream;
|
||||||
|
|
||||||
// Sound source type
|
// Sound source type
|
||||||
typedef struct Sound {
|
typedef struct Sound {
|
||||||
unsigned int sampleCount; // Total number of samples
|
|
||||||
AudioStream stream; // Audio stream
|
AudioStream stream; // Audio stream
|
||||||
|
unsigned int sampleCount; // Total number of samples
|
||||||
} Sound;
|
} Sound;
|
||||||
|
|
||||||
// Music stream type (audio file streaming from memory)
|
// Music stream type (audio file streaming from memory)
|
||||||
// NOTE: Anything longer than ~10 seconds should be streamed
|
// NOTE: Anything longer than ~10 seconds should be streamed
|
||||||
typedef struct Music {
|
typedef struct Music {
|
||||||
|
AudioStream stream; // Audio stream
|
||||||
|
unsigned int sampleCount; // Total number of samples
|
||||||
|
bool looping; // Music looping enable
|
||||||
|
|
||||||
int ctxType; // Type of music context (audio filetype)
|
int ctxType; // Type of music context (audio filetype)
|
||||||
void *ctxData; // Audio context data, depends on type
|
void *ctxData; // Audio context data, depends on type
|
||||||
|
|
||||||
unsigned int sampleCount; // Total number of samples
|
|
||||||
unsigned int loopCount; // Loops count (times music will play), 0 means infinite loop
|
|
||||||
|
|
||||||
AudioStream stream; // Audio stream
|
|
||||||
} Music;
|
} Music;
|
||||||
|
|
||||||
// Head-Mounted-Display device parameters
|
// Head-Mounted-Display device parameters
|
||||||
|
@ -476,7 +472,8 @@ typedef enum {
|
||||||
FLAG_WINDOW_HIDDEN = 128, // Set to create the window initially hidden
|
FLAG_WINDOW_HIDDEN = 128, // Set to create the window initially hidden
|
||||||
FLAG_WINDOW_ALWAYS_RUN = 256, // Set to allow windows running while minimized
|
FLAG_WINDOW_ALWAYS_RUN = 256, // Set to allow windows running while minimized
|
||||||
FLAG_MSAA_4X_HINT = 32, // Set to try enabling MSAA 4X
|
FLAG_MSAA_4X_HINT = 32, // Set to try enabling MSAA 4X
|
||||||
FLAG_VSYNC_HINT = 64 // Set to try enabling V-Sync on GPU
|
FLAG_VSYNC_HINT = 64, // Set to try enabling V-Sync on GPU
|
||||||
|
FLAG_INTERLACED_HINT = 512 // Set to try V3D to choose an interlaced video format
|
||||||
} ConfigFlag;
|
} ConfigFlag;
|
||||||
|
|
||||||
// Trace log type
|
// Trace log type
|
||||||
|
@ -620,6 +617,21 @@ typedef enum {
|
||||||
MOUSE_MIDDLE_BUTTON = 2
|
MOUSE_MIDDLE_BUTTON = 2
|
||||||
} MouseButton;
|
} MouseButton;
|
||||||
|
|
||||||
|
// Mouse cursor types
|
||||||
|
typedef enum {
|
||||||
|
MOUSE_CURSOR_DEFAULT = 0,
|
||||||
|
MOUSE_CURSOR_ARROW = 1,
|
||||||
|
MOUSE_CURSOR_IBEAM = 2,
|
||||||
|
MOUSE_CURSOR_CROSSHAIR = 3,
|
||||||
|
MOUSE_CURSOR_POINTING_HAND = 4,
|
||||||
|
MOUSE_CURSOR_RESIZE_EW = 5, // The horizontal resize/move arrow shape
|
||||||
|
MOUSE_CURSOR_RESIZE_NS = 6, // The vertical resize/move arrow shape
|
||||||
|
MOUSE_CURSOR_RESIZE_NWSE = 7, // The top-left to bottom-right diagonal resize/move arrow shape
|
||||||
|
MOUSE_CURSOR_RESIZE_NESW = 8, // The top-right to bottom-left diagonal resize/move arrow shape
|
||||||
|
MOUSE_CURSOR_RESIZE_ALL = 9, // The omni-directional resize/move cursor shape
|
||||||
|
MOUSE_CURSOR_NOT_ALLOWED = 10 // The operation-not-allowed shape
|
||||||
|
} MouseCursor;
|
||||||
|
|
||||||
// Gamepad number
|
// Gamepad number
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GAMEPAD_PLAYER1 = 0,
|
GAMEPAD_PLAYER1 = 0,
|
||||||
|
@ -628,7 +640,7 @@ typedef enum {
|
||||||
GAMEPAD_PLAYER4 = 3
|
GAMEPAD_PLAYER4 = 3
|
||||||
} GamepadNumber;
|
} GamepadNumber;
|
||||||
|
|
||||||
// Gamepad Buttons
|
// Gamepad buttons
|
||||||
typedef enum {
|
typedef enum {
|
||||||
// This is here just for error checking
|
// This is here just for error checking
|
||||||
GAMEPAD_BUTTON_UNKNOWN = 0,
|
GAMEPAD_BUTTON_UNKNOWN = 0,
|
||||||
|
@ -664,24 +676,22 @@ typedef enum {
|
||||||
GAMEPAD_BUTTON_RIGHT_THUMB
|
GAMEPAD_BUTTON_RIGHT_THUMB
|
||||||
} GamepadButton;
|
} GamepadButton;
|
||||||
|
|
||||||
|
// Gamepad axis
|
||||||
typedef enum {
|
typedef enum {
|
||||||
// This is here just for error checking
|
|
||||||
GAMEPAD_AXIS_UNKNOWN = 0,
|
|
||||||
|
|
||||||
// Left stick
|
// Left stick
|
||||||
GAMEPAD_AXIS_LEFT_X,
|
GAMEPAD_AXIS_LEFT_X = 0,
|
||||||
GAMEPAD_AXIS_LEFT_Y,
|
GAMEPAD_AXIS_LEFT_Y = 1,
|
||||||
|
|
||||||
// Right stick
|
// Right stick
|
||||||
GAMEPAD_AXIS_RIGHT_X,
|
GAMEPAD_AXIS_RIGHT_X = 2,
|
||||||
GAMEPAD_AXIS_RIGHT_Y,
|
GAMEPAD_AXIS_RIGHT_Y = 3,
|
||||||
|
|
||||||
// Pressure levels for the back triggers
|
// Pressure levels for the back triggers
|
||||||
GAMEPAD_AXIS_LEFT_TRIGGER, // [1..-1] (pressure-level)
|
GAMEPAD_AXIS_LEFT_TRIGGER = 4, // [1..-1] (pressure-level)
|
||||||
GAMEPAD_AXIS_RIGHT_TRIGGER // [1..-1] (pressure-level)
|
GAMEPAD_AXIS_RIGHT_TRIGGER = 5 // [1..-1] (pressure-level)
|
||||||
} GamepadAxis;
|
} GamepadAxis;
|
||||||
|
|
||||||
// Shader location point type
|
// Shader location points
|
||||||
typedef enum {
|
typedef enum {
|
||||||
LOC_VERTEX_POSITION = 0,
|
LOC_VERTEX_POSITION = 0,
|
||||||
LOC_VERTEX_TEXCOORD01,
|
LOC_VERTEX_TEXCOORD01,
|
||||||
|
@ -726,7 +736,7 @@ typedef enum {
|
||||||
UNIFORM_SAMPLER2D
|
UNIFORM_SAMPLER2D
|
||||||
} ShaderUniformDataType;
|
} ShaderUniformDataType;
|
||||||
|
|
||||||
// Material map type
|
// Material maps
|
||||||
typedef enum {
|
typedef enum {
|
||||||
MAP_ALBEDO = 0, // MAP_DIFFUSE
|
MAP_ALBEDO = 0, // MAP_DIFFUSE
|
||||||
MAP_METALNESS = 1, // MAP_SPECULAR
|
MAP_METALNESS = 1, // MAP_SPECULAR
|
||||||
|
@ -782,7 +792,15 @@ typedef enum {
|
||||||
FILTER_ANISOTROPIC_16X, // Anisotropic filtering 16x
|
FILTER_ANISOTROPIC_16X, // Anisotropic filtering 16x
|
||||||
} TextureFilterMode;
|
} TextureFilterMode;
|
||||||
|
|
||||||
// Cubemap layout type
|
// Texture parameters: wrap mode
|
||||||
|
typedef enum {
|
||||||
|
WRAP_REPEAT = 0, // Repeats texture in tiled mode
|
||||||
|
WRAP_CLAMP, // Clamps texture to edge pixel in tiled mode
|
||||||
|
WRAP_MIRROR_REPEAT, // Mirrors and repeats the texture in tiled mode
|
||||||
|
WRAP_MIRROR_CLAMP // Mirrors and clamps to border the texture in tiled mode
|
||||||
|
} TextureWrapMode;
|
||||||
|
|
||||||
|
// Cubemap layouts
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CUBEMAP_AUTO_DETECT = 0, // Automatically detect layout type
|
CUBEMAP_AUTO_DETECT = 0, // Automatically detect layout type
|
||||||
CUBEMAP_LINE_VERTICAL, // Layout is defined by a vertical line with faces
|
CUBEMAP_LINE_VERTICAL, // Layout is defined by a vertical line with faces
|
||||||
|
@ -792,14 +810,6 @@ typedef enum {
|
||||||
CUBEMAP_PANORAMA // Layout is defined by a panorama image (equirectangular map)
|
CUBEMAP_PANORAMA // Layout is defined by a panorama image (equirectangular map)
|
||||||
} CubemapLayoutType;
|
} CubemapLayoutType;
|
||||||
|
|
||||||
// Texture parameters: wrap mode
|
|
||||||
typedef enum {
|
|
||||||
WRAP_REPEAT = 0, // Repeats texture in tiled mode
|
|
||||||
WRAP_CLAMP, // Clamps texture to edge pixel in tiled mode
|
|
||||||
WRAP_MIRROR_REPEAT, // Mirrors and repeats the texture in tiled mode
|
|
||||||
WRAP_MIRROR_CLAMP // Mirrors and clamps to border the texture in tiled mode
|
|
||||||
} TextureWrapMode;
|
|
||||||
|
|
||||||
// Font type, defines generation method
|
// Font type, defines generation method
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FONT_DEFAULT = 0, // Default font generation, anti-aliased
|
FONT_DEFAULT = 0, // Default font generation, anti-aliased
|
||||||
|
@ -811,7 +821,10 @@ typedef enum {
|
||||||
typedef enum {
|
typedef enum {
|
||||||
BLEND_ALPHA = 0, // Blend textures considering alpha (default)
|
BLEND_ALPHA = 0, // Blend textures considering alpha (default)
|
||||||
BLEND_ADDITIVE, // Blend textures adding colors
|
BLEND_ADDITIVE, // Blend textures adding colors
|
||||||
BLEND_MULTIPLIED // Blend textures multiplying colors
|
BLEND_MULTIPLIED, // Blend textures multiplying colors
|
||||||
|
BLEND_ADD_COLORS, // Blend textures adding colors (alternative)
|
||||||
|
BLEND_SUBTRACT_COLORS, // Blend textures subtracting colors (alternative)
|
||||||
|
BLEND_CUSTOM // Belnd textures using custom src/dst factors (use SetBlendModeCustom())
|
||||||
} BlendMode;
|
} BlendMode;
|
||||||
|
|
||||||
// Gestures type
|
// Gestures type
|
||||||
|
@ -845,7 +858,7 @@ typedef enum {
|
||||||
CAMERA_ORTHOGRAPHIC
|
CAMERA_ORTHOGRAPHIC
|
||||||
} CameraType;
|
} CameraType;
|
||||||
|
|
||||||
// Type of n-patch
|
// N-patch types
|
||||||
typedef enum {
|
typedef enum {
|
||||||
NPT_9PATCH = 0, // Npatch defined by 3x3 tiles
|
NPT_9PATCH = 0, // Npatch defined by 3x3 tiles
|
||||||
NPT_3PATCH_VERTICAL, // Npatch defined by 1x3 tiles
|
NPT_3PATCH_VERTICAL, // Npatch defined by 1x3 tiles
|
||||||
|
@ -873,13 +886,20 @@ RLAPI void InitWindow(int width, int height, const char *title); // Initialize
|
||||||
RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
|
RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
|
||||||
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
|
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
|
||||||
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
||||||
RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus)
|
RLAPI bool IsWindowMinimized(void); // Check if window has been minimized
|
||||||
|
RLAPI bool IsWindowMaximized(void); // Check if window has been maximized (only PLATFORM_DESKTOP)
|
||||||
|
RLAPI bool IsWindowFocused(void); // Check if window has been focused
|
||||||
RLAPI bool IsWindowResized(void); // Check if window has been resized
|
RLAPI bool IsWindowResized(void); // Check if window has been resized
|
||||||
RLAPI bool IsWindowHidden(void); // Check if window is currently hidden
|
RLAPI bool IsWindowHidden(void); // Check if window is currently hidden
|
||||||
RLAPI bool IsWindowFullscreen(void); // Check if window is currently fullscreen
|
RLAPI bool IsWindowFullscreen(void); // Check if window is currently fullscreen
|
||||||
RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP)
|
RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP)
|
||||||
RLAPI void UnhideWindow(void); // Show the window
|
RLAPI void UnhideWindow(void); // Show the window
|
||||||
RLAPI void HideWindow(void); // Hide the window
|
RLAPI void HideWindow(void); // Hide the window
|
||||||
|
RLAPI void DecorateWindow(void); // Decorate the window (only PLATFORM_DESKTOP)
|
||||||
|
RLAPI void UndecorateWindow(void); // Undecorate the window (only PLATFORM_DESKTOP)
|
||||||
|
RLAPI void MaximizeWindow(void); // Maximize the window, if resizable (only PLATFORM_DESKTOP)
|
||||||
|
RLAPI void RestoreWindow(void); // Restore the window, if resizable (only PLATFORM_DESKTOP)
|
||||||
|
|
||||||
RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP)
|
RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP)
|
||||||
RLAPI void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP)
|
RLAPI void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP)
|
||||||
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
|
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
|
||||||
|
@ -894,10 +914,12 @@ RLAPI int GetMonitorWidth(int monitor); // Get primary
|
||||||
RLAPI int GetMonitorHeight(int monitor); // Get primary monitor height
|
RLAPI int GetMonitorHeight(int monitor); // Get primary monitor height
|
||||||
RLAPI int GetMonitorPhysicalWidth(int monitor); // Get primary monitor physical width in millimetres
|
RLAPI int GetMonitorPhysicalWidth(int monitor); // Get primary monitor physical width in millimetres
|
||||||
RLAPI int GetMonitorPhysicalHeight(int monitor); // Get primary monitor physical height in millimetres
|
RLAPI int GetMonitorPhysicalHeight(int monitor); // Get primary monitor physical height in millimetres
|
||||||
|
RLAPI int GetMonitorRefreshRate(int monitor); // Get primary monitor refresh rate
|
||||||
RLAPI Vector2 GetWindowPosition(void); // Get window position XY on monitor
|
RLAPI Vector2 GetWindowPosition(void); // Get window position XY on monitor
|
||||||
|
RLAPI Vector2 GetWindowScaleDPI(void); // Get window scale DPI factor
|
||||||
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 const char *GetClipboardText(void); // Get clipboard text content
|
|
||||||
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
|
||||||
|
|
||||||
// Cursor-related functions
|
// Cursor-related functions
|
||||||
RLAPI void ShowCursor(void); // Shows cursor
|
RLAPI void ShowCursor(void); // Shows cursor
|
||||||
|
@ -905,6 +927,7 @@ RLAPI void HideCursor(void); // Hides curso
|
||||||
RLAPI bool IsCursorHidden(void); // Check if cursor is not visible
|
RLAPI bool IsCursorHidden(void); // Check if cursor is not visible
|
||||||
RLAPI void EnableCursor(void); // Enables cursor (unlock cursor)
|
RLAPI void EnableCursor(void); // Enables cursor (unlock cursor)
|
||||||
RLAPI void DisableCursor(void); // Disables cursor (lock cursor)
|
RLAPI void DisableCursor(void); // Disables cursor (lock cursor)
|
||||||
|
RLAPI bool IsCursorOnScreen(void); // Check if cursor is on the current screen.
|
||||||
|
|
||||||
// Drawing-related functions
|
// Drawing-related functions
|
||||||
RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color)
|
RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color)
|
||||||
|
@ -934,21 +957,14 @@ RLAPI int GetFPS(void); // Returns cur
|
||||||
RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn
|
RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn
|
||||||
RLAPI double GetTime(void); // Returns elapsed time in seconds since InitWindow()
|
RLAPI double GetTime(void); // Returns elapsed time in seconds since InitWindow()
|
||||||
|
|
||||||
// Color-related functions
|
|
||||||
RLAPI int ColorToInt(Color color); // Returns hexadecimal value for a Color
|
|
||||||
RLAPI Vector4 ColorNormalize(Color color); // Returns color normalized as float [0..1]
|
|
||||||
RLAPI Color ColorFromNormalized(Vector4 normalized); // Returns color from normalized values [0..1]
|
|
||||||
RLAPI Vector3 ColorToHSV(Color color); // Returns HSV values for a Color
|
|
||||||
RLAPI Color ColorFromHSV(Vector3 hsv); // Returns a Color from HSV values
|
|
||||||
RLAPI Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value
|
|
||||||
RLAPI Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f
|
|
||||||
|
|
||||||
// Misc. functions
|
// Misc. functions
|
||||||
RLAPI void SetConfigFlags(unsigned int flags); // Setup window configuration flags (view FLAGS)
|
RLAPI void SetConfigFlags(unsigned int flags); // Setup window configuration flags (view FLAGS)
|
||||||
|
|
||||||
RLAPI void SetTraceLogLevel(int logType); // Set the current threshold (minimum) log level
|
RLAPI void SetTraceLogLevel(int logType); // Set the current threshold (minimum) log level
|
||||||
RLAPI void SetTraceLogExit(int logType); // Set the exit threshold (minimum) log level
|
RLAPI void SetTraceLogExit(int logType); // Set the exit threshold (minimum) log level
|
||||||
RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set a trace log callback to enable custom logging
|
RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set a trace log callback to enable custom logging
|
||||||
RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)
|
RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)
|
||||||
|
|
||||||
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png)
|
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png)
|
||||||
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
|
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
|
||||||
|
|
||||||
|
@ -958,9 +974,9 @@ RLAPI void SaveFileData(const char *fileName, void *data, unsigned int bytesToWr
|
||||||
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 SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated
|
RLAPI void SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated
|
||||||
RLAPI bool FileExists(const char *fileName); // Check if file exists
|
RLAPI bool FileExists(const char *fileName); // Check if file exists
|
||||||
RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension
|
|
||||||
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 const char *GetExtension(const char *fileName); // Get pointer to extension for a filename string
|
RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension (including point: .png, .wav)
|
||||||
|
RLAPI const char *GetFileExtension(const char *fileName); // Get pointer to extension for a filename string (including point: ".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)
|
||||||
|
@ -968,14 +984,14 @@ RLAPI const char *GetPrevDirectoryPath(const char *dirPath); // Get previou
|
||||||
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 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 void ClearDirectoryFiles(void); // Clear directory files paths buffers (free memory)
|
||||||
RLAPI bool ChangeDirectory(const char *dir); // Change working directory, returns true if success
|
RLAPI bool ChangeDirectory(const char *dir); // Change working directory, return true on success
|
||||||
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 **GetDroppedFiles(int *count); // Get dropped files names (memory should be freed)
|
RLAPI char **GetDroppedFiles(int *count); // Get dropped files names (memory should be freed)
|
||||||
RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer (free memory)
|
RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer (free memory)
|
||||||
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)
|
||||||
|
|
||||||
RLAPI unsigned char *CompressData(unsigned char *data, int dataLength, int *compDataLength); // Compress data (DEFLATE algorythm)
|
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 algorythm)
|
RLAPI unsigned char *DecompressData(unsigned char *compData, int compDataLength, int *dataLength); // Decompress data (DEFLATE algorithm)
|
||||||
|
|
||||||
// Persistent storage management
|
// Persistent storage management
|
||||||
RLAPI void SaveStorageValue(unsigned int position, int value); // Save integer value to storage file (to defined position)
|
RLAPI void SaveStorageValue(unsigned int position, int value); // Save integer value to storage file (to defined position)
|
||||||
|
@ -1018,7 +1034,9 @@ RLAPI Vector2 GetMousePosition(void); // Returns mouse p
|
||||||
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 int GetMouseWheelMove(void); // Returns mouse wheel movement Y
|
RLAPI float GetMouseWheelMove(void); // Returns mouse wheel movement Y
|
||||||
|
RLAPI int GetMouseCursor(void); // Returns mouse cursor if (MouseCursor enum)
|
||||||
|
RLAPI void SetMouseCursor(int cursor); // Set mouse cursor
|
||||||
|
|
||||||
// Input-related functions: touch
|
// Input-related functions: touch
|
||||||
RLAPI int GetTouchX(void); // Returns touch position X for touch point 0 (relative to screen size)
|
RLAPI int GetTouchX(void); // Returns touch position X for touch point 0 (relative to screen size)
|
||||||
|
@ -1105,14 +1123,12 @@ RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Ve
|
||||||
// Image loading functions
|
// Image loading functions
|
||||||
// NOTE: This functions do not require GPU access
|
// NOTE: This functions do not require GPU access
|
||||||
RLAPI Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
|
RLAPI Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
|
||||||
RLAPI Image LoadImageEx(Color *pixels, int width, int height); // Load image from Color array data (RGBA - 32bit)
|
|
||||||
RLAPI Image LoadImagePro(void *data, int width, int height, int format); // Load image from raw data with parameters
|
|
||||||
RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
|
RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
|
||||||
|
RLAPI Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data)
|
||||||
|
RLAPI Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. "png"
|
||||||
RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM)
|
RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM)
|
||||||
RLAPI void ExportImage(Image image, const char *fileName); // Export image data to file
|
RLAPI void ExportImage(Image image, const char *fileName); // Export image data to file
|
||||||
RLAPI void ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes
|
RLAPI void ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes
|
||||||
RLAPI Color *GetImageData(Image image); // Get pixel data from image as a Color struct array
|
|
||||||
RLAPI Vector4 *GetImageDataNormalized(Image image); // Get pixel data from image as Vector4 array (float normalized)
|
|
||||||
|
|
||||||
// Image generation functions
|
// Image generation functions
|
||||||
RLAPI Image GenImageColor(int width, int height, Color color); // Generate image: plain color
|
RLAPI Image GenImageColor(int width, int height, Color color); // Generate image: plain color
|
||||||
|
@ -1129,16 +1145,16 @@ RLAPI Image ImageCopy(Image image);
|
||||||
RLAPI Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
|
RLAPI Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
|
||||||
RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
|
RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
|
||||||
RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
|
RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
|
||||||
RLAPI void ImageToPOT(Image *image, Color fillColor); // Convert image to POT (power-of-two)
|
|
||||||
RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
|
RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
|
||||||
RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
RLAPI void ImageToPOT(Image *image, Color fill); // Convert image to POT (power-of-two)
|
||||||
RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color
|
|
||||||
RLAPI void ImageAlphaCrop(Image *image, float threshold); // Crop image depending on alpha value
|
|
||||||
RLAPI void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
|
|
||||||
RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle
|
RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle
|
||||||
|
RLAPI void ImageAlphaCrop(Image *image, float threshold); // Crop image depending on alpha value
|
||||||
|
RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color
|
||||||
|
RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
||||||
|
RLAPI void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
|
||||||
RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
|
RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
|
||||||
RLAPI void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
|
RLAPI void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
|
||||||
RLAPI void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color color); // Resize canvas and fill with color
|
RLAPI void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
|
||||||
RLAPI void ImageMipmaps(Image *image); // Generate all mipmap levels for a provided image
|
RLAPI void ImageMipmaps(Image *image); // Generate all mipmap levels for a provided image
|
||||||
RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
|
RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
|
||||||
RLAPI void ImageFlipVertical(Image *image); // Flip image vertically
|
RLAPI void ImageFlipVertical(Image *image); // Flip image vertically
|
||||||
|
@ -1151,7 +1167,10 @@ RLAPI void ImageColorGrayscale(Image *image);
|
||||||
RLAPI void ImageColorContrast(Image *image, float contrast); // Modify image color: contrast (-100 to 100)
|
RLAPI void ImageColorContrast(Image *image, float contrast); // Modify image color: contrast (-100 to 100)
|
||||||
RLAPI void ImageColorBrightness(Image *image, int brightness); // Modify image color: brightness (-255 to 255)
|
RLAPI void ImageColorBrightness(Image *image, int brightness); // Modify image color: brightness (-255 to 255)
|
||||||
RLAPI void ImageColorReplace(Image *image, Color color, Color replace); // Modify image color: replace color
|
RLAPI void ImageColorReplace(Image *image, Color color, Color replace); // Modify image color: replace color
|
||||||
RLAPI Color *ImageExtractPalette(Image image, int maxPaletteSize, int *extractCount); // Extract color palette from image to maximum size (memory should be freed)
|
|
||||||
|
RLAPI Color *GetImageData(Image image); // Get pixel data from image as a Color struct array
|
||||||
|
RLAPI Color *GetImagePalette(Image image, int maxPaletteSize, int *extractCount); // Get color palette from image to maximum size (memory should be freed)
|
||||||
|
RLAPI Vector4 *GetImageDataNormalized(Image image); // Get pixel data from image as Vector4 array (float normalized)
|
||||||
RLAPI Rectangle GetImageAlphaBorder(Image image, float threshold); // Get image alpha border rectangle
|
RLAPI Rectangle GetImageAlphaBorder(Image image, float threshold); // Get image alpha border rectangle
|
||||||
|
|
||||||
// Image drawing functions
|
// Image drawing functions
|
||||||
|
@ -1168,8 +1187,8 @@ RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color
|
||||||
RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
||||||
RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
|
RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
|
||||||
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)
|
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)
|
||||||
RLAPI void ImageDrawText(Image *dst, Vector2 position, const char *text, int fontSize, Color color); // Draw text (default font) within an image (destination)
|
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)
|
||||||
RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, Font font, const char *text, float fontSize, float spacing, Color color); // Draw text (custom sprite font) within an image (destination)
|
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)
|
||||||
|
|
||||||
// Texture loading functions
|
// Texture loading functions
|
||||||
// NOTE: These functions require GPU access
|
// NOTE: These functions require GPU access
|
||||||
|
@ -1180,6 +1199,7 @@ RLAPI RenderTexture2D LoadRenderTexture(int width, int height);
|
||||||
RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
|
RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
|
||||||
RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
|
RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
|
||||||
RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
|
RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
|
||||||
|
RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data
|
||||||
RLAPI Image GetTextureData(Texture2D texture); // Get pixel data from GPU texture and return an Image
|
RLAPI Image GetTextureData(Texture2D texture); // Get pixel data from GPU texture and return an Image
|
||||||
RLAPI Image GetScreenData(void); // Get pixel data from screen buffer and return an Image (screenshot)
|
RLAPI Image GetScreenData(void); // Get pixel data from screen buffer and return an Image (screenshot)
|
||||||
|
|
||||||
|
@ -1194,11 +1214,23 @@ 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 sourceRec, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
|
RLAPI void DrawTextureRec(Texture2D texture, Rectangle sourceRec, 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 sourceRec, Rectangle destRec, Vector2 origin, float rotation, float scale, Color tint); // Draw part of a texture (defined by a rectangle) with rotation and scale tiled into destRec.
|
||||||
RLAPI void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle destRec, 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 sourceRec, Rectangle destRec, 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 destRec, 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 destRec, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
|
||||||
|
|
||||||
// Image/Texture misc functions
|
// Color/pixel related functions
|
||||||
RLAPI int GetPixelDataSize(int width, int height, int format); // Get pixel data size in bytes (image or texture)
|
RLAPI Color Fade(Color color, float alpha); // Returns color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||||
|
RLAPI int ColorToInt(Color color); // Returns hexadecimal value for a Color
|
||||||
|
RLAPI Vector4 ColorNormalize(Color color); // Returns Color normalized as float [0..1]
|
||||||
|
RLAPI Color ColorFromNormalized(Vector4 normalized); // Returns Color from normalized values [0..1]
|
||||||
|
RLAPI Vector3 ColorToHSV(Color color); // Returns HSV values for a Color
|
||||||
|
RLAPI Color ColorFromHSV(float hue, float saturation, float value); // Returns a Color from HSV values
|
||||||
|
RLAPI Color ColorAlpha(Color color, float alpha); // Returns color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||||
|
RLAPI Color ColorAlphaBlend(Color dst, Color src, Color tint); // Returns src alpha-blended into dst color with tint
|
||||||
|
RLAPI Color GetColor(int hexValue); // Get Color structure from hexadecimal value
|
||||||
|
RLAPI Color GetPixelColor(void *srcPtr, int format); // Get Color from a source pixel pointer of certain format
|
||||||
|
RLAPI void SetPixelColor(void *dstPtr, Color color, int format); // Set color formatted into destination pixel pointer
|
||||||
|
RLAPI int GetPixelDataSize(int width, int height, int format); // Get pixel data size in bytes for certain format
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Font Loading and Text Drawing Functions (Module: text)
|
// Font Loading and Text Drawing Functions (Module: text)
|
||||||
|
@ -1209,7 +1241,8 @@ RLAPI Font GetFontDefault(void);
|
||||||
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 charsCount); // Load font from file with extended parameters
|
RLAPI Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int charsCount); // Load font from file with extended parameters
|
||||||
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 CharInfo *LoadFontData(const char *fileName, int fontSize, int *fontChars, int charsCount, int type); // Load font data for further use
|
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount); // Load font from memory buffer, fileType refers to extension: i.e. "ttf"
|
||||||
|
RLAPI CharInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount, int type); // Load font data for further use
|
||||||
RLAPI Image GenImageFontAtlas(const CharInfo *chars, Rectangle **recs, int charsCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
RLAPI Image GenImageFontAtlas(const CharInfo *chars, Rectangle **recs, int charsCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
||||||
RLAPI void UnloadFont(Font font); // Unload Font from GPU memory (VRAM)
|
RLAPI void UnloadFont(Font font); // Unload Font from GPU memory (VRAM)
|
||||||
|
|
||||||
|
@ -1260,6 +1293,8 @@ RLAPI const char *CodepointToUtf8(int codepoint, int *byteLength); // Encode
|
||||||
RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
|
RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
|
||||||
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 DrawTriangleStrip3D(Vector3 *points, int pointsCount, 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
|
||||||
|
@ -1274,7 +1309,6 @@ RLAPI void DrawPlane(Vector3 centerPos, Vector2 size, Color color);
|
||||||
RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line
|
RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line
|
||||||
RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0))
|
RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0))
|
||||||
RLAPI void DrawGizmo(Vector3 position); // Draw simple gizmo
|
RLAPI void DrawGizmo(Vector3 position); // Draw simple gizmo
|
||||||
//DrawTorus(), DrawTeapot() could be useful?
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Model 3d Loading and Drawing Functions (Module: models)
|
// Model 3d Loading and Drawing Functions (Module: models)
|
||||||
|
@ -1319,6 +1353,7 @@ RLAPI Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize);
|
||||||
RLAPI BoundingBox MeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits
|
RLAPI BoundingBox MeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits
|
||||||
RLAPI void MeshTangents(Mesh *mesh); // Compute mesh tangents
|
RLAPI void MeshTangents(Mesh *mesh); // Compute mesh tangents
|
||||||
RLAPI void MeshBinormals(Mesh *mesh); // Compute mesh binormals
|
RLAPI void MeshBinormals(Mesh *mesh); // Compute mesh binormals
|
||||||
|
RLAPI void MeshNormalsSmooth(Mesh *mesh); // Smooth (average) vertex normals
|
||||||
|
|
||||||
// Model drawing functions
|
// Model drawing functions
|
||||||
RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
|
RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
|
||||||
|
@ -1358,6 +1393,7 @@ RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Def
|
||||||
|
|
||||||
// Shader configuration functions
|
// Shader configuration functions
|
||||||
RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
|
RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
|
||||||
|
RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
|
||||||
RLAPI void SetShaderValue(Shader shader, int uniformLoc, const void *value, int uniformType); // Set shader uniform value
|
RLAPI void SetShaderValue(Shader shader, int uniformLoc, const void *value, int uniformType); // Set shader uniform value
|
||||||
RLAPI void SetShaderValueV(Shader shader, int uniformLoc, const void *value, int uniformType, int count); // Set shader uniform value vector
|
RLAPI void SetShaderValueV(Shader shader, int uniformLoc, const void *value, int uniformType, int count); // Set shader uniform value vector
|
||||||
RLAPI void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat); // Set shader uniform value (matrix 4x4)
|
RLAPI void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat); // Set shader uniform value (matrix 4x4)
|
||||||
|
@ -1369,9 +1405,9 @@ RLAPI Matrix GetMatrixProjection(void); // Get
|
||||||
|
|
||||||
// Texture maps generation (PBR)
|
// Texture maps generation (PBR)
|
||||||
// NOTE: Required shaders should be provided
|
// NOTE: Required shaders should be provided
|
||||||
RLAPI Texture2D GenTextureCubemap(Shader shader, Texture2D map, int size); // Generate cubemap texture from 2D texture
|
RLAPI TextureCubemap GenTextureCubemap(Shader shader, Texture2D panorama, int size, int format); // Generate cubemap texture from 2D panorama texture
|
||||||
RLAPI Texture2D GenTextureIrradiance(Shader shader, Texture2D cubemap, int size); // Generate irradiance texture using cubemap data
|
RLAPI TextureCubemap GenTextureIrradiance(Shader shader, TextureCubemap cubemap, int size); // Generate irradiance texture using cubemap data
|
||||||
RLAPI Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size); // Generate prefilter texture using cubemap data
|
RLAPI TextureCubemap GenTexturePrefilter(Shader shader, TextureCubemap cubemap, int size); // Generate prefilter texture using cubemap data
|
||||||
RLAPI Texture2D GenTextureBRDF(Shader shader, int size); // Generate BRDF texture
|
RLAPI Texture2D GenTextureBRDF(Shader shader, int size); // Generate BRDF texture
|
||||||
|
|
||||||
// Shading begin/end functions
|
// Shading begin/end functions
|
||||||
|
@ -1402,6 +1438,7 @@ RLAPI void SetMasterVolume(float volume); // Set mas
|
||||||
|
|
||||||
// Wave/Sound loading/unloading functions
|
// Wave/Sound loading/unloading functions
|
||||||
RLAPI Wave LoadWave(const char *fileName); // Load wave data from file
|
RLAPI Wave LoadWave(const char *fileName); // Load wave data from file
|
||||||
|
RLAPI Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load wave from memory buffer, fileType refers to extension: i.e. "wav"
|
||||||
RLAPI Sound LoadSound(const char *fileName); // Load sound from file
|
RLAPI Sound LoadSound(const char *fileName); // Load sound from file
|
||||||
RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
|
RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
|
||||||
RLAPI void UpdateSound(Sound sound, const void *data, int samplesCount);// Update sound buffer with new data
|
RLAPI void UpdateSound(Sound sound, const void *data, int samplesCount);// Update sound buffer with new data
|
||||||
|
@ -1437,7 +1474,6 @@ RLAPI void ResumeMusicStream(Music music); // Resume
|
||||||
RLAPI bool IsMusicPlaying(Music music); // Check if music is playing
|
RLAPI bool IsMusicPlaying(Music music); // Check if music is playing
|
||||||
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 SetMusicLoopCount(Music music, int count); // Set music loop count (loop repeats)
|
|
||||||
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)
|
||||||
|
|
||||||
|
|
|
@ -72,21 +72,6 @@
|
||||||
**********************************************************************************************/
|
**********************************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
// Some basic Defines
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
#define MAX_TOUCH_POINTS 10 // Maximum number of touch points supported
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
// Structures Definition
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
// Vector2 type
|
// Vector2 type
|
||||||
typedef struct Vector2 {
|
typedef struct Vector2 {
|
||||||
float x;
|
float x;
|
||||||
|
@ -145,32 +130,31 @@ typedef struct Image {
|
||||||
int format; // Data format (PixelFormat type)
|
int format; // Data format (PixelFormat type)
|
||||||
} Image;
|
} Image;
|
||||||
|
|
||||||
// Texture2D type
|
// Texture type
|
||||||
// NOTE: Data stored in GPU memory
|
// NOTE: Data stored in GPU memory
|
||||||
typedef struct Texture2D {
|
typedef struct Texture {
|
||||||
unsigned int id; // OpenGL texture id
|
unsigned int id; // OpenGL texture id
|
||||||
int width; // Texture base width
|
int width; // Texture base width
|
||||||
int height; // Texture base height
|
int height; // Texture base height
|
||||||
int mipmaps; // Mipmap levels, 1 by default
|
int mipmaps; // Mipmap levels, 1 by default
|
||||||
int format; // Data format (PixelFormat type)
|
int format; // Data format (PixelFormat type)
|
||||||
} Texture2D;
|
} Texture;
|
||||||
|
|
||||||
// Texture type, same as Texture2D
|
// Texture2D type, same as Texture
|
||||||
typedef Texture2D Texture;
|
typedef Texture Texture2D;
|
||||||
|
|
||||||
// TextureCubemap type, actually, same as Texture2D
|
// TextureCubemap type, actually, same as Texture
|
||||||
typedef Texture2D TextureCubemap;
|
typedef Texture TextureCubemap;
|
||||||
|
|
||||||
// RenderTexture2D type, for texture rendering
|
// RenderTexture type, for texture rendering
|
||||||
typedef struct RenderTexture2D {
|
typedef struct RenderTexture {
|
||||||
unsigned int id; // OpenGL Framebuffer Object (FBO) id
|
unsigned int id; // OpenGL Framebuffer Object (FBO) id
|
||||||
Texture2D texture; // Color buffer attachment texture
|
Texture texture; // Color buffer attachment texture
|
||||||
Texture2D depth; // Depth buffer attachment texture
|
Texture depth; // Depth buffer attachment texture
|
||||||
bool depthTexture; // Track if depth attachment is a texture or renderbuffer
|
} RenderTexture;
|
||||||
} RenderTexture2D;
|
|
||||||
|
|
||||||
// RenderTexture type, same as RenderTexture2D
|
// RenderTexture2D type, same as RenderTexture
|
||||||
typedef RenderTexture2D RenderTexture;
|
typedef RenderTexture RenderTexture2D;
|
||||||
|
|
||||||
// N-Patch layout info
|
// N-Patch layout info
|
||||||
typedef struct NPatchInfo {
|
typedef struct NPatchInfo {
|
||||||
|
@ -200,6 +184,7 @@ typedef struct Font {
|
||||||
CharInfo *chars; // Characters info data
|
CharInfo *chars; // Characters info data
|
||||||
} Font;
|
} Font;
|
||||||
|
|
||||||
|
//#define SpriteFont Font // SpriteFont type fallback, defaults to Font
|
||||||
|
|
||||||
// Camera type, defines a camera position/orientation in 3d space
|
// Camera type, defines a camera position/orientation in 3d space
|
||||||
typedef struct Camera3D {
|
typedef struct Camera3D {
|
||||||
|
@ -284,9 +269,8 @@ typedef struct Model {
|
||||||
Matrix transform; // Local transform matrix
|
Matrix transform; // Local transform matrix
|
||||||
|
|
||||||
int meshCount; // Number of meshes
|
int meshCount; // Number of meshes
|
||||||
Mesh *meshes; // Meshes array
|
|
||||||
|
|
||||||
int materialCount; // Number of materials
|
int materialCount; // Number of materials
|
||||||
|
Mesh *meshes; // Meshes array
|
||||||
Material *materials; // Materials array
|
Material *materials; // Materials array
|
||||||
int *meshMaterial; // Mesh material number
|
int *meshMaterial; // Mesh material number
|
||||||
|
|
||||||
|
@ -299,9 +283,8 @@ typedef struct Model {
|
||||||
// Model animation
|
// Model animation
|
||||||
typedef struct ModelAnimation {
|
typedef struct ModelAnimation {
|
||||||
int boneCount; // Number of bones
|
int boneCount; // Number of bones
|
||||||
BoneInfo *bones; // Bones information (skeleton)
|
|
||||||
|
|
||||||
int frameCount; // Number of animation frames
|
int frameCount; // Number of animation frames
|
||||||
|
BoneInfo *bones; // Bones information (skeleton)
|
||||||
Transform **framePoses; // Poses array by frame
|
Transform **framePoses; // Poses array by frame
|
||||||
} ModelAnimation;
|
} ModelAnimation;
|
||||||
|
|
||||||
|
@ -339,29 +322,28 @@ typedef struct rAudioBuffer rAudioBuffer;
|
||||||
// Audio stream type
|
// Audio stream type
|
||||||
// NOTE: Useful to create custom audio streams not bound to a specific file
|
// NOTE: Useful to create custom audio streams not bound to a specific file
|
||||||
typedef struct AudioStream {
|
typedef struct AudioStream {
|
||||||
|
rAudioBuffer *buffer; // Pointer to internal data used by the audio system
|
||||||
|
|
||||||
unsigned int sampleRate; // Frequency (samples per second)
|
unsigned int sampleRate; // Frequency (samples per second)
|
||||||
unsigned int sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
|
unsigned int sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
|
||||||
unsigned int channels; // Number of channels (1-mono, 2-stereo)
|
unsigned int channels; // Number of channels (1-mono, 2-stereo)
|
||||||
|
|
||||||
rAudioBuffer *buffer; // Pointer to internal data used by the audio system
|
|
||||||
} AudioStream;
|
} AudioStream;
|
||||||
|
|
||||||
// Sound source type
|
// Sound source type
|
||||||
typedef struct Sound {
|
typedef struct Sound {
|
||||||
unsigned int sampleCount; // Total number of samples
|
|
||||||
AudioStream stream; // Audio stream
|
AudioStream stream; // Audio stream
|
||||||
|
unsigned int sampleCount; // Total number of samples
|
||||||
} Sound;
|
} Sound;
|
||||||
|
|
||||||
// Music stream type (audio file streaming from memory)
|
// Music stream type (audio file streaming from memory)
|
||||||
// NOTE: Anything longer than ~10 seconds should be streamed
|
// NOTE: Anything longer than ~10 seconds should be streamed
|
||||||
typedef struct Music {
|
typedef struct Music {
|
||||||
|
AudioStream stream; // Audio stream
|
||||||
|
unsigned int sampleCount; // Total number of samples
|
||||||
|
bool looping; // Music looping enable
|
||||||
|
|
||||||
int ctxType; // Type of music context (audio filetype)
|
int ctxType; // Type of music context (audio filetype)
|
||||||
void *ctxData; // Audio context data, depends on type
|
void *ctxData; // Audio context data, depends on type
|
||||||
|
|
||||||
unsigned int sampleCount; // Total number of samples
|
|
||||||
unsigned int loopCount; // Loops count (times music will play), 0 means infinite loop
|
|
||||||
|
|
||||||
AudioStream stream; // Audio stream
|
|
||||||
} Music;
|
} Music;
|
||||||
|
|
||||||
// Head-Mounted-Display device parameters
|
// Head-Mounted-Display device parameters
|
||||||
|
@ -392,7 +374,8 @@ typedef enum {
|
||||||
FLAG_WINDOW_HIDDEN = 128, // Set to create the window initially hidden
|
FLAG_WINDOW_HIDDEN = 128, // Set to create the window initially hidden
|
||||||
FLAG_WINDOW_ALWAYS_RUN = 256, // Set to allow windows running while minimized
|
FLAG_WINDOW_ALWAYS_RUN = 256, // Set to allow windows running while minimized
|
||||||
FLAG_MSAA_4X_HINT = 32, // Set to try enabling MSAA 4X
|
FLAG_MSAA_4X_HINT = 32, // Set to try enabling MSAA 4X
|
||||||
FLAG_VSYNC_HINT = 64 // Set to try enabling V-Sync on GPU
|
FLAG_VSYNC_HINT = 64, // Set to try enabling V-Sync on GPU
|
||||||
|
FLAG_INTERLACED_HINT = 512 // Set to try V3D to choose an interlaced video format
|
||||||
} ConfigFlag;
|
} ConfigFlag;
|
||||||
|
|
||||||
// Trace log type
|
// Trace log type
|
||||||
|
@ -536,6 +519,21 @@ typedef enum {
|
||||||
MOUSE_MIDDLE_BUTTON = 2
|
MOUSE_MIDDLE_BUTTON = 2
|
||||||
} MouseButton;
|
} MouseButton;
|
||||||
|
|
||||||
|
// Mouse cursor types
|
||||||
|
typedef enum {
|
||||||
|
MOUSE_CURSOR_DEFAULT = 0,
|
||||||
|
MOUSE_CURSOR_ARROW = 1,
|
||||||
|
MOUSE_CURSOR_IBEAM = 2,
|
||||||
|
MOUSE_CURSOR_CROSSHAIR = 3,
|
||||||
|
MOUSE_CURSOR_POINTING_HAND = 4,
|
||||||
|
MOUSE_CURSOR_RESIZE_EW = 5, // The horizontal resize/move arrow shape
|
||||||
|
MOUSE_CURSOR_RESIZE_NS = 6, // The vertical resize/move arrow shape
|
||||||
|
MOUSE_CURSOR_RESIZE_NWSE = 7, // The top-left to bottom-right diagonal resize/move arrow shape
|
||||||
|
MOUSE_CURSOR_RESIZE_NESW = 8, // The top-right to bottom-left diagonal resize/move arrow shape
|
||||||
|
MOUSE_CURSOR_RESIZE_ALL = 9, // The omni-directional resize/move cursor shape
|
||||||
|
MOUSE_CURSOR_NOT_ALLOWED = 10 // The operation-not-allowed shape
|
||||||
|
} MouseCursor;
|
||||||
|
|
||||||
// Gamepad number
|
// Gamepad number
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GAMEPAD_PLAYER1 = 0,
|
GAMEPAD_PLAYER1 = 0,
|
||||||
|
@ -544,7 +542,7 @@ typedef enum {
|
||||||
GAMEPAD_PLAYER4 = 3
|
GAMEPAD_PLAYER4 = 3
|
||||||
} GamepadNumber;
|
} GamepadNumber;
|
||||||
|
|
||||||
// Gamepad Buttons
|
// Gamepad buttons
|
||||||
typedef enum {
|
typedef enum {
|
||||||
// This is here just for error checking
|
// This is here just for error checking
|
||||||
GAMEPAD_BUTTON_UNKNOWN = 0,
|
GAMEPAD_BUTTON_UNKNOWN = 0,
|
||||||
|
@ -580,24 +578,22 @@ typedef enum {
|
||||||
GAMEPAD_BUTTON_RIGHT_THUMB
|
GAMEPAD_BUTTON_RIGHT_THUMB
|
||||||
} GamepadButton;
|
} GamepadButton;
|
||||||
|
|
||||||
|
// Gamepad axis
|
||||||
typedef enum {
|
typedef enum {
|
||||||
// This is here just for error checking
|
|
||||||
GAMEPAD_AXIS_UNKNOWN = 0,
|
|
||||||
|
|
||||||
// Left stick
|
// Left stick
|
||||||
GAMEPAD_AXIS_LEFT_X,
|
GAMEPAD_AXIS_LEFT_X = 0,
|
||||||
GAMEPAD_AXIS_LEFT_Y,
|
GAMEPAD_AXIS_LEFT_Y = 1,
|
||||||
|
|
||||||
// Right stick
|
// Right stick
|
||||||
GAMEPAD_AXIS_RIGHT_X,
|
GAMEPAD_AXIS_RIGHT_X = 2,
|
||||||
GAMEPAD_AXIS_RIGHT_Y,
|
GAMEPAD_AXIS_RIGHT_Y = 3,
|
||||||
|
|
||||||
// Pressure levels for the back triggers
|
// Pressure levels for the back triggers
|
||||||
GAMEPAD_AXIS_LEFT_TRIGGER, // [1..-1] (pressure-level)
|
GAMEPAD_AXIS_LEFT_TRIGGER = 4, // [1..-1] (pressure-level)
|
||||||
GAMEPAD_AXIS_RIGHT_TRIGGER // [1..-1] (pressure-level)
|
GAMEPAD_AXIS_RIGHT_TRIGGER = 5 // [1..-1] (pressure-level)
|
||||||
} GamepadAxis;
|
} GamepadAxis;
|
||||||
|
|
||||||
// Shader location point type
|
// Shader location points
|
||||||
typedef enum {
|
typedef enum {
|
||||||
LOC_VERTEX_POSITION = 0,
|
LOC_VERTEX_POSITION = 0,
|
||||||
LOC_VERTEX_TEXCOORD01,
|
LOC_VERTEX_TEXCOORD01,
|
||||||
|
@ -626,8 +622,8 @@ typedef enum {
|
||||||
LOC_MAP_BRDF
|
LOC_MAP_BRDF
|
||||||
} ShaderLocationIndex;
|
} ShaderLocationIndex;
|
||||||
|
|
||||||
#define LOC_MAP_DIFFUSE 14
|
#define LOC_MAP_DIFFUSE 14 //LOC_MAP_ALBEDO
|
||||||
#define LOC_MAP_SPECULAR 15
|
#define LOC_MAP_SPECULAR 15 //LOC_MAP_METALNESS
|
||||||
|
|
||||||
// Shader uniform data types
|
// Shader uniform data types
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -642,7 +638,7 @@ typedef enum {
|
||||||
UNIFORM_SAMPLER2D
|
UNIFORM_SAMPLER2D
|
||||||
} ShaderUniformDataType;
|
} ShaderUniformDataType;
|
||||||
|
|
||||||
// Material map type
|
// Material maps
|
||||||
typedef enum {
|
typedef enum {
|
||||||
MAP_ALBEDO = 0, // MAP_DIFFUSE
|
MAP_ALBEDO = 0, // MAP_DIFFUSE
|
||||||
MAP_METALNESS = 1, // MAP_SPECULAR
|
MAP_METALNESS = 1, // MAP_SPECULAR
|
||||||
|
@ -657,8 +653,8 @@ typedef enum {
|
||||||
MAP_BRDF
|
MAP_BRDF
|
||||||
} MaterialMapType;
|
} MaterialMapType;
|
||||||
|
|
||||||
#define MAP_DIFFUSE 0
|
#define MAP_DIFFUSE 0 //MAP_ALBEDO
|
||||||
#define MAP_SPECULAR 1
|
#define MAP_SPECULAR 1 //MAP_METALNESS
|
||||||
|
|
||||||
// Pixel formats
|
// Pixel formats
|
||||||
// NOTE: Support depends on OpenGL version and platform
|
// NOTE: Support depends on OpenGL version and platform
|
||||||
|
@ -698,7 +694,15 @@ typedef enum {
|
||||||
FILTER_ANISOTROPIC_16X, // Anisotropic filtering 16x
|
FILTER_ANISOTROPIC_16X, // Anisotropic filtering 16x
|
||||||
} TextureFilterMode;
|
} TextureFilterMode;
|
||||||
|
|
||||||
// Cubemap layout type
|
// Texture parameters: wrap mode
|
||||||
|
typedef enum {
|
||||||
|
WRAP_REPEAT = 0, // Repeats texture in tiled mode
|
||||||
|
WRAP_CLAMP, // Clamps texture to edge pixel in tiled mode
|
||||||
|
WRAP_MIRROR_REPEAT, // Mirrors and repeats the texture in tiled mode
|
||||||
|
WRAP_MIRROR_CLAMP // Mirrors and clamps to border the texture in tiled mode
|
||||||
|
} TextureWrapMode;
|
||||||
|
|
||||||
|
// Cubemap layouts
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CUBEMAP_AUTO_DETECT = 0, // Automatically detect layout type
|
CUBEMAP_AUTO_DETECT = 0, // Automatically detect layout type
|
||||||
CUBEMAP_LINE_VERTICAL, // Layout is defined by a vertical line with faces
|
CUBEMAP_LINE_VERTICAL, // Layout is defined by a vertical line with faces
|
||||||
|
@ -708,14 +712,6 @@ typedef enum {
|
||||||
CUBEMAP_PANORAMA // Layout is defined by a panorama image (equirectangular map)
|
CUBEMAP_PANORAMA // Layout is defined by a panorama image (equirectangular map)
|
||||||
} CubemapLayoutType;
|
} CubemapLayoutType;
|
||||||
|
|
||||||
// Texture parameters: wrap mode
|
|
||||||
typedef enum {
|
|
||||||
WRAP_REPEAT = 0, // Repeats texture in tiled mode
|
|
||||||
WRAP_CLAMP, // Clamps texture to edge pixel in tiled mode
|
|
||||||
WRAP_MIRROR_REPEAT, // Mirrors and repeats the texture in tiled mode
|
|
||||||
WRAP_MIRROR_CLAMP // Mirrors and clamps to border the texture in tiled mode
|
|
||||||
} TextureWrapMode;
|
|
||||||
|
|
||||||
// Font type, defines generation method
|
// Font type, defines generation method
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FONT_DEFAULT = 0, // Default font generation, anti-aliased
|
FONT_DEFAULT = 0, // Default font generation, anti-aliased
|
||||||
|
@ -727,7 +723,10 @@ typedef enum {
|
||||||
typedef enum {
|
typedef enum {
|
||||||
BLEND_ALPHA = 0, // Blend textures considering alpha (default)
|
BLEND_ALPHA = 0, // Blend textures considering alpha (default)
|
||||||
BLEND_ADDITIVE, // Blend textures adding colors
|
BLEND_ADDITIVE, // Blend textures adding colors
|
||||||
BLEND_MULTIPLIED // Blend textures multiplying colors
|
BLEND_MULTIPLIED, // Blend textures multiplying colors
|
||||||
|
BLEND_ADD_COLORS, // Blend textures adding colors (alternative)
|
||||||
|
BLEND_SUBTRACT_COLORS, // Blend textures subtracting colors (alternative)
|
||||||
|
BLEND_CUSTOM // Belnd textures using custom src/dst factors (use SetBlendModeCustom())
|
||||||
} BlendMode;
|
} BlendMode;
|
||||||
|
|
||||||
// Gestures type
|
// Gestures type
|
||||||
|
@ -761,13 +760,15 @@ typedef enum {
|
||||||
CAMERA_ORTHOGRAPHIC
|
CAMERA_ORTHOGRAPHIC
|
||||||
} CameraType;
|
} CameraType;
|
||||||
|
|
||||||
// Type of n-patch
|
// N-patch types
|
||||||
typedef enum {
|
typedef enum {
|
||||||
NPT_9PATCH = 0, // Npatch defined by 3x3 tiles
|
NPT_9PATCH = 0, // Npatch defined by 3x3 tiles
|
||||||
NPT_3PATCH_VERTICAL, // Npatch defined by 1x3 tiles
|
NPT_3PATCH_VERTICAL, // Npatch defined by 1x3 tiles
|
||||||
NPT_3PATCH_HORIZONTAL // Npatch defined by 3x1 tiles
|
NPT_3PATCH_HORIZONTAL // Npatch defined by 3x1 tiles
|
||||||
} NPatchType;
|
} NPatchType;
|
||||||
|
|
||||||
|
// Callbacks to be implemented by users
|
||||||
|
//typedef void (*TraceLogCallback)(int logType, const char *text, va_list args);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -785,13 +786,20 @@ RLAPI void InitWindow(int width, int height, const char *title); // Initialize
|
||||||
RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
|
RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
|
||||||
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
|
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
|
||||||
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
||||||
RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus)
|
RLAPI bool IsWindowMinimized(void); // Check if window has been minimized
|
||||||
|
RLAPI bool IsWindowMaximized(void); // Check if window has been maximized (only PLATFORM_DESKTOP)
|
||||||
|
RLAPI bool IsWindowFocused(void); // Check if window has been focused
|
||||||
RLAPI bool IsWindowResized(void); // Check if window has been resized
|
RLAPI bool IsWindowResized(void); // Check if window has been resized
|
||||||
RLAPI bool IsWindowHidden(void); // Check if window is currently hidden
|
RLAPI bool IsWindowHidden(void); // Check if window is currently hidden
|
||||||
RLAPI bool IsWindowFullscreen(void); // Check if window is currently fullscreen
|
RLAPI bool IsWindowFullscreen(void); // Check if window is currently fullscreen
|
||||||
RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP)
|
RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP)
|
||||||
RLAPI void UnhideWindow(void); // Show the window
|
RLAPI void UnhideWindow(void); // Show the window
|
||||||
RLAPI void HideWindow(void); // Hide the window
|
RLAPI void HideWindow(void); // Hide the window
|
||||||
|
RLAPI void DecorateWindow(void); // Decorate the window (only PLATFORM_DESKTOP)
|
||||||
|
RLAPI void UndecorateWindow(void); // Undecorate the window (only PLATFORM_DESKTOP)
|
||||||
|
RLAPI void MaximizeWindow(void); // Maximize the window, if resizable (only PLATFORM_DESKTOP)
|
||||||
|
RLAPI void RestoreWindow(void); // Restore the window, if resizable (only PLATFORM_DESKTOP)
|
||||||
|
|
||||||
RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP)
|
RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP)
|
||||||
RLAPI void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP)
|
RLAPI void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP)
|
||||||
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
|
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
|
||||||
|
@ -806,10 +814,12 @@ RLAPI int GetMonitorWidth(int monitor); // Get primary
|
||||||
RLAPI int GetMonitorHeight(int monitor); // Get primary monitor height
|
RLAPI int GetMonitorHeight(int monitor); // Get primary monitor height
|
||||||
RLAPI int GetMonitorPhysicalWidth(int monitor); // Get primary monitor physical width in millimetres
|
RLAPI int GetMonitorPhysicalWidth(int monitor); // Get primary monitor physical width in millimetres
|
||||||
RLAPI int GetMonitorPhysicalHeight(int monitor); // Get primary monitor physical height in millimetres
|
RLAPI int GetMonitorPhysicalHeight(int monitor); // Get primary monitor physical height in millimetres
|
||||||
|
RLAPI int GetMonitorRefreshRate(int monitor); // Get primary monitor refresh rate
|
||||||
RLAPI Vector2 GetWindowPosition(void); // Get window position XY on monitor
|
RLAPI Vector2 GetWindowPosition(void); // Get window position XY on monitor
|
||||||
|
RLAPI Vector2 GetWindowScaleDPI(void); // Get window scale DPI factor
|
||||||
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 const char *GetClipboardText(void); // Get clipboard text content
|
|
||||||
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
|
||||||
|
|
||||||
// Cursor-related functions
|
// Cursor-related functions
|
||||||
RLAPI void ShowCursor(void); // Shows cursor
|
RLAPI void ShowCursor(void); // Shows cursor
|
||||||
|
@ -817,6 +827,7 @@ RLAPI void HideCursor(void); // Hides curso
|
||||||
RLAPI bool IsCursorHidden(void); // Check if cursor is not visible
|
RLAPI bool IsCursorHidden(void); // Check if cursor is not visible
|
||||||
RLAPI void EnableCursor(void); // Enables cursor (unlock cursor)
|
RLAPI void EnableCursor(void); // Enables cursor (unlock cursor)
|
||||||
RLAPI void DisableCursor(void); // Disables cursor (lock cursor)
|
RLAPI void DisableCursor(void); // Disables cursor (lock cursor)
|
||||||
|
RLAPI bool IsCursorOnScreen(void); // Check if cursor is on the current screen.
|
||||||
|
|
||||||
// Drawing-related functions
|
// Drawing-related functions
|
||||||
RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color)
|
RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color)
|
||||||
|
@ -846,21 +857,14 @@ RLAPI int GetFPS(void); // Returns cur
|
||||||
RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn
|
RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn
|
||||||
RLAPI double GetTime(void); // Returns elapsed time in seconds since InitWindow()
|
RLAPI double GetTime(void); // Returns elapsed time in seconds since InitWindow()
|
||||||
|
|
||||||
// Color-related functions
|
|
||||||
RLAPI int ColorToInt(Color color); // Returns hexadecimal value for a Color
|
|
||||||
RLAPI Vector4 ColorNormalize(Color color); // Returns color normalized as float [0..1]
|
|
||||||
RLAPI Color ColorFromNormalized(Vector4 normalized); // Returns color from normalized values [0..1]
|
|
||||||
RLAPI Vector3 ColorToHSV(Color color); // Returns HSV values for a Color
|
|
||||||
RLAPI Color ColorFromHSV(Vector3 hsv); // Returns a Color from HSV values
|
|
||||||
RLAPI Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value
|
|
||||||
RLAPI Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f
|
|
||||||
|
|
||||||
// Misc. functions
|
// Misc. functions
|
||||||
RLAPI void SetConfigFlags(unsigned int flags); // Setup window configuration flags (view FLAGS)
|
RLAPI void SetConfigFlags(unsigned int flags); // Setup window configuration flags (view FLAGS)
|
||||||
|
|
||||||
RLAPI void SetTraceLogLevel(int logType); // Set the current threshold (minimum) log level
|
RLAPI void SetTraceLogLevel(int logType); // Set the current threshold (minimum) log level
|
||||||
RLAPI void SetTraceLogExit(int logType); // Set the exit threshold (minimum) log level
|
RLAPI void SetTraceLogExit(int logType); // Set the exit threshold (minimum) log level
|
||||||
//RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set a trace log callback to enable custom logging
|
//RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set a trace log callback to enable custom logging
|
||||||
RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)
|
RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)
|
||||||
|
|
||||||
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png)
|
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png)
|
||||||
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
|
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
|
||||||
|
|
||||||
|
@ -870,9 +874,9 @@ RLAPI void SaveFileData(const char *fileName, void *data, unsigned int bytesToWr
|
||||||
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 SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated
|
RLAPI void SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated
|
||||||
RLAPI bool FileExists(const char *fileName); // Check if file exists
|
RLAPI bool FileExists(const char *fileName); // Check if file exists
|
||||||
RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension
|
|
||||||
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 const char *GetExtension(const char *fileName); // Get pointer to extension for a filename string
|
RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension (including point: .png, .wav)
|
||||||
|
RLAPI const char *GetFileExtension(const char *fileName); // Get pointer to extension for a filename string (including point: ".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)
|
||||||
|
@ -880,14 +884,14 @@ RLAPI const char *GetPrevDirectoryPath(const char *dirPath); // Get previou
|
||||||
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 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 void ClearDirectoryFiles(void); // Clear directory files paths buffers (free memory)
|
||||||
RLAPI bool ChangeDirectory(const char *dir); // Change working directory, returns true if success
|
RLAPI bool ChangeDirectory(const char *dir); // Change working directory, return true on success
|
||||||
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 **GetDroppedFiles(int *count); // Get dropped files names (memory should be freed)
|
RLAPI char **GetDroppedFiles(int *count); // Get dropped files names (memory should be freed)
|
||||||
RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer (free memory)
|
RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer (free memory)
|
||||||
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)
|
||||||
|
|
||||||
RLAPI unsigned char *CompressData(unsigned char *data, int dataLength, int *compDataLength); // Compress data (DEFLATE algorythm)
|
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 algorythm)
|
RLAPI unsigned char *DecompressData(unsigned char *compData, int compDataLength, int *dataLength); // Decompress data (DEFLATE algorithm)
|
||||||
|
|
||||||
// Persistent storage management
|
// Persistent storage management
|
||||||
RLAPI void SaveStorageValue(unsigned int position, int value); // Save integer value to storage file (to defined position)
|
RLAPI void SaveStorageValue(unsigned int position, int value); // Save integer value to storage file (to defined position)
|
||||||
|
@ -930,7 +934,9 @@ RLAPI Vector2 GetMousePosition(void); // Returns mouse p
|
||||||
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 int GetMouseWheelMove(void); // Returns mouse wheel movement Y
|
RLAPI float GetMouseWheelMove(void); // Returns mouse wheel movement Y
|
||||||
|
RLAPI int GetMouseCursor(void); // Returns mouse cursor if (MouseCursor enum)
|
||||||
|
RLAPI void SetMouseCursor(int cursor); // Set mouse cursor
|
||||||
|
|
||||||
// Input-related functions: touch
|
// Input-related functions: touch
|
||||||
RLAPI int GetTouchX(void); // Returns touch position X for touch point 0 (relative to screen size)
|
RLAPI int GetTouchX(void); // Returns touch position X for touch point 0 (relative to screen size)
|
||||||
|
@ -1017,14 +1023,12 @@ RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Ve
|
||||||
// Image loading functions
|
// Image loading functions
|
||||||
// NOTE: This functions do not require GPU access
|
// NOTE: This functions do not require GPU access
|
||||||
RLAPI Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
|
RLAPI Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
|
||||||
RLAPI Image LoadImageEx(Color *pixels, int width, int height); // Load image from Color array data (RGBA - 32bit)
|
|
||||||
RLAPI Image LoadImagePro(void *data, int width, int height, int format); // Load image from raw data with parameters
|
|
||||||
RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
|
RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
|
||||||
|
RLAPI Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data)
|
||||||
|
RLAPI Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. "png"
|
||||||
RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM)
|
RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM)
|
||||||
RLAPI void ExportImage(Image image, const char *fileName); // Export image data to file
|
RLAPI void ExportImage(Image image, const char *fileName); // Export image data to file
|
||||||
RLAPI void ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes
|
RLAPI void ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes
|
||||||
RLAPI Color *GetImageData(Image image); // Get pixel data from image as a Color struct array
|
|
||||||
RLAPI Vector4 *GetImageDataNormalized(Image image); // Get pixel data from image as Vector4 array (float normalized)
|
|
||||||
|
|
||||||
// Image generation functions
|
// Image generation functions
|
||||||
RLAPI Image GenImageColor(int width, int height, Color color); // Generate image: plain color
|
RLAPI Image GenImageColor(int width, int height, Color color); // Generate image: plain color
|
||||||
|
@ -1041,16 +1045,16 @@ RLAPI Image ImageCopy(Image image);
|
||||||
RLAPI Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
|
RLAPI Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
|
||||||
RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
|
RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
|
||||||
RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
|
RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
|
||||||
RLAPI void ImageToPOT(Image *image, Color fillColor); // Convert image to POT (power-of-two)
|
|
||||||
RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
|
RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
|
||||||
RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
RLAPI void ImageToPOT(Image *image, Color fill); // Convert image to POT (power-of-two)
|
||||||
RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color
|
|
||||||
RLAPI void ImageAlphaCrop(Image *image, float threshold); // Crop image depending on alpha value
|
|
||||||
RLAPI void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
|
|
||||||
RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle
|
RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle
|
||||||
|
RLAPI void ImageAlphaCrop(Image *image, float threshold); // Crop image depending on alpha value
|
||||||
|
RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color
|
||||||
|
RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
||||||
|
RLAPI void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
|
||||||
RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
|
RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
|
||||||
RLAPI void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
|
RLAPI void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
|
||||||
RLAPI void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color color); // Resize canvas and fill with color
|
RLAPI void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
|
||||||
RLAPI void ImageMipmaps(Image *image); // Generate all mipmap levels for a provided image
|
RLAPI void ImageMipmaps(Image *image); // Generate all mipmap levels for a provided image
|
||||||
RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
|
RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
|
||||||
RLAPI void ImageFlipVertical(Image *image); // Flip image vertically
|
RLAPI void ImageFlipVertical(Image *image); // Flip image vertically
|
||||||
|
@ -1063,7 +1067,10 @@ RLAPI void ImageColorGrayscale(Image *image);
|
||||||
RLAPI void ImageColorContrast(Image *image, float contrast); // Modify image color: contrast (-100 to 100)
|
RLAPI void ImageColorContrast(Image *image, float contrast); // Modify image color: contrast (-100 to 100)
|
||||||
RLAPI void ImageColorBrightness(Image *image, int brightness); // Modify image color: brightness (-255 to 255)
|
RLAPI void ImageColorBrightness(Image *image, int brightness); // Modify image color: brightness (-255 to 255)
|
||||||
RLAPI void ImageColorReplace(Image *image, Color color, Color replace); // Modify image color: replace color
|
RLAPI void ImageColorReplace(Image *image, Color color, Color replace); // Modify image color: replace color
|
||||||
RLAPI Color *ImageExtractPalette(Image image, int maxPaletteSize, int *extractCount); // Extract color palette from image to maximum size (memory should be freed)
|
|
||||||
|
RLAPI Color *GetImageData(Image image); // Get pixel data from image as a Color struct array
|
||||||
|
RLAPI Color *GetImagePalette(Image image, int maxPaletteSize, int *extractCount); // Get color palette from image to maximum size (memory should be freed)
|
||||||
|
RLAPI Vector4 *GetImageDataNormalized(Image image); // Get pixel data from image as Vector4 array (float normalized)
|
||||||
RLAPI Rectangle GetImageAlphaBorder(Image image, float threshold); // Get image alpha border rectangle
|
RLAPI Rectangle GetImageAlphaBorder(Image image, float threshold); // Get image alpha border rectangle
|
||||||
|
|
||||||
// Image drawing functions
|
// Image drawing functions
|
||||||
|
@ -1080,8 +1087,8 @@ RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color
|
||||||
RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
||||||
RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
|
RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
|
||||||
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)
|
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)
|
||||||
RLAPI void ImageDrawText(Image *dst, Vector2 position, const char *text, int fontSize, Color color); // Draw text (default font) within an image (destination)
|
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)
|
||||||
RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, Font font, const char *text, float fontSize, float spacing, Color color); // Draw text (custom sprite font) within an image (destination)
|
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)
|
||||||
|
|
||||||
// Texture loading functions
|
// Texture loading functions
|
||||||
// NOTE: These functions require GPU access
|
// NOTE: These functions require GPU access
|
||||||
|
@ -1092,6 +1099,7 @@ RLAPI RenderTexture2D LoadRenderTexture(int width, int height);
|
||||||
RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
|
RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
|
||||||
RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
|
RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
|
||||||
RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
|
RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
|
||||||
|
RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data
|
||||||
RLAPI Image GetTextureData(Texture2D texture); // Get pixel data from GPU texture and return an Image
|
RLAPI Image GetTextureData(Texture2D texture); // Get pixel data from GPU texture and return an Image
|
||||||
RLAPI Image GetScreenData(void); // Get pixel data from screen buffer and return an Image (screenshot)
|
RLAPI Image GetScreenData(void); // Get pixel data from screen buffer and return an Image (screenshot)
|
||||||
|
|
||||||
|
@ -1106,11 +1114,23 @@ 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 sourceRec, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
|
RLAPI void DrawTextureRec(Texture2D texture, Rectangle sourceRec, 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 sourceRec, Rectangle destRec, Vector2 origin, float rotation, float scale, Color tint); // Draw part of a texture (defined by a rectangle) with rotation and scale tiled into destRec.
|
||||||
RLAPI void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle destRec, 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 sourceRec, Rectangle destRec, 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 destRec, 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 destRec, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
|
||||||
|
|
||||||
// Image/Texture misc functions
|
// Color/pixel related functions
|
||||||
RLAPI int GetPixelDataSize(int width, int height, int format); // Get pixel data size in bytes (image or texture)
|
RLAPI Color Fade(Color color, float alpha); // Returns color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||||
|
RLAPI int ColorToInt(Color color); // Returns hexadecimal value for a Color
|
||||||
|
RLAPI Vector4 ColorNormalize(Color color); // Returns Color normalized as float [0..1]
|
||||||
|
RLAPI Color ColorFromNormalized(Vector4 normalized); // Returns Color from normalized values [0..1]
|
||||||
|
RLAPI Vector3 ColorToHSV(Color color); // Returns HSV values for a Color
|
||||||
|
RLAPI Color ColorFromHSV(float hue, float saturation, float value); // Returns a Color from HSV values
|
||||||
|
RLAPI Color ColorAlpha(Color color, float alpha); // Returns color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||||
|
RLAPI Color ColorAlphaBlend(Color dst, Color src, Color tint); // Returns src alpha-blended into dst color with tint
|
||||||
|
RLAPI Color GetColor(int hexValue); // Get Color structure from hexadecimal value
|
||||||
|
RLAPI Color GetPixelColor(void *srcPtr, int format); // Get Color from a source pixel pointer of certain format
|
||||||
|
RLAPI void SetPixelColor(void *dstPtr, Color color, int format); // Set color formatted into destination pixel pointer
|
||||||
|
RLAPI int GetPixelDataSize(int width, int height, int format); // Get pixel data size in bytes for certain format
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Font Loading and Text Drawing Functions (Module: text)
|
// Font Loading and Text Drawing Functions (Module: text)
|
||||||
|
@ -1121,7 +1141,8 @@ RLAPI Font GetFontDefault(void);
|
||||||
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 charsCount); // Load font from file with extended parameters
|
RLAPI Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int charsCount); // Load font from file with extended parameters
|
||||||
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 CharInfo *LoadFontData(const char *fileName, int fontSize, int *fontChars, int charsCount, int type); // Load font data for further use
|
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount); // Load font from memory buffer, fileType refers to extension: i.e. "ttf"
|
||||||
|
RLAPI CharInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount, int type); // Load font data for further use
|
||||||
RLAPI Image GenImageFontAtlas(const CharInfo *chars, Rectangle **recs, int charsCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
RLAPI Image GenImageFontAtlas(const CharInfo *chars, Rectangle **recs, int charsCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
||||||
RLAPI void UnloadFont(Font font); // Unload Font from GPU memory (VRAM)
|
RLAPI void UnloadFont(Font font); // Unload Font from GPU memory (VRAM)
|
||||||
|
|
||||||
|
@ -1172,6 +1193,8 @@ RLAPI const char *CodepointToUtf8(int codepoint, int *byteLength); // Encode
|
||||||
RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
|
RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
|
||||||
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 DrawTriangleStrip3D(Vector3 *points, int pointsCount, 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
|
||||||
|
@ -1186,7 +1209,6 @@ RLAPI void DrawPlane(Vector3 centerPos, Vector2 size, Color color);
|
||||||
RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line
|
RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line
|
||||||
RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0))
|
RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0))
|
||||||
RLAPI void DrawGizmo(Vector3 position); // Draw simple gizmo
|
RLAPI void DrawGizmo(Vector3 position); // Draw simple gizmo
|
||||||
//DrawTorus(), DrawTeapot() could be useful?
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Model 3d Loading and Drawing Functions (Module: models)
|
// Model 3d Loading and Drawing Functions (Module: models)
|
||||||
|
@ -1231,6 +1253,7 @@ RLAPI Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize);
|
||||||
RLAPI BoundingBox MeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits
|
RLAPI BoundingBox MeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits
|
||||||
RLAPI void MeshTangents(Mesh *mesh); // Compute mesh tangents
|
RLAPI void MeshTangents(Mesh *mesh); // Compute mesh tangents
|
||||||
RLAPI void MeshBinormals(Mesh *mesh); // Compute mesh binormals
|
RLAPI void MeshBinormals(Mesh *mesh); // Compute mesh binormals
|
||||||
|
RLAPI void MeshNormalsSmooth(Mesh *mesh); // Smooth (average) vertex normals
|
||||||
|
|
||||||
// Model drawing functions
|
// Model drawing functions
|
||||||
RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
|
RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
|
||||||
|
@ -1270,6 +1293,7 @@ RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Def
|
||||||
|
|
||||||
// Shader configuration functions
|
// Shader configuration functions
|
||||||
RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
|
RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
|
||||||
|
RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
|
||||||
RLAPI void SetShaderValue(Shader shader, int uniformLoc, const void *value, int uniformType); // Set shader uniform value
|
RLAPI void SetShaderValue(Shader shader, int uniformLoc, const void *value, int uniformType); // Set shader uniform value
|
||||||
RLAPI void SetShaderValueV(Shader shader, int uniformLoc, const void *value, int uniformType, int count); // Set shader uniform value vector
|
RLAPI void SetShaderValueV(Shader shader, int uniformLoc, const void *value, int uniformType, int count); // Set shader uniform value vector
|
||||||
RLAPI void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat); // Set shader uniform value (matrix 4x4)
|
RLAPI void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat); // Set shader uniform value (matrix 4x4)
|
||||||
|
@ -1281,9 +1305,9 @@ RLAPI Matrix GetMatrixProjection(void); // Get
|
||||||
|
|
||||||
// Texture maps generation (PBR)
|
// Texture maps generation (PBR)
|
||||||
// NOTE: Required shaders should be provided
|
// NOTE: Required shaders should be provided
|
||||||
RLAPI Texture2D GenTextureCubemap(Shader shader, Texture2D map, int size); // Generate cubemap texture from 2D texture
|
RLAPI TextureCubemap GenTextureCubemap(Shader shader, Texture2D panorama, int size, int format); // Generate cubemap texture from 2D panorama texture
|
||||||
RLAPI Texture2D GenTextureIrradiance(Shader shader, Texture2D cubemap, int size); // Generate irradiance texture using cubemap data
|
RLAPI TextureCubemap GenTextureIrradiance(Shader shader, TextureCubemap cubemap, int size); // Generate irradiance texture using cubemap data
|
||||||
RLAPI Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size); // Generate prefilter texture using cubemap data
|
RLAPI TextureCubemap GenTexturePrefilter(Shader shader, TextureCubemap cubemap, int size); // Generate prefilter texture using cubemap data
|
||||||
RLAPI Texture2D GenTextureBRDF(Shader shader, int size); // Generate BRDF texture
|
RLAPI Texture2D GenTextureBRDF(Shader shader, int size); // Generate BRDF texture
|
||||||
|
|
||||||
// Shading begin/end functions
|
// Shading begin/end functions
|
||||||
|
@ -1314,6 +1338,7 @@ RLAPI void SetMasterVolume(float volume); // Set mas
|
||||||
|
|
||||||
// Wave/Sound loading/unloading functions
|
// Wave/Sound loading/unloading functions
|
||||||
RLAPI Wave LoadWave(const char *fileName); // Load wave data from file
|
RLAPI Wave LoadWave(const char *fileName); // Load wave data from file
|
||||||
|
RLAPI Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load wave from memory buffer, fileType refers to extension: i.e. "wav"
|
||||||
RLAPI Sound LoadSound(const char *fileName); // Load sound from file
|
RLAPI Sound LoadSound(const char *fileName); // Load sound from file
|
||||||
RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
|
RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
|
||||||
RLAPI void UpdateSound(Sound sound, const void *data, int samplesCount);// Update sound buffer with new data
|
RLAPI void UpdateSound(Sound sound, const void *data, int samplesCount);// Update sound buffer with new data
|
||||||
|
@ -1349,7 +1374,6 @@ RLAPI void ResumeMusicStream(Music music); // Resume
|
||||||
RLAPI bool IsMusicPlaying(Music music); // Check if music is playing
|
RLAPI bool IsMusicPlaying(Music music); // Check if music is playing
|
||||||
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 SetMusicLoopCount(Music music, int count); // Set music loop count (loop repeats)
|
|
||||||
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)
|
||||||
|
|
||||||
|
@ -1373,4 +1397,8 @@ RLAPI void SetAudioStreamBufferSizeDefault(int size); // Default
|
||||||
|
|
||||||
// IN PROGRESS: Check rnet.h for reference
|
// IN PROGRESS: Check rnet.h for reference
|
||||||
|
|
||||||
|
//#if defined(__cplusplus)
|
||||||
|
//}
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
//#endif // RAYLIB_H
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
Reference in a new issue