mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Vendored
BIN
Binary file not shown.
Vendored
-1
@@ -1 +0,0 @@
|
|||||||
libraylib.so.500
|
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
-1
@@ -1 +0,0 @@
|
|||||||
libraylib.so.5.0.0
|
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
libraylib.5.0.0.dylib
|
|
||||||
BIN
Binary file not shown.
-1
@@ -1 +0,0 @@
|
|||||||
libraylib.5.0.0.dylib
|
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
-1
@@ -1 +0,0 @@
|
|||||||
libraylib.5.0.0.dylib
|
|
||||||
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
-1
@@ -1 +0,0 @@
|
|||||||
libraylib.5.0.0.dylib
|
|
||||||
BIN
Binary file not shown.
Vendored
+230
-202
@@ -1,25 +1,25 @@
|
|||||||
/*
|
/*
|
||||||
Package vendor:raylib implements bindings for version 5.0 of the raylib library (https://www.raylib.com/)
|
Package vendor:raylib implements bindings for version 5.5 of the raylib library (https://www.raylib.com/)
|
||||||
|
|
||||||
*********************************************************************************************
|
*********************************************************************************************
|
||||||
*
|
*
|
||||||
* raylib v5.0 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
* raylib v5.5 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||||
*
|
*
|
||||||
* FEATURES:
|
* FEATURES:
|
||||||
* - NO external dependencies, all required libraries included with raylib
|
* - NO external dependencies, all required libraries included with raylib
|
||||||
* - Multiplatform: Windows, Linux, FreeBSD, OpenBSD, NetBSD, DragonFly,
|
* - Multiplatform: Windows, Linux, FreeBSD, OpenBSD, NetBSD, DragonFly,
|
||||||
* MacOS, Haiku, Android, Raspberry Pi, DRM native, HTML5.
|
* MacOS, Haiku, Android, Raspberry Pi, DRM native, HTML5.
|
||||||
* - Written in plain C code (C99) in PascalCase/camelCase notation
|
* - Written in plain C code (C99) in PascalCase/camelCase notation
|
||||||
* - Hardware accelerated with OpenGL (1.1, 2.1, 3.3, 4.3 or ES2 - choose at compile)
|
* - Hardware accelerated with OpenGL (1.1, 2.1, 3.3, 4.3, ES2, ES3 - choose at compile)
|
||||||
* - Unique OpenGL abstraction layer (usable as standalone module): [rlgl]
|
* - Unique OpenGL abstraction layer (usable as standalone module): [rlgl]
|
||||||
* - Multiple Fonts formats supported (TTF, XNA fonts, AngelCode fonts)
|
* - Multiple Fonts formats supported (TTF, OTF, FNT, BDF, Sprite fonts)
|
||||||
* - Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
|
* - Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
|
||||||
* - Full 3d support for 3d Shapes, Models, Billboards, Heightmaps and more!
|
* - Full 3d support for 3d Shapes, Models, Billboards, Heightmaps and more!
|
||||||
* - Flexible Materials system, supporting classic maps and PBR maps
|
* - Flexible Materials system, supporting classic maps and PBR maps
|
||||||
* - Animated 3D models supported (skeletal bones animation) (IQM)
|
* - Animated 3D models supported (skeletal bones animation) (IQM, M3D, GLTF)
|
||||||
* - Shaders support, including Model shaders and Postprocessing shaders
|
* - Shaders support, including Model shaders and Postprocessing shaders
|
||||||
* - Powerful math module for Vector, Matrix and Quaternion operations: [raymath]
|
* - Powerful math module for Vector, Matrix and Quaternion operations: [raymath]
|
||||||
* - Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
|
* - Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, QOA, XM, MOD)
|
||||||
* - VR stereo rendering with configurable HMD device parameters
|
* - VR stereo rendering with configurable HMD device parameters
|
||||||
* - Bindings to multiple programming languages available!
|
* - Bindings to multiple programming languages available!
|
||||||
*
|
*
|
||||||
@@ -30,29 +30,35 @@ Package vendor:raylib implements bindings for version 5.0 of the raylib library
|
|||||||
* - One default RenderBatch is loaded on rlglInit()->rlLoadRenderBatch() [rlgl] (OpenGL 3.3 or ES2)
|
* - One default RenderBatch is loaded on rlglInit()->rlLoadRenderBatch() [rlgl] (OpenGL 3.3 or ES2)
|
||||||
*
|
*
|
||||||
* DEPENDENCIES (included):
|
* DEPENDENCIES (included):
|
||||||
* [rcore] rglfw (Camilla Löwy - github.com/glfw/glfw) for window/context management and input (PLATFORM_DESKTOP)
|
* [rcore][GLFW] rglfw (Camilla Löwy - github.com/glfw/glfw) for window/context management and input
|
||||||
* [rlgl] glad (David Herberth - github.com/Dav1dde/glad) for OpenGL 3.3 extensions loading (PLATFORM_DESKTOP)
|
* [rcore][RGFW] rgfw (ColleagueRiley - github.com/ColleagueRiley/RGFW) for window/context management and input
|
||||||
|
* [rlgl] glad/glad_gles2 (David Herberth - github.com/Dav1dde/glad) for OpenGL 3.3 extensions loading
|
||||||
* [raudio] miniaudio (David Reid - github.com/mackron/miniaudio) for audio device/context management
|
* [raudio] miniaudio (David Reid - github.com/mackron/miniaudio) for audio device/context management
|
||||||
*
|
*
|
||||||
* OPTIONAL DEPENDENCIES (included):
|
* OPTIONAL DEPENDENCIES (included):
|
||||||
* [rcore] msf_gif (Miles Fogle) for GIF recording
|
* [rcore] msf_gif (Miles Fogle) for GIF recording
|
||||||
* [rcore] sinfl (Micha Mettke) for DEFLATE decompression algorithm
|
* [rcore] sinfl (Micha Mettke) for DEFLATE decompression algorithm
|
||||||
* [rcore] sdefl (Micha Mettke) for DEFLATE compression algorithm
|
* [rcore] sdefl (Micha Mettke) for DEFLATE compression algorithm
|
||||||
|
* [rcore] rprand (Ramon Snatamaria) for pseudo-random numbers generation
|
||||||
|
* [rtextures] qoi (Dominic Szablewski - https://phoboslab.org) for QOI image manage
|
||||||
* [rtextures] stb_image (Sean Barret) for images loading (BMP, TGA, PNG, JPEG, HDR...)
|
* [rtextures] stb_image (Sean Barret) for images loading (BMP, TGA, PNG, JPEG, HDR...)
|
||||||
* [rtextures] stb_image_write (Sean Barret) for image writing (BMP, TGA, PNG, JPG)
|
* [rtextures] stb_image_write (Sean Barret) for image writing (BMP, TGA, PNG, JPG)
|
||||||
* [rtextures] stb_image_resize (Sean Barret) for image resizing algorithms
|
* [rtextures] stb_image_resize2 (Sean Barret) for image resizing algorithms
|
||||||
|
* [rtextures] stb_perlin (Sean Barret) for Perlin Noise image generation
|
||||||
* [rtext] stb_truetype (Sean Barret) for ttf fonts loading
|
* [rtext] stb_truetype (Sean Barret) for ttf fonts loading
|
||||||
* [rtext] stb_rect_pack (Sean Barret) for rectangles packing
|
* [rtext] stb_rect_pack (Sean Barret) for rectangles packing
|
||||||
* [rmodels] par_shapes (Philip Rideout) for parametric 3d shapes generation
|
* [rmodels] par_shapes (Philip Rideout) for parametric 3d shapes generation
|
||||||
* [rmodels] tinyobj_loader_c (Syoyo Fujita) for models loading (OBJ, MTL)
|
* [rmodels] tinyobj_loader_c (Syoyo Fujita) for models loading (OBJ, MTL)
|
||||||
* [rmodels] cgltf (Johannes Kuhlmann) for models loading (glTF)
|
* [rmodels] cgltf (Johannes Kuhlmann) for models loading (glTF)
|
||||||
* [rmodels] Model3D (bzt) for models loading (M3D, https://bztsrc.gitlab.io/model3d)
|
* [rmodels] m3d (bzt) for models loading (M3D, https://bztsrc.gitlab.io/model3d)
|
||||||
|
* [rmodels] vox_loader (Johann Nadalutti) for models loading (VOX)
|
||||||
* [raudio] dr_wav (David Reid) for WAV audio file loading
|
* [raudio] dr_wav (David Reid) for WAV audio file loading
|
||||||
* [raudio] dr_flac (David Reid) for FLAC audio file loading
|
* [raudio] dr_flac (David Reid) for FLAC audio file loading
|
||||||
* [raudio] dr_mp3 (David Reid) for MP3 audio file loading
|
* [raudio] dr_mp3 (David Reid) for MP3 audio file loading
|
||||||
* [raudio] stb_vorbis (Sean Barret) for OGG audio loading
|
* [raudio] stb_vorbis (Sean Barret) for OGG audio loading
|
||||||
* [raudio] jar_xm (Joshua Reisenauer) for XM audio module loading
|
* [raudio] jar_xm (Joshua Reisenauer) for XM audio module loading
|
||||||
* [raudio] jar_mod (Joshua Reisenauer) for MOD audio module loading
|
* [raudio] jar_mod (Joshua Reisenauer) for MOD audio module loading
|
||||||
|
* [raudio] qoa (Dominic Szablewski - https://phoboslab.org) for QOA audio manage
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* LICENSE: zlib/libpng
|
* LICENSE: zlib/libpng
|
||||||
@@ -60,7 +66,7 @@ Package vendor:raylib implements bindings for version 5.0 of the raylib library
|
|||||||
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
* BSD-like license that allows static linking with closed source software:
|
* BSD-like license that allows static linking with closed source software:
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
|
* Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||||
* will the authors be held liable for any damages arising from the use of this software.
|
* will the authors be held liable for any damages arising from the use of this software.
|
||||||
@@ -110,27 +116,25 @@ when ODIN_OS == .Windows {
|
|||||||
// multiple copies of raylib.so, but since these bindings are for
|
// multiple copies of raylib.so, but since these bindings are for
|
||||||
// particular version of the library, I better specify it. Ideally,
|
// particular version of the library, I better specify it. Ideally,
|
||||||
// though, it's best specified in terms of major (.so.4)
|
// though, it's best specified in terms of major (.so.4)
|
||||||
"linux/libraylib.so.500" when RAYLIB_SHARED else "linux/libraylib.a",
|
"linux/libraylib.so.550" when RAYLIB_SHARED else "linux/libraylib.a",
|
||||||
"system:dl",
|
"system:dl",
|
||||||
"system:pthread",
|
"system:pthread",
|
||||||
}
|
}
|
||||||
} else when ODIN_OS == .Darwin {
|
} else when ODIN_OS == .Darwin {
|
||||||
foreign import lib {
|
foreign import lib {
|
||||||
"macos" +
|
"macos/libraylib.550.dylib" when RAYLIB_SHARED else "libraylib.a",
|
||||||
("-arm64" when ODIN_ARCH == .arm64 else "") +
|
|
||||||
"/libraylib" + (".500.dylib" when RAYLIB_SHARED else ".a"),
|
|
||||||
"system:Cocoa.framework",
|
"system:Cocoa.framework",
|
||||||
"system:OpenGL.framework",
|
"system:OpenGL.framework",
|
||||||
"system:IOKit.framework",
|
"system:IOKit.framework",
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
foreign import lib "system:raylib"
|
foreign import lib "system:raylib"
|
||||||
}
|
}
|
||||||
|
|
||||||
VERSION_MAJOR :: 5
|
VERSION_MAJOR :: 5
|
||||||
VERSION_MINOR :: 0
|
VERSION_MINOR :: 5
|
||||||
VERSION_PATCH :: 0
|
VERSION_PATCH :: 0
|
||||||
VERSION :: "5.0"
|
VERSION :: "5.5"
|
||||||
|
|
||||||
PI :: 3.14159265358979323846
|
PI :: 3.14159265358979323846
|
||||||
DEG2RAD :: PI/180.0
|
DEG2RAD :: PI/180.0
|
||||||
@@ -298,6 +302,8 @@ Mesh :: struct {
|
|||||||
animNormals: [^]f32, // Animated normals (after bones transformations)
|
animNormals: [^]f32, // Animated normals (after bones transformations)
|
||||||
boneIds: [^]u8, // Vertex bone ids, up to 4 bones influence by vertex (skinning)
|
boneIds: [^]u8, // Vertex bone ids, up to 4 bones influence by vertex (skinning)
|
||||||
boneWeights: [^]f32, // Vertex bone weight, up to 4 bones influence by vertex (skinning)
|
boneWeights: [^]f32, // Vertex bone weight, up to 4 bones influence by vertex (skinning)
|
||||||
|
boneMatrices: [^]Matrix, // Bones animated transformation matrices
|
||||||
|
boneCount: c.int, // Number of bones
|
||||||
|
|
||||||
// OpenGL identifiers
|
// OpenGL identifiers
|
||||||
vaoId: u32, // OpenGL Vertex Array Object id
|
vaoId: u32, // OpenGL Vertex Array Object id
|
||||||
@@ -365,7 +371,7 @@ ModelAnimation :: struct {
|
|||||||
// Ray type (useful for raycast)
|
// Ray type (useful for raycast)
|
||||||
Ray :: struct {
|
Ray :: struct {
|
||||||
position: Vector3, // Ray position (origin)
|
position: Vector3, // Ray position (origin)
|
||||||
direction: Vector3, // Ray direction
|
direction: Vector3, // Ray direction (normalized)
|
||||||
}
|
}
|
||||||
|
|
||||||
// RayCollision, ray hit information
|
// RayCollision, ray hit information
|
||||||
@@ -619,7 +625,7 @@ KeyboardKey :: enum c.int {
|
|||||||
KP_EQUAL = 336, // Key: Keypad =
|
KP_EQUAL = 336, // Key: Keypad =
|
||||||
// Android key buttons
|
// Android key buttons
|
||||||
BACK = 4, // Key: Android back button
|
BACK = 4, // Key: Android back button
|
||||||
MENU = 82, // Key: Android menu button
|
MENU = 5, // Key: Android menu button
|
||||||
VOLUME_UP = 24, // Key: Android volume up button
|
VOLUME_UP = 24, // Key: Android volume up button
|
||||||
VOLUME_DOWN = 25, // Key: Android volume down button
|
VOLUME_DOWN = 25, // Key: Android volume down button
|
||||||
}
|
}
|
||||||
@@ -658,12 +664,12 @@ GamepadButton :: enum c.int {
|
|||||||
LEFT_FACE_DOWN, // Gamepad left DPAD down button
|
LEFT_FACE_DOWN, // Gamepad left DPAD down button
|
||||||
LEFT_FACE_LEFT, // Gamepad left DPAD left button
|
LEFT_FACE_LEFT, // Gamepad left DPAD left button
|
||||||
RIGHT_FACE_UP, // Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
|
RIGHT_FACE_UP, // Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
|
||||||
RIGHT_FACE_RIGHT, // Gamepad right button right (i.e. PS3: Square, Xbox: X)
|
RIGHT_FACE_RIGHT, // Gamepad right button right (i.e. PS3: Circle, Xbox: B)
|
||||||
RIGHT_FACE_DOWN, // Gamepad right button down (i.e. PS3: Cross, Xbox: A)
|
RIGHT_FACE_DOWN, // Gamepad right button down (i.e. PS3: Cross, Xbox: A)
|
||||||
RIGHT_FACE_LEFT, // Gamepad right button left (i.e. PS3: Circle, Xbox: B)
|
RIGHT_FACE_LEFT, // Gamepad right button left (i.e. PS3: Square, Xbox: X)
|
||||||
LEFT_TRIGGER_1, // Gamepad top/back trigger left (first), it could be a trailing button
|
LEFT_TRIGGER_1, // Gamepad top/back trigger left (first), it could be a trailing button
|
||||||
LEFT_TRIGGER_2, // Gamepad top/back trigger left (second), it could be a trailing button
|
LEFT_TRIGGER_2, // Gamepad top/back trigger left (second), it could be a trailing button
|
||||||
RIGHT_TRIGGER_1, // Gamepad top/back trigger right (one), it could be a trailing button
|
RIGHT_TRIGGER_1, // Gamepad top/back trigger right (first), it could be a trailing button
|
||||||
RIGHT_TRIGGER_2, // Gamepad top/back trigger right (second), it could be a trailing button
|
RIGHT_TRIGGER_2, // Gamepad top/back trigger right (second), it could be a trailing button
|
||||||
MIDDLE_LEFT, // Gamepad center buttons, left one (i.e. PS3: Select)
|
MIDDLE_LEFT, // Gamepad center buttons, left one (i.e. PS3: Select)
|
||||||
MIDDLE, // Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
|
MIDDLE, // Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
|
||||||
@@ -726,6 +732,9 @@ ShaderLocationIndex :: enum c.int {
|
|||||||
MAP_IRRADIANCE, // Shader location: samplerCube texture: irradiance
|
MAP_IRRADIANCE, // Shader location: samplerCube texture: irradiance
|
||||||
MAP_PREFILTER, // Shader location: samplerCube texture: prefilter
|
MAP_PREFILTER, // Shader location: samplerCube texture: prefilter
|
||||||
MAP_BRDF, // Shader location: sampler2d texture: brdf
|
MAP_BRDF, // Shader location: sampler2d texture: brdf
|
||||||
|
VERTEX_BONEIDS, // Shader location: vertex attribute: boneIds
|
||||||
|
VERTEX_BONEWEIGHTS, // Shader location: vertex attribute: boneWeights
|
||||||
|
BONE_MATRICES, // Shader location: array of matrices uniform: boneMatrices
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -799,7 +808,6 @@ CubemapLayout :: enum c.int {
|
|||||||
LINE_HORIZONTAL, // Layout is defined by an horizontal line with faces
|
LINE_HORIZONTAL, // Layout is defined by an horizontal line with faces
|
||||||
CROSS_THREE_BY_FOUR, // Layout is defined by a 3x4 cross with cubemap faces
|
CROSS_THREE_BY_FOUR, // Layout is defined by a 3x4 cross with cubemap faces
|
||||||
CROSS_FOUR_BY_THREE, // Layout is defined by a 4x3 cross with cubemap faces
|
CROSS_FOUR_BY_THREE, // Layout is defined by a 4x3 cross with cubemap faces
|
||||||
PANORAMA, // Layout is defined by a panorama image (equirectangular map)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Font type, defines generation method
|
// Font type, defines generation method
|
||||||
@@ -839,11 +847,11 @@ Gestures :: distinct bit_set[Gesture; c.uint]
|
|||||||
|
|
||||||
// Camera system modes
|
// Camera system modes
|
||||||
CameraMode :: enum c.int {
|
CameraMode :: enum c.int {
|
||||||
CUSTOM = 0, // Custom camera
|
CUSTOM = 0, // Camera custom, controlled by user (UpdateCamera() does nothing)
|
||||||
FREE, // Free camera
|
FREE, // Camera free mode
|
||||||
ORBITAL, // Orbital camera
|
ORBITAL, // Camera orbital, around target, zoom supported
|
||||||
FIRST_PERSON, // First person camera
|
FIRST_PERSON, // Camera first person
|
||||||
THIRD_PERSON, // Third person camera
|
THIRD_PERSON, // Camera third person
|
||||||
}
|
}
|
||||||
|
|
||||||
// Camera projection
|
// Camera projection
|
||||||
@@ -860,7 +868,7 @@ NPatchLayout :: enum c.int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Callbacks to hook some internal functions
|
// Callbacks to hook some internal functions
|
||||||
// WARNING: This callbacks are intended for advance users
|
// WARNING: This callbacks are intended for advanced users
|
||||||
TraceLogCallback :: #type proc "c" (logLevel: TraceLogLevel, text: cstring, args: ^c.va_list) // Logging: Redirect trace log messages
|
TraceLogCallback :: #type proc "c" (logLevel: TraceLogLevel, text: cstring, args: ^c.va_list) // Logging: Redirect trace log messages
|
||||||
LoadFileDataCallback :: #type proc "c"(fileName: cstring, dataSize: ^c.int) -> [^]u8 // FileIO: Load binary data
|
LoadFileDataCallback :: #type proc "c"(fileName: cstring, dataSize: ^c.int) -> [^]u8 // FileIO: Load binary data
|
||||||
SaveFileDataCallback :: #type proc "c" (fileName: cstring, data: rawptr, dataSize: c.int) -> bool // FileIO: Save binary data
|
SaveFileDataCallback :: #type proc "c" (fileName: cstring, data: rawptr, dataSize: c.int) -> bool // FileIO: Save binary data
|
||||||
@@ -888,36 +896,36 @@ foreign lib {
|
|||||||
CloseWindow :: proc() --- // Close window and unload OpenGL context
|
CloseWindow :: proc() --- // Close window and unload OpenGL context
|
||||||
IsWindowReady :: proc() -> bool --- // Check if window has been initialized successfully
|
IsWindowReady :: proc() -> bool --- // Check if window has been initialized successfully
|
||||||
IsWindowFullscreen :: proc() -> bool --- // Check if window is currently fullscreen
|
IsWindowFullscreen :: proc() -> bool --- // Check if window is currently fullscreen
|
||||||
IsWindowHidden :: proc() -> bool --- // Check if window is currently hidden (only PLATFORM_DESKTOP)
|
IsWindowHidden :: proc() -> bool --- // Check if window is currently hidden
|
||||||
IsWindowMinimized :: proc() -> bool --- // Check if window is currently minimized (only PLATFORM_DESKTOP)
|
IsWindowMinimized :: proc() -> bool --- // Check if window is currently minimized
|
||||||
IsWindowMaximized :: proc() -> bool --- // Check if window is currently maximized (only PLATFORM_DESKTOP)
|
IsWindowMaximized :: proc() -> bool --- // Check if window is currently maximized
|
||||||
IsWindowFocused :: proc() -> bool --- // Check if window is currently focused (only PLATFORM_DESKTOP)
|
IsWindowFocused :: proc() -> bool --- // Check if window is currently focused
|
||||||
IsWindowResized :: proc() -> bool --- // Check if window has been resized last frame
|
IsWindowResized :: proc() -> bool --- // Check if window has been resized last frame
|
||||||
IsWindowState :: proc(flags: ConfigFlags) -> bool --- // Check if one specific window flag is enabled
|
IsWindowState :: proc(flags: ConfigFlags) -> bool --- // Check if one specific window flag is enabled
|
||||||
SetWindowState :: proc(flags: ConfigFlags) --- // Set window configuration state using flags (only PLATFORM_DESKTOP)
|
SetWindowState :: proc(flags: ConfigFlags) --- // Set window configuration state using flags
|
||||||
ClearWindowState :: proc(flags: ConfigFlags) --- // Clear window configuration state flags
|
ClearWindowState :: proc(flags: ConfigFlags) --- // Clear window configuration state flags
|
||||||
ToggleFullscreen :: proc() --- // Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
|
ToggleFullscreen :: proc() --- // Toggle window state: fullscreen/windowed
|
||||||
ToggleBorderlessWindowed :: proc() --- // Toggle window state: borderless windowed (only PLATFORM_DESKTOP)
|
ToggleBorderlessWindowed :: proc() --- // Toggle window state: borderless windowed
|
||||||
MaximizeWindow :: proc() --- // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
|
MaximizeWindow :: proc() --- // Set window state: maximized, if resizable
|
||||||
MinimizeWindow :: proc() --- // Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
|
MinimizeWindow :: proc() --- // Set window state: minimized, if resizable
|
||||||
RestoreWindow :: proc() --- // Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
|
RestoreWindow :: proc() --- // Set window state: not minimized/maximized
|
||||||
SetWindowIcon :: proc(image: Image) --- // Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
|
SetWindowIcon :: proc(image: Image) --- // Set icon for window (single image, RGBA 32bit,)
|
||||||
SetWindowIcons :: proc(images: [^]Image, count: c.int) --- // Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
|
SetWindowIcons :: proc(images: [^]Image, count: c.int) --- // Set icon for window (multiple images, RGBA 32bit,)
|
||||||
SetWindowTitle :: proc(title: cstring) --- // Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)
|
SetWindowTitle :: proc(title: cstring) --- // Set title for window
|
||||||
SetWindowPosition :: proc(x, y: c.int) --- // Set window position on screen (only PLATFORM_DESKTOP)
|
SetWindowPosition :: proc(x, y: c.int) --- // Set window position on screen
|
||||||
SetWindowMonitor :: proc(monitor: c.int) --- // Set monitor for the current window
|
SetWindowMonitor :: proc(monitor: c.int) --- // Set monitor for the current window
|
||||||
SetWindowMinSize :: proc(width, height: c.int) --- // Set window minimum dimensions (for WINDOW_RESIZABLE)
|
SetWindowMinSize :: proc(width, height: c.int) --- // Set window minimum dimensions (for WINDOW_RESIZABLE)
|
||||||
SetWindowMaxSize :: proc(width, height: c.int) --- // Set window maximum dimensions (for WINDOW_RESIZABLE)
|
SetWindowMaxSize :: proc(width, height: c.int) --- // Set window maximum dimensions (for WINDOW_RESIZABLE)
|
||||||
SetWindowSize :: proc(width, height: c.int) --- // Set window dimensions
|
SetWindowSize :: proc(width, height: c.int) --- // Set window dimensions
|
||||||
SetWindowOpacity :: proc(opacity: f32) --- // Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
|
SetWindowOpacity :: proc(opacity: f32) --- // Set window opacity [0.0f..1.0f]
|
||||||
SetWindowFocused :: proc() --- // Set window focused (only PLATFORM_DESKTOP)
|
SetWindowFocused :: proc() --- // Set window focused
|
||||||
GetWindowHandle :: proc() -> rawptr --- // Get native window handle
|
GetWindowHandle :: proc() -> rawptr --- // Get native window handle
|
||||||
GetScreenWidth :: proc() -> c.int --- // Get current screen width
|
GetScreenWidth :: proc() -> c.int --- // Get current screen width
|
||||||
GetScreenHeight :: proc() -> c.int --- // Get current screen height
|
GetScreenHeight :: proc() -> c.int --- // Get current screen height
|
||||||
GetRenderWidth :: proc() -> c.int --- // Get current render width (it considers HiDPI)
|
GetRenderWidth :: proc() -> c.int --- // Get current render width (it considers HiDPI)
|
||||||
GetRenderHeight :: proc() -> c.int --- // Get current render height (it considers HiDPI)
|
GetRenderHeight :: proc() -> c.int --- // Get current render height (it considers HiDPI)
|
||||||
GetMonitorCount :: proc() -> c.int --- // Get number of connected monitors
|
GetMonitorCount :: proc() -> c.int --- // Get number of connected monitors
|
||||||
GetCurrentMonitor :: proc() -> c.int --- // Get current connected monitor
|
GetCurrentMonitor :: proc() -> c.int --- // Get current monitor where window is placed
|
||||||
GetMonitorPosition :: proc(monitor: c.int) -> Vector2 --- // Get specified monitor position
|
GetMonitorPosition :: proc(monitor: c.int) -> Vector2 --- // Get specified monitor position
|
||||||
GetMonitorWidth :: proc(monitor: c.int) -> c.int --- // Get specified monitor width (current video mode used by monitor)
|
GetMonitorWidth :: proc(monitor: c.int) -> c.int --- // Get specified monitor width (current video mode used by monitor)
|
||||||
GetMonitorHeight :: proc(monitor: c.int) -> c.int --- // Get specified monitor height (current video mode used by monitor)
|
GetMonitorHeight :: proc(monitor: c.int) -> c.int --- // Get specified monitor height (current video mode used by monitor)
|
||||||
@@ -929,6 +937,7 @@ foreign lib {
|
|||||||
GetMonitorName :: proc(monitor: c.int) -> cstring --- // Get the human-readable, UTF-8 encoded name of the specified monitor
|
GetMonitorName :: proc(monitor: c.int) -> cstring --- // Get the human-readable, UTF-8 encoded name of the specified monitor
|
||||||
SetClipboardText :: proc(text: cstring) --- // Set clipboard text content
|
SetClipboardText :: proc(text: cstring) --- // Set clipboard text content
|
||||||
GetClipboardText :: proc() -> cstring --- // Get clipboard text content
|
GetClipboardText :: proc() -> cstring --- // Get clipboard text content
|
||||||
|
GetClipboardImage :: proc() -> Image --- // Get clipboard image content
|
||||||
EnableEventWaiting :: proc() --- // Enable waiting for events on EndDrawing(), no automatic event polling
|
EnableEventWaiting :: proc() --- // Enable waiting for events on EndDrawing(), no automatic event polling
|
||||||
DisableEventWaiting :: proc() --- // Disable waiting for events on EndDrawing(), automatic events polling
|
DisableEventWaiting :: proc() --- // Disable waiting for events on EndDrawing(), automatic events polling
|
||||||
|
|
||||||
@@ -982,7 +991,7 @@ foreign lib {
|
|||||||
|
|
||||||
LoadShader :: proc(vsFileName, fsFileName: cstring) -> Shader --- // Load shader from files and bind default locations
|
LoadShader :: proc(vsFileName, fsFileName: cstring) -> Shader --- // Load shader from files and bind default locations
|
||||||
LoadShaderFromMemory :: proc(vsCode, fsCode: cstring) -> Shader --- // Load shader from code strings and bind default locations
|
LoadShaderFromMemory :: proc(vsCode, fsCode: cstring) -> Shader --- // Load shader from code strings and bind default locations
|
||||||
IsShaderReady :: proc(shader: Shader) -> bool --- // Check if a shader is ready
|
IsShaderValid :: proc(shader: Shader) -> bool --- // Check if a shader is valid (loaded on GPU)
|
||||||
GetShaderLocation :: proc(shader: Shader, uniformName: cstring) -> c.int --- // Get shader uniform location
|
GetShaderLocation :: proc(shader: Shader, uniformName: cstring) -> c.int --- // Get shader uniform location
|
||||||
GetShaderLocationAttrib :: proc(shader: Shader, attribName: cstring) -> c.int --- // Get shader attribute location
|
GetShaderLocationAttrib :: proc(shader: Shader, attribName: cstring) -> c.int --- // Get shader attribute location
|
||||||
|
|
||||||
@@ -995,14 +1004,15 @@ foreign lib {
|
|||||||
|
|
||||||
// Screen-space-related functions
|
// Screen-space-related functions
|
||||||
|
|
||||||
GetMouseRay :: proc(mousePosition: Vector2, camera: Camera) -> Ray --- // Get a ray trace from mouse position
|
GetScreenToWorldRay :: proc(position: Vector2, camera: Camera) -> Ray --- // Get a ray trace from screen position (i.e mouse)
|
||||||
GetCameraMatrix :: proc(camera: Camera) -> Matrix --- // Get camera transform matrix (view matrix)
|
GetScreenToWorldRayEx :: proc(position: Vector2, camera: Camera, width: c.int, height: c.int) ->Ray --- // Get a ray trace from screen position (i.e mouse) in a viewport
|
||||||
GetCameraMatrix2D :: proc(camera: Camera2D) -> Matrix --- // Get camera 2d transform matrix
|
GetWorldToScreen :: proc(position: Vector3, camera: Camera) -> Vector2 --- // Get the screen space position for a 3d world space position
|
||||||
GetWorldToScreen :: proc(position: Vector3, camera: Camera) -> Vector2 --- // Get the screen space position for a 3d world space position
|
GetWorldToScreenEx :: proc(position: Vector3, camera: Camera, width: c.int, height: c.int) -> Vector2 --- // Get size position for a 3d world space position
|
||||||
GetScreenToWorld2D :: proc(position: Vector2, camera: Camera2D) -> Vector2 --- // Get the world space position for a 2d camera screen space position
|
GetWorldToScreen2D :: proc(position: Vector2, camera: Camera2D) -> Vector2 --- // Get the screen space position for a 2d camera world space position
|
||||||
GetWorldToScreenEx :: proc(position: Vector3, camera: Camera, width, height: c.int) -> Vector2 --- // Get size position for a 3d world space position
|
GetScreenToWorld2D :: proc(position: Vector2, camera: Camera2D) -> Vector2 --- // Get the world space position for a 2d camera screen space position
|
||||||
GetWorldToScreen2D :: proc(position: Vector2, camera: Camera2D) -> Vector2 --- // Get the screen space position for a 2d camera world space position
|
GetCameraMatrix :: proc(camera: Camera) -> Matrix --- // Get camera transform matrix (view matrix)
|
||||||
|
GetCameraMatrix2D :: proc(camera: Camera2D) -> Matrix --- // Get camera 2d transform matrix
|
||||||
|
|
||||||
// Timing-related functions
|
// Timing-related functions
|
||||||
|
|
||||||
SetTargetFPS :: proc(fps: c.int) --- // Set target FPS (maximum)
|
SetTargetFPS :: proc(fps: c.int) --- // Set target FPS (maximum)
|
||||||
@@ -1030,7 +1040,7 @@ foreign lib {
|
|||||||
MemRealloc :: proc(ptr: rawptr, size: c.uint) -> rawptr --- // Internal memory reallocator
|
MemRealloc :: proc(ptr: rawptr, size: c.uint) -> rawptr --- // Internal memory reallocator
|
||||||
|
|
||||||
// Set custom callbacks
|
// Set custom callbacks
|
||||||
// WARNING: Callbacks setup is intended for advance users
|
// WARNING: Callbacks setup is intended for advanced users
|
||||||
|
|
||||||
SetTraceLogCallback :: proc(callback: TraceLogCallback) --- // Set custom trace log
|
SetTraceLogCallback :: proc(callback: TraceLogCallback) --- // Set custom trace log
|
||||||
SetLoadFileDataCallback :: proc(callback: LoadFileDataCallback) --- // Set custom file binary data loader
|
SetLoadFileDataCallback :: proc(callback: LoadFileDataCallback) --- // Set custom file binary data loader
|
||||||
@@ -1061,10 +1071,12 @@ foreign lib {
|
|||||||
GetPrevDirectoryPath :: proc(dirPath: cstring) -> cstring --- // Get previous directory path for a given path (uses static string)
|
GetPrevDirectoryPath :: proc(dirPath: cstring) -> cstring --- // Get previous directory path for a given path (uses static string)
|
||||||
GetWorkingDirectory :: proc() -> cstring --- // Get current working directory (uses static string)
|
GetWorkingDirectory :: proc() -> cstring --- // Get current working directory (uses static string)
|
||||||
GetApplicationDirectory :: proc() -> cstring --- // Get the directory of the running application (uses static string)
|
GetApplicationDirectory :: proc() -> cstring --- // Get the directory of the running application (uses static string)
|
||||||
|
MakeDirectory :: proc(dirPath: cstring) -> c.int --- // Create directories (including full path requested), returns 0 on success
|
||||||
ChangeDirectory :: proc(dir: cstring) -> bool --- // Change working directory, return true on success
|
ChangeDirectory :: proc(dir: cstring) -> bool --- // Change working directory, return true on success
|
||||||
IsPathFile :: proc(path: cstring) -> bool --- // Check if a given path is a file or a directory
|
IsPathFile :: proc(path: cstring) -> bool --- // Check if a given path is a file or a directory
|
||||||
|
IsFileNameValid :: proc (fileName: cstring) -> bool --- // Check if fileName is valid for the platform/OS
|
||||||
LoadDirectoryFiles :: proc(dirPath: cstring) -> FilePathList --- // Load directory filepaths
|
LoadDirectoryFiles :: proc(dirPath: cstring) -> FilePathList --- // Load directory filepaths
|
||||||
LoadDirectoryFilesEx :: proc(basePath: cstring, filter: cstring, scanSubdirs: bool) -> FilePathList --- // Load directory filepaths with extension filtering and recursive directory scan
|
LoadDirectoryFilesEx :: proc(basePath: cstring, filter: cstring, scanSubdirs: bool) -> FilePathList --- // Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result
|
||||||
UnloadDirectoryFiles :: proc(files: FilePathList) --- // Unload filepaths
|
UnloadDirectoryFiles :: proc(files: FilePathList) --- // Unload filepaths
|
||||||
IsFileDropped :: proc() -> bool --- // Check if a file has been dropped into window
|
IsFileDropped :: proc() -> bool --- // Check if a file has been dropped into window
|
||||||
LoadDroppedFiles :: proc() -> FilePathList --- // Load dropped filepaths
|
LoadDroppedFiles :: proc() -> FilePathList --- // Load dropped filepaths
|
||||||
@@ -1077,11 +1089,15 @@ foreign lib {
|
|||||||
DecompressData :: proc(compData: rawptr, compDataSize: c.int, dataSize: ^c.int) -> [^]byte --- // Decompress data (DEFLATE algorithm), memory must be MemFree()
|
DecompressData :: proc(compData: rawptr, compDataSize: c.int, dataSize: ^c.int) -> [^]byte --- // Decompress data (DEFLATE algorithm), memory must be MemFree()
|
||||||
EncodeDataBase64 :: proc(data: rawptr, dataSize: c.int, outputSize: ^c.int) -> [^]byte --- // Encode data to Base64 string, memory must be MemFree()
|
EncodeDataBase64 :: proc(data: rawptr, dataSize: c.int, outputSize: ^c.int) -> [^]byte --- // Encode data to Base64 string, memory must be MemFree()
|
||||||
DecodeDataBase64 :: proc(data: rawptr, outputSize: ^c.int) -> [^]byte --- // Decode Base64 string data, memory must be MemFree()
|
DecodeDataBase64 :: proc(data: rawptr, outputSize: ^c.int) -> [^]byte --- // Decode Base64 string data, memory must be MemFree()
|
||||||
|
ComputeCRC32 :: proc(data: rawptr, dataSize: c.int) -> c.uint --- // Compute CRC32 hash code
|
||||||
|
ComputeMD5 :: proc (data: rawptr, dataSize: c.int) -> [^]c.uint --- // Compute MD5 hash code, returns static int[4] (16 bytes)
|
||||||
|
ComputeSHA1 :: proc(data: rawptr, dataSize: c.int) -> [^]c.uint --- // Compute SHA1 hash code, returns static int[5] (20 bytes)
|
||||||
|
|
||||||
|
|
||||||
// Automation events functionality
|
// Automation events functionality
|
||||||
|
|
||||||
LoadAutomationEventList :: proc(fileName: cstring) -> AutomationEventList --- // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
|
LoadAutomationEventList :: proc(fileName: cstring) -> AutomationEventList --- // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
|
||||||
UnloadAutomationEventList :: proc(list: ^AutomationEventList) --- // Unload automation events list from file
|
UnloadAutomationEventList :: proc(list: AutomationEventList) --- // Unload automation events list from file
|
||||||
ExportAutomationEventList :: proc(list: AutomationEventList, fileName: cstring) -> bool --- // Export automation events list as text file
|
ExportAutomationEventList :: proc(list: AutomationEventList, fileName: cstring) -> bool --- // Export automation events list as text file
|
||||||
SetAutomationEventList :: proc(list: ^AutomationEventList) --- // Set automation event list to record to
|
SetAutomationEventList :: proc(list: ^AutomationEventList) --- // Set automation event list to record to
|
||||||
SetAutomationEventBaseFrame :: proc(frame: c.int) --- // Set automation event internal base frame to start recording
|
SetAutomationEventBaseFrame :: proc(frame: c.int) --- // Set automation event internal base frame to start recording
|
||||||
@@ -1096,7 +1112,7 @@ foreign lib {
|
|||||||
// Input-related functions: keyboard
|
// Input-related functions: keyboard
|
||||||
|
|
||||||
IsKeyPressed :: proc(key: KeyboardKey) -> bool --- // Detect if a key has been pressed once
|
IsKeyPressed :: proc(key: KeyboardKey) -> bool --- // Detect if a key has been pressed once
|
||||||
IsKeyPressedRepeat :: proc(key: KeyboardKey) -> bool --- // Check if a key has been pressed again (Only PLATFORM_DESKTOP)
|
IsKeyPressedRepeat :: proc(key: KeyboardKey) -> bool --- // Check if a key has been pressed again
|
||||||
IsKeyDown :: proc(key: KeyboardKey) -> bool --- // Detect if a key is being pressed
|
IsKeyDown :: proc(key: KeyboardKey) -> bool --- // Detect if a key is being pressed
|
||||||
IsKeyReleased :: proc(key: KeyboardKey) -> bool --- // Detect if a key has been released once
|
IsKeyReleased :: proc(key: KeyboardKey) -> bool --- // Detect if a key has been released once
|
||||||
IsKeyUp :: proc(key: KeyboardKey) -> bool --- // Detect if a key is NOT being pressed
|
IsKeyUp :: proc(key: KeyboardKey) -> bool --- // Detect if a key is NOT being pressed
|
||||||
@@ -1106,27 +1122,25 @@ foreign lib {
|
|||||||
|
|
||||||
// Input-related functions: gamepads
|
// Input-related functions: gamepads
|
||||||
|
|
||||||
IsGamepadAvailable :: proc(gamepad: c.int) -> bool --- // Check if a gamepad is available
|
IsGamepadAvailable :: proc(gamepad: c.int) -> bool --- // Check if a gamepad is available
|
||||||
GetGamepadName :: proc(gamepad: c.int) -> cstring --- // Get gamepad internal name id
|
GetGamepadName :: proc(gamepad: c.int) -> cstring --- // Get gamepad internal name id
|
||||||
IsGamepadButtonPressed :: proc(gamepad: c.int, button: GamepadButton) -> bool --- // Check if a gamepad button has been pressed once
|
IsGamepadButtonPressed :: proc(gamepad: c.int, button: GamepadButton) -> bool --- // Check if a gamepad button has been pressed once
|
||||||
IsGamepadButtonDown :: proc(gamepad: c.int, button: GamepadButton) -> bool --- // Check if a gamepad button is being pressed
|
IsGamepadButtonDown :: proc(gamepad: c.int, button: GamepadButton) -> bool --- // Check if a gamepad button is being pressed
|
||||||
IsGamepadButtonReleased :: proc(gamepad: c.int, button: GamepadButton) -> bool --- // Check if a gamepad button has been released once
|
IsGamepadButtonReleased :: proc(gamepad: c.int, button: GamepadButton) -> bool --- // Check if a gamepad button has been released once
|
||||||
IsGamepadButtonUp :: proc(gamepad: c.int, button: GamepadButton) -> bool --- // Check if a gamepad button is NOT being pressed
|
IsGamepadButtonUp :: proc(gamepad: c.int, button: GamepadButton) -> bool --- // Check if a gamepad button is NOT being pressed
|
||||||
GetGamepadButtonPressed :: proc() -> GamepadButton --- // Get the last gamepad button pressed
|
GetGamepadButtonPressed :: proc() -> GamepadButton --- // Get the last gamepad button pressed
|
||||||
GetGamepadAxisCount :: proc(gamepad: c.int) -> c.int --- // Get gamepad axis count for a gamepad
|
GetGamepadAxisCount :: proc(gamepad: c.int) -> c.int --- // Get gamepad axis count for a gamepad
|
||||||
GetGamepadAxisMovement :: proc(gamepad: c.int, axis: GamepadAxis) -> f32 --- // Get axis movement value for a gamepad axis
|
GetGamepadAxisMovement :: proc(gamepad: c.int, axis: GamepadAxis) -> f32 --- // Get axis movement value for a gamepad axis
|
||||||
SetGamepadMappings :: proc(mappings: cstring) -> c.int --- // Set internal gamepad mappings (SDL_GameControllerDB)
|
SetGamepadMappings :: proc(mappings: cstring) -> c.int --- // Set internal gamepad mappings (SDL_GameControllerDB)
|
||||||
|
SetGamepadVibration :: proc(gamepad: c.int, leftMotor: f32, rightMotor: f32, duration: f32) --- // Set gamepad vibration for both motors (duration in seconds)
|
||||||
|
|
||||||
|
|
||||||
// Input-related functions: mouse
|
// Input-related functions: mouse
|
||||||
|
|
||||||
IsMouseButtonPressed :: proc(button: MouseButton) -> bool --- // Detect if a mouse button has been pressed once
|
IsMouseButtonPressed :: proc(button: MouseButton) -> bool --- // Detect if a mouse button has been pressed once
|
||||||
IsMouseButtonDown :: proc(button: MouseButton) -> bool --- // Detect if a mouse button is being pressed
|
IsMouseButtonDown :: proc(button: MouseButton) -> bool --- // Detect if a mouse button is being pressed
|
||||||
IsMouseButtonReleased :: proc(button: MouseButton) -> bool --- // Detect if a mouse button has been released once
|
IsMouseButtonReleased :: proc(button: MouseButton) -> bool --- // Detect if a mouse button has been released once
|
||||||
|
IsMouseButtonUp :: proc(button: MouseButton) -> bool ---
|
||||||
when VERSION != "5.0" {
|
|
||||||
#panic("IsMouseButtonUp was broken in Raylib 5.0 but should be fixed in Raylib > 5.0. Remove this panic and the when block around it and also remove the workaround version of IsMouseButtonUp just after the end of the 'foreign lib {' block.")
|
|
||||||
IsMouseButtonUp :: proc(button: MouseButton) -> bool ---
|
|
||||||
}
|
|
||||||
|
|
||||||
GetMouseX :: proc() -> c.int --- // Returns mouse position X
|
GetMouseX :: proc() -> c.int --- // Returns mouse position X
|
||||||
GetMouseY :: proc() -> c.int --- // Returns mouse position Y
|
GetMouseY :: proc() -> c.int --- // Returns mouse position Y
|
||||||
@@ -1152,10 +1166,9 @@ foreign lib {
|
|||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
|
||||||
SetGesturesEnabled :: proc(flags: Gestures) --- // Enable a set of gestures using flags
|
SetGesturesEnabled :: proc(flags: Gestures) --- // Enable a set of gestures using flags
|
||||||
// IsGestureDetected :: proc(gesture: Gesture) -> bool --- // Check if a gesture have been detected
|
|
||||||
|
|
||||||
GetGestureDetected :: proc() -> Gestures --- // Get latest detected gesture
|
GetGestureDetected :: proc() -> Gestures --- // Get latest detected gesture
|
||||||
GetGestureHoldDuration :: proc() -> f32 --- // Get gesture hold time in milliseconds
|
GetGestureHoldDuration :: proc() -> f32 --- // Get gesture hold time in seconds
|
||||||
GetGestureDragVector :: proc() -> Vector2 --- // Get gesture drag vector
|
GetGestureDragVector :: proc() -> Vector2 --- // Get gesture drag vector
|
||||||
GetGestureDragAngle :: proc() -> f32 --- // Get gesture drag angle
|
GetGestureDragAngle :: proc() -> f32 --- // Get gesture drag angle
|
||||||
GetGesturePinchVector :: proc() -> Vector2 --- // Get gesture pinch delta
|
GetGesturePinchVector :: proc() -> Vector2 --- // Get gesture pinch delta
|
||||||
@@ -1175,46 +1188,50 @@ foreign lib {
|
|||||||
// NOTE: It can be useful when using basic shapes and one single font,
|
// NOTE: It can be useful when using basic shapes and one single font,
|
||||||
// defining a font char white rectangle would allow drawing everything in a single draw call
|
// defining a font char white rectangle would allow drawing everything in a single draw call
|
||||||
|
|
||||||
SetShapesTexture :: proc(texture: Texture2D, source: Rectangle) ---
|
SetShapesTexture :: proc(texture: Texture2D, source: Rectangle) --- // Set texture and rectangle to be used on shapes drawing
|
||||||
|
GetShapesTexture :: proc() -> Texture2D --- // Get texture that is used for shapes drawing
|
||||||
|
GetShapesTextureRectangle :: proc() -> Rectangle --- // Get texture source rectangle that is used for shapes drawing
|
||||||
|
|
||||||
|
|
||||||
// Basic shapes drawing functions
|
// Basic shapes drawing functions
|
||||||
|
|
||||||
DrawPixel :: proc(posX, posY: c.int, color: Color) --- // Draw a pixel
|
DrawPixel :: proc(posX, posY: c.int, color: Color) --- // Draw a pixel using geometry [Can be slow, use with care]
|
||||||
DrawPixelV :: proc(position: Vector2, color: Color) --- // Draw a pixel (Vector version)
|
DrawPixelV :: proc(position: Vector2, color: Color) --- // Draw a pixel using geometry (Vector version) [Can be slow, use with care]
|
||||||
DrawLine :: proc(startPosX, startPosY, endPosX, endPosY: c.int, color: Color) --- // Draw a line
|
DrawLine :: proc(startPosX, startPosY, endPosX, endPosY: c.int, color: Color) --- // Draw a line
|
||||||
DrawLineV :: proc(startPos, endPos: Vector2, color: Color) --- // Draw a line (using gl lines)
|
DrawLineV :: proc(startPos, endPos: Vector2, color: Color) --- // Draw a line (using gl lines)
|
||||||
DrawLineEx :: proc(startPos, endPos: Vector2, thick: f32, color: Color) --- // Draw a line (using triangles/quads)
|
DrawLineEx :: proc(startPos, endPos: Vector2, thick: f32, color: Color) --- // Draw a line (using triangles/quads)
|
||||||
DrawLineStrip :: proc(points: [^]Vector2, pointCount: c.int, color: Color) --- // Draw lines sequence (using gl lines)
|
DrawLineStrip :: proc(points: [^]Vector2, pointCount: c.int, color: Color) --- // Draw lines sequence (using gl lines)
|
||||||
DrawLineBezier :: proc(startPos, endPos: Vector2, thick: f32, color: Color) --- // Draw line segment cubic-bezier in-out interpolation
|
DrawLineBezier :: proc(startPos, endPos: Vector2, thick: f32, color: Color) --- // Draw line segment cubic-bezier in-out interpolation
|
||||||
DrawCircle :: proc(centerX, centerY: c.int, radius: f32, color: Color) --- // Draw a color-filled circle
|
DrawCircle :: proc(centerX, centerY: c.int, radius: f32, color: Color) --- // Draw a color-filled circle
|
||||||
DrawCircleSector :: proc(center: Vector2, radius: f32, startAngle, endAngle: f32, segments: c.int, color: Color) --- // Draw a piece of a circle
|
DrawCircleSector :: proc(center: Vector2, radius: f32, startAngle, endAngle: f32, segments: c.int, color: Color) --- // Draw a piece of a circle
|
||||||
DrawCircleSectorLines :: proc(center: Vector2, radius: f32, startAngle, endAngle: f32, segments: c.int, color: Color) --- // Draw circle sector outline
|
DrawCircleSectorLines :: proc(center: Vector2, radius: f32, startAngle, endAngle: f32, segments: c.int, color: Color) --- // Draw circle sector outline
|
||||||
DrawCircleGradient :: proc(centerX, centerY: c.int, radius: f32, color1, color2: Color) --- // Draw a gradient-filled circle
|
DrawCircleGradient :: proc(centerX, centerY: c.int, radius: f32, inner, outer: Color) --- // Draw a gradient-filled circle
|
||||||
DrawCircleV :: proc(center: Vector2, radius: f32, color: Color) --- // Draw a color-filled circle (Vector version)
|
DrawCircleV :: proc(center: Vector2, radius: f32, color: Color) --- // Draw a color-filled circle (Vector version)
|
||||||
DrawCircleLines :: proc(centerX, centerY: c.int, radius: f32, color: Color) --- // Draw circle outline
|
DrawCircleLines :: proc(centerX, centerY: c.int, radius: f32, color: Color) --- // Draw circle outline
|
||||||
DrawCircleLinesV :: proc(center: Vector2, radius: f32, color: Color) --- // Draw circle outline (Vector version)
|
DrawCircleLinesV :: proc(center: Vector2, radius: f32, color: Color) --- // Draw circle outline (Vector version)
|
||||||
DrawEllipse :: proc(centerX, centerY: c.int, radiusH, radiusV: f32, color: Color) --- // Draw ellipse
|
DrawEllipse :: proc(centerX, centerY: c.int, radiusH, radiusV: f32, color: Color) --- // Draw ellipse
|
||||||
DrawEllipseLines :: proc(centerX, centerY: c.int, radiusH, radiusV: f32, color: Color) --- // Draw ellipse outline
|
DrawEllipseLines :: proc(centerX, centerY: c.int, radiusH, radiusV: f32, color: Color) --- // Draw ellipse outline
|
||||||
DrawRing :: proc(center: Vector2, innerRadius, outerRadius: f32, startAngle, endAngle: f32, segments: c.int, color: Color) --- // Draw ring
|
DrawRing :: proc(center: Vector2, innerRadius, outerRadius: f32, startAngle, endAngle: f32, segments: c.int, color: Color) --- // Draw ring
|
||||||
DrawRingLines :: proc(center: Vector2, innerRadius, outerRadius: f32, startAngle, endAngle: f32, segments: c.int, color: Color) --- // Draw ring outline
|
DrawRingLines :: proc(center: Vector2, innerRadius, outerRadius: f32, startAngle, endAngle: f32, segments: c.int, color: Color) --- // Draw ring outline
|
||||||
DrawRectangle :: proc(posX, posY: c.int, width, height: c.int, color: Color) --- // Draw a color-filled rectangle
|
DrawRectangle :: proc(posX, posY: c.int, width, height: c.int, color: Color) --- // Draw a color-filled rectangle
|
||||||
DrawRectangleV :: proc(position: Vector2, size: Vector2, color: Color) --- // Draw a color-filled rectangle (Vector version)
|
DrawRectangleV :: proc(position: Vector2, size: Vector2, color: Color) --- // Draw a color-filled rectangle (Vector version)
|
||||||
DrawRectangleRec :: proc(rec: Rectangle, color: Color) --- // Draw a color-filled rectangle
|
DrawRectangleRec :: proc(rec: Rectangle, color: Color) --- // Draw a color-filled rectangle
|
||||||
DrawRectanglePro :: proc(rec: Rectangle, origin: Vector2, rotation: f32, color: Color) --- // Draw a color-filled rectangle with pro parameters
|
DrawRectanglePro :: proc(rec: Rectangle, origin: Vector2, rotation: f32, color: Color) --- // Draw a color-filled rectangle with pro parameters
|
||||||
DrawRectangleGradientV :: proc(posX, posY: c.int, width, height: c.int, color1, color2: Color) --- // Draw a vertical-gradient-filled rectangle
|
DrawRectangleGradientV :: proc(posX, posY: c.int, width, height: c.int, top, bottom: Color) --- // Draw a vertical-gradient-filled rectangle
|
||||||
DrawRectangleGradientH :: proc(posX, posY: c.int, width, height: c.int, color1, color2: Color) --- // Draw a horizontal-gradient-filled rectangle
|
DrawRectangleGradientH :: proc(posX, posY: c.int, width, height: c.int, left, right: Color) --- // Draw a horizontal-gradient-filled rectangle
|
||||||
DrawRectangleGradientEx :: proc(rec: Rectangle, col1, col2, col3, col4: Color) --- // Draw a gradient-filled rectangle with custom vertex colors
|
DrawRectangleGradientEx :: proc(rec: Rectangle, topLeft, bottomLeft, topRight, bottomRight: Color) --- // Draw a gradient-filled rectangle with custom vertex colors
|
||||||
DrawRectangleLines :: proc(posX, posY: c.int, width, height: c.int, color: Color) --- // Draw rectangle outline
|
DrawRectangleLines :: proc(posX, posY: c.int, width, height: c.int, color: Color) --- // Draw rectangle outline
|
||||||
DrawRectangleLinesEx :: proc(rec: Rectangle, lineThick: f32, color: Color) --- // Draw rectangle outline with extended parameters
|
DrawRectangleLinesEx :: proc(rec: Rectangle, lineThick: f32, color: Color) --- // Draw rectangle outline with extended parameters
|
||||||
DrawRectangleRounded :: proc(rec: Rectangle, roundness: f32, segments: c.int, color: Color) --- // Draw rectangle with rounded edges
|
DrawRectangleRounded :: proc(rec: Rectangle, roundness: f32, segments: c.int, color: Color) --- // Draw rectangle with rounded edges
|
||||||
DrawRectangleRoundedLines :: proc(rec: Rectangle, roundness: f32, segments: c.int, lineThick: f32, color: Color) --- // Draw rectangle with rounded edges outline
|
DrawRectangleRoundedLines :: proc(rec: Rectangle, roundness: f32, segments: c.int, lineThick: f32, color: Color) --- // Draw rectangle lines with rounded edges
|
||||||
DrawTriangle :: proc(v1, v2, v3: Vector2, color: Color) --- // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
DrawRectangleRoundedLinesEx :: proc(rec: Rectangle, roundness: f32, segments: c.int, lineThick: f32, color: Color) --- // Draw rectangle with rounded edges outline
|
||||||
DrawTriangleLines :: proc(v1, v2, v3: Vector2, color: Color) --- // Draw triangle outline (vertex in counter-clockwise order!)
|
DrawTriangle :: proc(v1, v2, v3: Vector2, color: Color) --- // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
||||||
DrawTriangleFan :: proc(points: [^]Vector2, pointCount: c.int, color: Color) --- // Draw a triangle fan defined by points (first vertex is the center)
|
DrawTriangleLines :: proc(v1, v2, v3: Vector2, color: Color) --- // Draw triangle outline (vertex in counter-clockwise order!)
|
||||||
DrawTriangleStrip :: proc(points: [^]Vector2, pointCount: c.int, color: Color) --- // Draw a triangle strip defined by points
|
DrawTriangleFan :: proc(points: [^]Vector2, pointCount: c.int, color: Color) --- // Draw a triangle fan defined by points (first vertex is the center)
|
||||||
DrawPoly :: proc(center: Vector2, sides: c.int, radius: f32, rotation: f32, color: Color) --- // Draw a regular polygon (Vector version)
|
DrawTriangleStrip :: proc(points: [^]Vector2, pointCount: c.int, color: Color) --- // Draw a triangle strip defined by points
|
||||||
DrawPolyLines :: proc(center: Vector2, sides: c.int, radius: f32, rotation: f32, color: Color) --- // Draw a polygon outline of n sides
|
DrawPoly :: proc(center: Vector2, sides: c.int, radius: f32, rotation: f32, color: Color) --- // Draw a regular polygon (Vector version)
|
||||||
DrawPolyLinesEx :: proc(center: Vector2, sides: c.int, radius: f32, rotation: f32, lineThick: f32, color: Color) --- // Draw a polygon outline of n sides with extended parameters
|
DrawPolyLines :: proc(center: Vector2, sides: c.int, radius: f32, rotation: f32, color: Color) --- // Draw a polygon outline of n sides
|
||||||
|
DrawPolyLinesEx :: proc(center: Vector2, sides: c.int, radius: f32, rotation: f32, lineThick: f32, color: Color) --- // Draw a polygon outline of n sides with extended parameters
|
||||||
|
|
||||||
// Splines drawing functions
|
// Splines drawing functions
|
||||||
DrawSplineLinear :: proc(points: [^]Vector2, pointCount: c.int, thick: f32, color: Color) --- // Draw spline: Linear, minimum 2 points
|
DrawSplineLinear :: proc(points: [^]Vector2, pointCount: c.int, thick: f32, color: Color) --- // Draw spline: Linear, minimum 2 points
|
||||||
@@ -1238,12 +1255,13 @@ foreign lib {
|
|||||||
CheckCollisionRecs :: proc(rec1, rec2: Rectangle) -> bool --- // Check collision between two rectangles
|
CheckCollisionRecs :: proc(rec1, rec2: Rectangle) -> bool --- // Check collision between two rectangles
|
||||||
CheckCollisionCircles :: proc(center1: Vector2, radius1: f32, center2: Vector2, radius2: f32) -> bool --- // Check collision between two circles
|
CheckCollisionCircles :: proc(center1: Vector2, radius1: f32, center2: Vector2, radius2: f32) -> bool --- // Check collision between two circles
|
||||||
CheckCollisionCircleRec :: proc(center: Vector2, radius: f32, rec: Rectangle) -> bool --- // Check collision between circle and rectangle
|
CheckCollisionCircleRec :: proc(center: Vector2, radius: f32, rec: Rectangle) -> bool --- // Check collision between circle and rectangle
|
||||||
|
CheckCollisionCircleLine :: proc(center: Vector2, radius: f32, p1, p2: Vector2) -> bool --- // Check if circle collides with a line created betweeen two points [p1] and [p2]
|
||||||
CheckCollisionPointRec :: proc(point: Vector2, rec: Rectangle) -> bool --- // Check if point is inside rectangle
|
CheckCollisionPointRec :: proc(point: Vector2, rec: Rectangle) -> bool --- // Check if point is inside rectangle
|
||||||
CheckCollisionPointCircle :: proc(point, center: Vector2, radius: f32) -> bool --- // Check if point is inside circle
|
CheckCollisionPointCircle :: proc(point, center: Vector2, radius: f32) -> bool --- // Check if point is inside circle
|
||||||
CheckCollisionPointTriangle :: proc(point: Vector2, p1, p2, p3: Vector2) -> bool --- // Check if point is inside a triangle
|
CheckCollisionPointTriangle :: proc(point: Vector2, p1, p2, p3: Vector2) -> bool --- // Check if point is inside a triangle
|
||||||
|
CheckCollisionPointLine :: proc(point: Vector2, p1, p2: Vector2, threshold: c.int) -> bool --- // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
|
||||||
CheckCollisionPointPoly :: proc(point: Vector2, points: [^]Vector2, pointCount: c.int) -> bool --- // Check if point is within a polygon described by array of vertices
|
CheckCollisionPointPoly :: proc(point: Vector2, points: [^]Vector2, pointCount: c.int) -> bool --- // Check if point is within a polygon described by array of vertices
|
||||||
CheckCollisionLines :: proc(startPos1, endPos1, startPos2, endPos2: Vector2, collisionPoint: [^]Vector2) -> bool --- // Check the collision between two lines defined by two points each, returns collision point by reference
|
CheckCollisionLines :: proc(startPos1, endPos1, startPos2, endPos2: Vector2, collisionPoint: [^]Vector2) -> bool --- // Check the collision between two lines defined by two points each, returns collision point by reference
|
||||||
CheckCollisionPointLine :: proc(point: Vector2, p1, p2: Vector2, threshold: c.int) -> bool --- // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
|
|
||||||
GetCollisionRec :: proc(rec1, rec2: Rectangle) -> Rectangle --- // Get collision rectangle for two rectangles collision
|
GetCollisionRec :: proc(rec1, rec2: Rectangle) -> Rectangle --- // Get collision rectangle for two rectangles collision
|
||||||
|
|
||||||
|
|
||||||
@@ -1251,18 +1269,18 @@ foreign lib {
|
|||||||
// Image loading functions
|
// Image loading functions
|
||||||
// NOTE: These functions do not require GPU access
|
// NOTE: These functions do not require GPU access
|
||||||
|
|
||||||
LoadImage :: proc(fileName: cstring) -> Image --- // Load image from file into CPU memory (RAM)
|
LoadImage :: proc(fileName: cstring) -> Image --- // Load image from file into CPU memory (RAM)
|
||||||
LoadImageRaw :: proc(fileName: cstring, width, height: c.int, format: PixelFormat, headerSize: c.int) -> Image --- // Load image from RAW file data
|
LoadImageRaw :: proc(fileName: cstring, width, height: c.int, format: PixelFormat, headerSize: c.int) -> Image --- // Load image from RAW file data
|
||||||
LoadImageSvg :: proc(fileNameOrString: cstring, width, height: c.int) -> Image --- // Load image from SVG file data or string with specified size
|
LoadImageAnim :: proc(fileName: cstring, frames: ^c.int) -> Image --- // Load image sequence from file (frames appended to image.data)
|
||||||
LoadImageAnim :: proc(fileName: cstring, frames: ^c.int) -> Image --- // Load image sequence from file (frames appended to image.data)
|
LoadImageAnimFromMemory :: proc(fileType: cstring, fileData: rawptr, dataSize: c.int, frames: ^c.int) -> Image --- // Load image sequence from memory buffer
|
||||||
LoadImageFromMemory :: proc(fileType: cstring, fileData: rawptr, dataSize: c.int) -> Image --- // Load image from memory buffer, fileType refers to extension: i.e. '.png'
|
LoadImageFromMemory :: proc(fileType: cstring, fileData: rawptr, dataSize: c.int) -> Image --- // Load image from memory buffer, fileType refers to extension: i.e. '.png'
|
||||||
LoadImageFromTexture :: proc(texture: Texture2D) -> Image --- // Load image from GPU texture data
|
LoadImageFromTexture :: proc(texture: Texture2D) -> Image --- // Load image from GPU texture data
|
||||||
LoadImageFromScreen :: proc() -> Image --- // Load image from screen buffer and (screenshot)
|
LoadImageFromScreen :: proc() -> Image --- // Load image from screen buffer and (screenshot)
|
||||||
IsImageReady :: proc(image: Image) -> bool --- // Check if an image is ready
|
IsImageValid :: proc(image: Image) -> bool --- // Check if an image is ready
|
||||||
UnloadImage :: proc(image: Image) --- // Unload image from CPU memory (RAM)
|
UnloadImage :: proc(image: Image) --- // Unload image from CPU memory (RAM)
|
||||||
ExportImage :: proc(image: Image, fileName: cstring) -> bool --- // Export image data to file, returns true on success
|
ExportImage :: proc(image: Image, fileName: cstring) -> bool --- // Export image data to file, returns true on success
|
||||||
ExportImageToMemory :: proc(image: Image, fileType: cstring, fileSize: ^c.int) -> rawptr --- // Export image to memory buffer
|
ExportImageToMemory :: proc(image: Image, fileType: cstring, fileSize: ^c.int) -> rawptr --- // Export image to memory buffer
|
||||||
ExportImageAsCode :: proc(image: Image, fileName: cstring) -> bool --- // Export image as code file defining an array of bytes, returns true on success
|
ExportImageAsCode :: proc(image: Image, fileName: cstring) -> bool --- // Export image as code file defining an array of bytes, returns true on success
|
||||||
|
|
||||||
// Image generation functions
|
// Image generation functions
|
||||||
|
|
||||||
@@ -1278,40 +1296,42 @@ foreign lib {
|
|||||||
|
|
||||||
// Image manipulation functions
|
// Image manipulation functions
|
||||||
|
|
||||||
ImageCopy :: proc(image: Image) -> Image --- // Create an image duplicate (useful for transformations)
|
ImageCopy :: proc(image: Image) -> Image --- // Create an image duplicate (useful for transformations)
|
||||||
ImageFromImage :: proc(image: Image, rec: Rectangle) -> Image --- // Create an image from another image piece
|
ImageFromImage :: proc(image: Image, rec: Rectangle) -> Image --- // Create an image from another image piece
|
||||||
ImageText :: proc(text: cstring, fontSize: c.int, color: Color) -> Image --- // Create an image from text (default font)
|
ImageFromChannel :: proc(image: Image, selectedChannel: c.int) -> Image --- // Create an image from a selected channel of another image (GRAYSCALE)
|
||||||
ImageTextEx :: proc(font: Font, text: cstring, fontSize: f32, spacing: f32, tint: Color) -> Image --- // Create an image from text (custom sprite font)
|
ImageText :: proc(text: cstring, fontSize: c.int, color: Color) -> Image --- // Create an image from text (default font)
|
||||||
ImageFormat :: proc(image: ^Image, newFormat: PixelFormat) --- // Convert image data to desired format
|
ImageTextEx :: proc(font: Font, text: cstring, fontSize: f32, spacing: f32, tint: Color) -> Image --- // Create an image from text (custom sprite font)
|
||||||
ImageToPOT :: proc(image: ^Image, fill: Color) --- // Convert image to POT (power-of-two)
|
ImageFormat :: proc(image: ^Image, newFormat: PixelFormat) --- // Convert image data to desired format
|
||||||
ImageCrop :: proc(image: ^Image, crop: Rectangle) --- // Crop an image to a defined rectangle
|
ImageToPOT :: proc(image: ^Image, fill: Color) --- // Convert image to POT (power-of-two)
|
||||||
ImageAlphaCrop :: proc(image: ^Image, threshold: f32) --- // Crop image depending on alpha value
|
ImageCrop :: proc(image: ^Image, crop: Rectangle) --- // Crop an image to a defined rectangle
|
||||||
ImageAlphaClear :: proc(image: ^Image, color: Color, threshold: f32) --- // Clear alpha channel to desired color
|
ImageAlphaCrop :: proc(image: ^Image, threshold: f32) --- // Crop image depending on alpha value
|
||||||
ImageAlphaMask :: proc(image: ^Image, alphaMask: Image) --- // Apply alpha mask to image
|
ImageAlphaClear :: proc(image: ^Image, color: Color, threshold: f32) --- // Clear alpha channel to desired color
|
||||||
ImageAlphaPremultiply :: proc(image: ^Image) --- // Premultiply alpha channel
|
ImageAlphaMask :: proc(image: ^Image, alphaMask: Image) --- // Apply alpha mask to image
|
||||||
ImageBlurGaussian :: proc(image: ^Image, blurSize: c.int) --- // Apply Gaussian blur using a box blur approximation
|
ImageAlphaPremultiply :: proc(image: ^Image) --- // Premultiply alpha channel
|
||||||
ImageResize :: proc(image: ^Image, newWidth, newHeight: c.int) --- // Resize image (Bicubic scaling algorithm)
|
ImageBlurGaussian :: proc(image: ^Image, blurSize: c.int) --- // Apply Gaussian blur using a box blur approximation
|
||||||
ImageResizeNN :: proc(image: ^Image, newWidth, newHeight: c.int) --- // Resize image (Nearest-Neighbor scaling algorithm)
|
ImageKernelConvolution :: proc(image: ^Image, kernel: [^]f32, kernelSize: c.int) --- // Apply custom square convolution kernel to image
|
||||||
ImageResizeCanvas :: proc(image: ^Image, newWidth, newHeight: c.int, offsetX, offsetY: c.int, fill: Color) --- // Resize canvas and fill with color
|
ImageResize :: proc(image: ^Image, newWidth, newHeight: c.int) --- // Resize image (Bicubic scaling algorithm)
|
||||||
ImageMipmaps :: proc(image: ^Image) --- // Compute all mipmap levels for a provided image
|
ImageResizeNN :: proc(image: ^Image, newWidth, newHeight: c.int) --- // Resize image (Nearest-Neighbor scaling algorithm)
|
||||||
ImageDither :: proc(image: ^Image, rBpp, gBpp, bBpp, aBpp: c.int) --- // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
|
ImageResizeCanvas :: proc(image: ^Image, newWidth, newHeight: c.int, offsetX, offsetY: c.int, fill: Color) --- // Resize canvas and fill with color
|
||||||
ImageFlipVertical :: proc(image: ^Image) --- // Flip image vertically
|
ImageMipmaps :: proc(image: ^Image) --- // Compute all mipmap levels for a provided image
|
||||||
ImageFlipHorizontal :: proc(image: ^Image) --- // Flip image horizontally
|
ImageDither :: proc(image: ^Image, rBpp, gBpp, bBpp, aBpp: c.int) --- // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
|
||||||
ImageRotate :: proc(image: ^Image, degrees: c.int) --- // Rotate image by input angle in degrees( -359 to 359)
|
ImageFlipVertical :: proc(image: ^Image) --- // Flip image vertically
|
||||||
ImageRotateCW :: proc(image: ^Image) --- // Rotate image clockwise 90deg
|
ImageFlipHorizontal :: proc(image: ^Image) --- // Flip image horizontally
|
||||||
ImageRotateCCW :: proc(image: ^Image) --- // Rotate image counter-clockwise 90deg
|
ImageRotate :: proc(image: ^Image, degrees: c.int) --- // Rotate image by input angle in degrees( -359 to 359)
|
||||||
ImageColorTint :: proc(image: ^Image, color: Color) --- // Modify image color: tint
|
ImageRotateCW :: proc(image: ^Image) --- // Rotate image clockwise 90deg
|
||||||
ImageColorInvert :: proc(image: ^Image) --- // Modify image color: invert
|
ImageRotateCCW :: proc(image: ^Image) --- // Rotate image counter-clockwise 90deg
|
||||||
ImageColorGrayscale :: proc(image: ^Image) --- // Modify image color: grayscale
|
ImageColorTint :: proc(image: ^Image, color: Color) --- // Modify image color: tint
|
||||||
ImageColorContrast :: proc(image: ^Image, contrast: f32) --- // Modify image color: contrast (-100 to 100)
|
ImageColorInvert :: proc(image: ^Image) --- // Modify image color: invert
|
||||||
ImageColorBrightness :: proc(image: ^Image, brightness: c.int) --- // Modify image color: brightness (-255 to 255)
|
ImageColorGrayscale :: proc(image: ^Image) --- // Modify image color: grayscale
|
||||||
ImageColorReplace :: proc(image: ^Image, color, replace: Color) --- // Modify image color: replace color
|
ImageColorContrast :: proc(image: ^Image, contrast: f32) --- // Modify image color: contrast (-100 to 100)
|
||||||
LoadImageColors :: proc(image: Image) -> [^]Color --- // Load color data from image as a Color array (RGBA - 32bit)
|
ImageColorBrightness :: proc(image: ^Image, brightness: c.int) --- // Modify image color: brightness (-255 to 255)
|
||||||
LoadImagePalette :: proc(image: Image, maxPaletteSize: c.int, colorCount: ^c.int) -> [^]Color --- // Load colors palette from image as a Color array (RGBA - 32bit)
|
ImageColorReplace :: proc(image: ^Image, color, replace: Color) --- // Modify image color: replace color
|
||||||
UnloadImageColors :: proc(colors: [^]Color) --- // Unload color data loaded with LoadImageColors()
|
LoadImageColors :: proc(image: Image) -> [^]Color --- // Load color data from image as a Color array (RGBA - 32bit)
|
||||||
UnloadImagePalette :: proc(colors: [^]Color) --- // Unload colors palette loaded with LoadImagePalette()
|
LoadImagePalette :: proc(image: Image, maxPaletteSize: c.int, colorCount: ^c.int) -> [^]Color --- // Load colors palette from image as a Color array (RGBA - 32bit)
|
||||||
GetImageAlphaBorder :: proc(image: Image, threshold: f32) -> Rectangle --- // Get image alpha border rectangle
|
UnloadImageColors :: proc(colors: [^]Color) --- // Unload color data loaded with LoadImageColors()
|
||||||
GetImageColor :: proc(image: Image, x, y: c.int) -> Color --- // Get image pixel color at (x, y) position
|
UnloadImagePalette :: proc(colors: [^]Color) --- // Unload colors palette loaded with LoadImagePalette()
|
||||||
|
GetImageAlphaBorder :: proc(image: Image, threshold: f32) -> Rectangle --- // Get image alpha border rectangle
|
||||||
|
GetImageColor :: proc(image: Image, x, y: c.int) -> Color --- // Get image pixel color at (x, y) position
|
||||||
|
|
||||||
// Image drawing functions
|
// Image drawing functions
|
||||||
// NOTE: Image software-rendering functions (CPU)
|
// NOTE: Image software-rendering functions (CPU)
|
||||||
@@ -1321,6 +1341,7 @@ foreign lib {
|
|||||||
ImageDrawPixelV :: proc(dst: ^Image, position: Vector2, color: Color) --- // Draw pixel within an image (Vector version)
|
ImageDrawPixelV :: proc(dst: ^Image, position: Vector2, color: Color) --- // Draw pixel within an image (Vector version)
|
||||||
ImageDrawLine :: proc(dst: ^Image, startPosX, startPosY, endPosX, endPosY: c.int, color: Color) --- // Draw line within an image
|
ImageDrawLine :: proc(dst: ^Image, startPosX, startPosY, endPosX, endPosY: c.int, color: Color) --- // Draw line within an image
|
||||||
ImageDrawLineV :: proc(dst: ^Image, start, end: Vector2, color: Color) --- // Draw line within an image (Vector version)
|
ImageDrawLineV :: proc(dst: ^Image, start, end: Vector2, color: Color) --- // Draw line within an image (Vector version)
|
||||||
|
ImageDrawLineEx :: proc(dst: ^Image, start, end: Vector2, thick: c.int, color: Color) --- // Draw a line defining thickness within an image
|
||||||
ImageDrawCircle :: proc(dst: ^Image, centerX, centerY: c.int, radius: c.int, color: Color) --- // Draw a filled circle within an image
|
ImageDrawCircle :: proc(dst: ^Image, centerX, centerY: c.int, radius: c.int, color: Color) --- // Draw a filled circle within an image
|
||||||
ImageDrawCircleV :: proc(dst: ^Image, center: Vector2, radius: c.int, color: Color) --- // Draw a filled circle within an image (Vector version)
|
ImageDrawCircleV :: proc(dst: ^Image, center: Vector2, radius: c.int, color: Color) --- // Draw a filled circle within an image (Vector version)
|
||||||
ImageDrawCircleLines :: proc(dst: ^Image, centerX, centerY: c.int, radius: c.int, color: Color) --- // Draw circle outline within an image
|
ImageDrawCircleLines :: proc(dst: ^Image, centerX, centerY: c.int, radius: c.int, color: Color) --- // Draw circle outline within an image
|
||||||
@@ -1329,6 +1350,11 @@ foreign lib {
|
|||||||
ImageDrawRectangleV :: proc(dst: ^Image, position, size: Vector2, color: Color) --- // Draw rectangle within an image (Vector version)
|
ImageDrawRectangleV :: proc(dst: ^Image, position, size: Vector2, color: Color) --- // Draw rectangle within an image (Vector version)
|
||||||
ImageDrawRectangleRec :: proc(dst: ^Image, rec: Rectangle, color: Color) --- // Draw rectangle within an image
|
ImageDrawRectangleRec :: proc(dst: ^Image, rec: Rectangle, color: Color) --- // Draw rectangle within an image
|
||||||
ImageDrawRectangleLines :: proc(dst: ^Image, rec: Rectangle, thick: c.int, color: Color) --- // Draw rectangle lines within an image
|
ImageDrawRectangleLines :: proc(dst: ^Image, rec: Rectangle, thick: c.int, color: Color) --- // Draw rectangle lines within an image
|
||||||
|
ImageDrawTriangle :: proc(dst: ^Image, v1, v2, v3: Vector2, color: Color) --- // Draw triangle within an image
|
||||||
|
ImageDrawTriangleEx :: proc(dst: ^Image, v1, v2, v3: Vector2, c1, c2, c3: Color) --- // Draw triangle with interpolated colors within an image
|
||||||
|
ImageDrawTriangleLines :: proc(dst: ^Image, v1, v2, v3: Vector2, color: Color) --- // Draw triangle outline within an image
|
||||||
|
ImageDrawTriangleFan :: proc(dst: ^Image, points: [^]Vector2, pointCount: c.int, color: Color) --- // Draw a triangle fan defined by points within an image (first vertex is the center)
|
||||||
|
ImageDrawTriangleStrip :: proc(dst: ^Image, points: [^]Vector2, pointCount: c.int, color: Color) --- // Draw a triangle strip defined by points within an image
|
||||||
ImageDraw :: proc(dst: ^Image, src: Image, srcRec, dstRec: Rectangle, tint: Color) --- // Draw a source image within a destination image (tint applied to source)
|
ImageDraw :: proc(dst: ^Image, src: Image, srcRec, dstRec: Rectangle, tint: Color) --- // Draw a source image within a destination image (tint applied to source)
|
||||||
ImageDrawText :: proc(dst: ^Image, text: cstring, posX, posY: c.int, fontSize: c.int, color: Color) --- // Draw text (using default font) within an image (destination)
|
ImageDrawText :: proc(dst: ^Image, text: cstring, posX, posY: c.int, fontSize: c.int, color: Color) --- // Draw text (using default font) within an image (destination)
|
||||||
ImageDrawTextEx :: proc(dst: ^Image, font: Font, text: cstring, position: Vector2, fontSize: f32, spacing: f32, tint: Color) --- // Draw text (custom sprite font) within an image (destination)
|
ImageDrawTextEx :: proc(dst: ^Image, font: Font, text: cstring, position: Vector2, fontSize: f32, spacing: f32, tint: Color) --- // Draw text (custom sprite font) within an image (destination)
|
||||||
@@ -1340,9 +1366,9 @@ foreign lib {
|
|||||||
LoadTextureFromImage :: proc(image: Image) -> Texture2D --- // Load texture from image data
|
LoadTextureFromImage :: proc(image: Image) -> Texture2D --- // Load texture from image data
|
||||||
LoadTextureCubemap :: proc(image: Image, layout: CubemapLayout) -> TextureCubemap --- // Load cubemap from image, multiple image cubemap layouts supported
|
LoadTextureCubemap :: proc(image: Image, layout: CubemapLayout) -> TextureCubemap --- // Load cubemap from image, multiple image cubemap layouts supported
|
||||||
LoadRenderTexture :: proc(width, height: c.int) -> RenderTexture2D --- // Load texture for rendering (framebuffer)
|
LoadRenderTexture :: proc(width, height: c.int) -> RenderTexture2D --- // Load texture for rendering (framebuffer)
|
||||||
IsTextureReady :: proc(texture: Texture2D) -> bool --- // Check if a texture is ready
|
IsTextureValid :: proc(texture: Texture2D) -> bool --- // Check if a texture is valid
|
||||||
UnloadTexture :: proc(texture: Texture2D) --- // Unload texture from GPU memory (VRAM)
|
UnloadTexture :: proc(texture: Texture2D) --- // Unload texture from GPU memory (VRAM)
|
||||||
IsRenderTextureReady :: proc(target: RenderTexture2D) -> bool --- // Check if a render texture is ready
|
IsRenderTextureValid :: proc(target: RenderTexture2D) -> bool --- // Check if a render texture is valid
|
||||||
UnloadRenderTexture :: proc(target: RenderTexture2D) --- // Unload render texture from GPU memory (VRAM)
|
UnloadRenderTexture :: proc(target: RenderTexture2D) --- // Unload render texture from GPU memory (VRAM)
|
||||||
UpdateTexture :: proc(texture: Texture2D, pixels: rawptr) --- // Update GPU texture with new data
|
UpdateTexture :: proc(texture: Texture2D, pixels: rawptr) --- // Update GPU texture with new data
|
||||||
UpdateTextureRec :: proc(texture: Texture2D, rec: Rectangle, pixels: rawptr) --- // Update GPU texture rectangle with new data
|
UpdateTextureRec :: proc(texture: Texture2D, rec: Rectangle, pixels: rawptr) --- // Update GPU texture rectangle with new data
|
||||||
@@ -1362,9 +1388,11 @@ foreign lib {
|
|||||||
DrawTextureNPatch :: proc(texture: Texture2D, nPatchInfo: NPatchInfo, dest: Rectangle, origin: Vector2, rotation: f32, tint: Color) --- // Draws a texture (or part of it) that stretches or shrinks nicely
|
DrawTextureNPatch :: proc(texture: Texture2D, nPatchInfo: NPatchInfo, dest: Rectangle, origin: Vector2, rotation: f32, tint: Color) --- // Draws a texture (or part of it) that stretches or shrinks nicely
|
||||||
|
|
||||||
// Color/pixel related functions
|
// Color/pixel related functions
|
||||||
|
|
||||||
|
@(deprecated="Prefer col1 == col2")
|
||||||
|
ColorIsEqual :: proc(col1, col2: Color) --- // Check if two colors are equal
|
||||||
Fade :: proc(color: Color, alpha: f32) -> Color --- // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
Fade :: proc(color: Color, alpha: f32) -> Color --- // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||||
ColorToInt :: proc(color: Color) -> c.uint --- // Get hexadecimal value for a Color
|
ColorToInt :: proc(color: Color) -> c.uint --- // Get hexadecimal value for a Color (0xRRGGBBAA)
|
||||||
ColorNormalize :: proc(color: Color) -> Vector4 --- // Get Color normalized as float [0..1]
|
ColorNormalize :: proc(color: Color) -> Vector4 --- // Get Color normalized as float [0..1]
|
||||||
ColorFromNormalized :: proc(normalized: Vector4) -> Color --- // Get Color from normalized values [0..1]
|
ColorFromNormalized :: proc(normalized: Vector4) -> Color --- // Get Color from normalized values [0..1]
|
||||||
ColorToHSV :: proc(color: Color) -> Vector3 --- // Get HSV values for a Color, hue [0..360], saturation/value [0..1]
|
ColorToHSV :: proc(color: Color) -> Vector3 --- // Get HSV values for a Color, hue [0..360], saturation/value [0..1]
|
||||||
@@ -1374,6 +1402,7 @@ foreign lib {
|
|||||||
ColorContrast :: proc(color: Color, contrast: f32) -> Color --- // Get color with contrast correction, contrast values between -1.0f and 1.0f
|
ColorContrast :: proc(color: Color, contrast: f32) -> Color --- // Get color with contrast correction, contrast values between -1.0f and 1.0f
|
||||||
ColorAlpha :: proc(color: Color, alpha: f32) -> Color --- // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
ColorAlpha :: proc(color: Color, alpha: f32) -> Color --- // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||||
ColorAlphaBlend :: proc(dst, src, tint: Color) -> Color --- // Get src alpha-blended into dst color with tint
|
ColorAlphaBlend :: proc(dst, src, tint: Color) -> Color --- // Get src alpha-blended into dst color with tint
|
||||||
|
ColorLerp :: proc(color1, color2: Color, factor: f32) -> Color --- // Get color lerp interpolation between two colors, factor [0.0f..1.0f]
|
||||||
GetColor :: proc(hexValue: c.uint) -> Color --- // Get Color structure from hexadecimal value
|
GetColor :: proc(hexValue: c.uint) -> Color --- // Get Color structure from hexadecimal value
|
||||||
GetPixelColor :: proc(srcPtr: rawptr, format: PixelFormat) -> Color --- // Get Color from a source pixel pointer of certain format
|
GetPixelColor :: proc(srcPtr: rawptr, format: PixelFormat) -> Color --- // Get Color from a source pixel pointer of certain format
|
||||||
SetPixelColor :: proc(dstPtr: rawptr, color: Color, format: PixelFormat) --- // Set color formatted into destination pixel pointer
|
SetPixelColor :: proc(dstPtr: rawptr, color: Color, format: PixelFormat) --- // Set color formatted into destination pixel pointer
|
||||||
@@ -1390,12 +1419,12 @@ foreign lib {
|
|||||||
|
|
||||||
GetFontDefault :: proc() -> Font --- // Get the default Font
|
GetFontDefault :: proc() -> Font --- // Get the default Font
|
||||||
LoadFont :: proc(fileName: cstring) -> Font --- // Load font from file into GPU memory (VRAM)
|
LoadFont :: proc(fileName: cstring) -> Font --- // Load font from file into GPU memory (VRAM)
|
||||||
LoadFontEx :: proc(fileName: cstring, fontSize: c.int, codepoints: [^]rune, codepointCount: c.int) -> Font --- // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set
|
LoadFontEx :: proc(fileName: cstring, fontSize: c.int, codepoints: [^]rune, codepointCount: c.int) -> Font --- // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height
|
||||||
LoadFontFromImage :: proc(image: Image, key: Color, firstChar: rune) -> Font --- // Load font from Image (XNA style)
|
LoadFontFromImage :: proc(image: Image, key: Color, firstChar: rune) -> Font --- // Load font from Image (XNA style)
|
||||||
LoadFontFromMemory :: proc(fileType: cstring, fileData: rawptr, dataSize: c.int, fontSize: c.int, codepoints: [^]rune, codepointCount: c.int) -> Font --- // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
LoadFontFromMemory :: proc(fileType: cstring, fileData: rawptr, dataSize: c.int, fontSize: c.int, codepoints: [^]rune, codepointCount: c.int) -> Font --- // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
||||||
IsFontReady :: proc(font: Font) -> bool --- // Check if a font is ready
|
IsFontValid :: proc(font: Font) -> bool --- // Check if a font is valid (font data loaded, WARNING: GPU texture not checked)
|
||||||
LoadFontData :: proc(fileData: rawptr, dataSize: c.int, fontSize: c.int, codepoints: [^]rune, codepointCount: c.int, type: FontType) -> [^]GlyphInfo --- // Load font data for further use
|
LoadFontData :: proc(fileData: rawptr, dataSize: c.int, fontSize: c.int, codepoints: [^]rune, codepointCount: c.int, type: FontType) -> [^]GlyphInfo --- // Load font data for further use
|
||||||
GenImageFontAtlas :: proc(glyphs: [^]GlyphInfo, glyphRecs: ^[^]Rectangle, codepointCount: c.int, fontSize: c.int, padding: c.int, packMethod: c.int) -> Image --- // Generate image font atlas using chars info
|
GenImageFontAtlas :: proc(glyphs: [^]GlyphInfo, glyphRecs: ^[^]Rectangle, codepointCount: c.int, fontSize: c.int, padding: c.int, packMethod: c.int) -> Image --- // Generate image font atlas using chars info
|
||||||
UnloadFontData :: proc(glyphs: [^]GlyphInfo, glyphCount: c.int) --- // Unload font chars info data (RAM)
|
UnloadFontData :: proc(glyphs: [^]GlyphInfo, glyphCount: c.int) --- // Unload font chars info data (RAM)
|
||||||
UnloadFont :: proc(font: Font) --- // Unload font from GPU memory (VRAM)
|
UnloadFont :: proc(font: Font) --- // Unload font from GPU memory (VRAM)
|
||||||
ExportFontAsCode :: proc(font: Font, fileName: cstring) -> bool --- // Export font as code file, returns true on success
|
ExportFontAsCode :: proc(font: Font, fileName: cstring) -> bool --- // Export font as code file, returns true on success
|
||||||
@@ -1449,7 +1478,11 @@ foreign lib {
|
|||||||
TextToUpper :: proc(text: cstring) -> cstring --- // Get upper case version of provided string
|
TextToUpper :: proc(text: cstring) -> cstring --- // Get upper case version of provided string
|
||||||
TextToLower :: proc(text: cstring) -> cstring --- // Get lower case version of provided string
|
TextToLower :: proc(text: cstring) -> cstring --- // Get lower case version of provided string
|
||||||
TextToPascal :: proc(text: cstring) -> cstring --- // Get Pascal case notation version of provided string
|
TextToPascal :: proc(text: cstring) -> cstring --- // Get Pascal case notation version of provided string
|
||||||
|
TextToSnake :: proc(text: cstring) -> cstring --- // Get Snake case notation version of provided string
|
||||||
|
TextToCamel :: proc(text: cstring) -> cstring --- // Get Camel case notation version of provided string
|
||||||
|
|
||||||
TextToInteger :: proc(text: cstring) -> c.int --- // Get integer value from text (negative values not supported)
|
TextToInteger :: proc(text: cstring) -> c.int --- // Get integer value from text (negative values not supported)
|
||||||
|
TextToFloat :: proc(text: cstring) -> f32 --- // Get float value from text (negative values not supported)
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
@@ -1488,20 +1521,22 @@ foreign lib {
|
|||||||
|
|
||||||
LoadModel :: proc(fileName: cstring) -> Model --- // Load model from files (meshes and materials)
|
LoadModel :: proc(fileName: cstring) -> Model --- // Load model from files (meshes and materials)
|
||||||
LoadModelFromMesh :: proc(mesh: Mesh) -> Model --- // Load model from generated mesh (default material)
|
LoadModelFromMesh :: proc(mesh: Mesh) -> Model --- // Load model from generated mesh (default material)
|
||||||
IsModelReady :: proc(model: Model) -> bool --- // Check if a model is ready
|
IsModelValid :: proc(model: Model) -> bool --- // Check if a model is valid (loaded in GPU, VAO/VBOs)
|
||||||
UnloadModel :: proc(model: Model) --- // Unload model (including meshes) from memory (RAM and/or VRAM)
|
UnloadModel :: proc(model: Model) --- // Unload model (including meshes) from memory (RAM and/or VRAM)
|
||||||
GetModelBoundingBox :: proc(model: Model) -> BoundingBox --- // Compute model bounding box limits (considers all meshes)
|
GetModelBoundingBox :: proc(model: Model) -> BoundingBox --- // Compute model bounding box limits (considers all meshes)
|
||||||
|
|
||||||
// Model drawing functions
|
// Model drawing functions
|
||||||
|
|
||||||
DrawModel :: proc(model: Model, position: Vector3, scale: f32, tint: Color) --- // Draw a model (with texture if set)
|
DrawModel :: proc(model: Model, position: Vector3, scale: f32, tint: Color) --- // Draw a model (with texture if set)
|
||||||
DrawModelEx :: proc(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: f32, scale: Vector3, tint: Color) --- // Draw a model with extended parameters
|
DrawModelEx :: proc(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: f32, scale: Vector3, tint: Color) --- // Draw a model with extended parameters
|
||||||
DrawModelWires :: proc(model: Model, position: Vector3, scale: f32, tint: Color) --- // Draw a model wires (with texture if set)
|
DrawModelWires :: proc(model: Model, position: Vector3, scale: f32, tint: Color) --- // Draw a model wires (with texture if set)
|
||||||
DrawModelWiresEx :: proc(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: f32, scale: Vector3, tint: Color) --- // Draw a model wires (with texture if set) with extended parameters
|
DrawModelWiresEx :: proc(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: f32, scale: Vector3, tint: Color) --- // Draw a model wires (with texture if set) with extended parameters
|
||||||
DrawBoundingBox :: proc(box: BoundingBox, color: Color) --- // Draw bounding box (wires)
|
DrawModelPoints :: proc(model: Model, position: Vector3, scale: f32, tint: Color) --- // Draw a model as points
|
||||||
DrawBillboard :: proc(camera: Camera, texture: Texture2D, position: Vector3, size: f32, tint: Color) --- // Draw a billboard texture
|
DrawModelPointsEx :: proc(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: f32, scale: Vector3, tint: Color) --- // Draw a model as points with extended parameters
|
||||||
DrawBillboardRec :: proc(camera: Camera, texture: Texture2D, source: Rectangle, position: Vector3, size: Vector2, tint: Color) --- // Draw a billboard texture defined by source
|
DrawBoundingBox :: proc(box: BoundingBox, color: Color) --- // Draw bounding box (wires)
|
||||||
DrawBillboardPro :: proc(camera: Camera, texture: Texture2D, source: Rectangle, position: Vector3, up: Vector3, size: Vector2, origin: Vector2, rotation: f32, tint: Color) --- // Draw a billboard texture defined by source and rotation
|
DrawBillboard :: proc(camera: Camera, texture: Texture2D, position: Vector3, scale: f32, tint: Color) --- // Draw a billboard texture
|
||||||
|
DrawBillboardRec :: proc(camera: Camera, texture: Texture2D, source: Rectangle, position: Vector3, size: Vector2, tint: Color) --- // Draw a billboard texture defined by source
|
||||||
|
DrawBillboardPro :: proc(camera: Camera, texture: Texture2D, source: Rectangle, position: Vector3, up: Vector3, size: Vector2, origin: Vector2, rotation: f32, tint: Color) --- // Draw a billboard texture defined by source and rotation
|
||||||
|
|
||||||
// Mesh management functions
|
// Mesh management functions
|
||||||
|
|
||||||
@@ -1510,9 +1545,10 @@ foreign lib {
|
|||||||
UnloadMesh :: proc(mesh: Mesh) --- // Unload mesh data from CPU and GPU
|
UnloadMesh :: proc(mesh: Mesh) --- // Unload mesh data from CPU and GPU
|
||||||
DrawMesh :: proc(mesh: Mesh, material: Material, transform: Matrix) --- // Draw a 3d mesh with material and transform
|
DrawMesh :: proc(mesh: Mesh, material: Material, transform: Matrix) --- // Draw a 3d mesh with material and transform
|
||||||
DrawMeshInstanced :: proc(mesh: Mesh, material: Material, transforms: [^]Matrix, instances: c.int) --- // Draw multiple mesh instances with material and different transforms
|
DrawMeshInstanced :: proc(mesh: Mesh, material: Material, transforms: [^]Matrix, instances: c.int) --- // Draw multiple mesh instances with material and different transforms
|
||||||
ExportMesh :: proc(mesh: Mesh, fileName: cstring) -> bool --- // Export mesh data to file, returns true on success
|
|
||||||
GetMeshBoundingBox :: proc(mesh: Mesh) -> BoundingBox --- // Compute mesh bounding box limits
|
GetMeshBoundingBox :: proc(mesh: Mesh) -> BoundingBox --- // Compute mesh bounding box limits
|
||||||
GenMeshTangents :: proc(mesh: ^Mesh) --- // Compute mesh tangents
|
GenMeshTangents :: proc(mesh: ^Mesh) --- // Compute mesh tangents
|
||||||
|
ExportMesh :: proc(mesh: Mesh, fileName: cstring) -> bool --- // Export mesh data to file, returns true on success
|
||||||
|
ExportMeshAsCode :: proc(mesh: Mesh, fileName: cstring) -> bool --- // Export mesh as code file (.h) defining multiple arrays of vertex attributes
|
||||||
|
|
||||||
// Mesh generation functions
|
// Mesh generation functions
|
||||||
|
|
||||||
@@ -1532,18 +1568,19 @@ foreign lib {
|
|||||||
|
|
||||||
LoadMaterials :: proc(fileName: cstring, materialCount: ^c.int) -> [^]Material --- // Load materials from model file
|
LoadMaterials :: proc(fileName: cstring, materialCount: ^c.int) -> [^]Material --- // Load materials from model file
|
||||||
LoadMaterialDefault :: proc() -> Material --- // Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
|
LoadMaterialDefault :: proc() -> Material --- // Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
|
||||||
IsMaterialReady :: proc(material: Material) -> bool --- // Check if a material is ready
|
IsMaterialValid :: proc(material: Material) -> bool --- // Check if a material is valid (shader assigned, map textures loaded in GPU)
|
||||||
UnloadMaterial :: proc(material: Material) --- // Unload material from GPU memory (VRAM)
|
UnloadMaterial :: proc(material: Material) --- // Unload material from GPU memory (VRAM)
|
||||||
SetMaterialTexture :: proc(material: ^Material, mapType: MaterialMapIndex, texture: Texture2D) --- // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
|
SetMaterialTexture :: proc(material: ^Material, mapType: MaterialMapIndex, texture: Texture2D) --- // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
|
||||||
SetModelMeshMaterial :: proc(model: ^Model, meshId: c.int, materialId: c.int) --- // Set material for a mesh
|
SetModelMeshMaterial :: proc(model: ^Model, meshId: c.int, materialId: c.int) --- // Set material for a mesh
|
||||||
|
|
||||||
// Model animations loading/unloading functions
|
// Model animations loading/unloading functions
|
||||||
|
|
||||||
LoadModelAnimations :: proc(fileName: cstring, animCount: ^c.int) -> [^]ModelAnimation --- // Load model animations from file
|
LoadModelAnimations :: proc(fileName: cstring, animCount: ^c.int) -> [^]ModelAnimation --- // Load model animations from file
|
||||||
UpdateModelAnimation :: proc(model: Model, anim: ModelAnimation, frame: c.int) --- // Update model animation pose
|
UpdateModelAnimation :: proc(model: Model, anim: ModelAnimation, frame: c.int) --- // Update model animation pose (CPU)
|
||||||
UnloadModelAnimation :: proc(anim: ModelAnimation) --- // Unload animation data
|
UpdateModelAnimationBones :: proc(model: Model, anim: ModelAnimation, frame: c.int) --- // Update model animation mesh bone matrices (GPU skinning)
|
||||||
UnloadModelAnimations :: proc(animations: [^]ModelAnimation, animCount: c.int) --- // Unload animation array data
|
UnloadModelAnimation :: proc(anim: ModelAnimation) --- // Unload animation data
|
||||||
IsModelAnimationValid :: proc(model: Model, anim: ModelAnimation) -> bool --- // Check model animation skeleton match
|
UnloadModelAnimations :: proc(animations: [^]ModelAnimation, animCount: c.int) --- // Unload animation array data
|
||||||
|
IsModelAnimationValid :: proc(model: Model, anim: ModelAnimation) -> bool --- // Check model animation skeleton match
|
||||||
|
|
||||||
// Collision detection functions
|
// Collision detection functions
|
||||||
|
|
||||||
@@ -1572,11 +1609,11 @@ foreign lib {
|
|||||||
|
|
||||||
LoadWave :: proc(fileName: cstring) -> Wave --- // Load wave data from file
|
LoadWave :: proc(fileName: cstring) -> Wave --- // Load wave data from file
|
||||||
LoadWaveFromMemory :: proc(fileType: cstring, fileData: rawptr, dataSize: c.int) -> Wave --- // Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
|
LoadWaveFromMemory :: proc(fileType: cstring, fileData: rawptr, dataSize: c.int) -> Wave --- // Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
|
||||||
IsWaveReady :: proc(wave: Wave) -> bool --- // Checks if wave data is ready
|
IsWaveValid :: proc(wave: Wave) -> bool --- // Checks if wave data is // Checks if wave data is valid (data loaded and parameters)
|
||||||
LoadSound :: proc(fileName: cstring) -> Sound --- // Load sound from file
|
LoadSound :: proc(fileName: cstring) -> Sound --- // Load sound from file
|
||||||
LoadSoundFromWave :: proc(wave: Wave) -> Sound --- // Load sound from wave data
|
LoadSoundFromWave :: proc(wave: Wave) -> Sound --- // Load sound from wave data
|
||||||
LoadSoundAlias :: proc(source: Sound) -> Sound --- // Create a new sound that shares the same sample data as the source sound, does not own the sound data
|
LoadSoundAlias :: proc(source: Sound) -> Sound --- // Create a new sound that shares the same sample data as the source sound, does not own the sound data
|
||||||
IsSoundReady :: proc(sound: Sound) -> bool --- // Checks if a sound is ready
|
IsSoundValid :: proc(sound: Sound) -> bool --- // Checks if a sound is valid (data loaded and buffers initialized)
|
||||||
UpdateSound :: proc(sound: Sound, data: rawptr, frameCount: c.int) --- // Update sound buffer with new data
|
UpdateSound :: proc(sound: Sound, data: rawptr, frameCount: c.int) --- // Update sound buffer with new data
|
||||||
UnloadWave :: proc(wave: Wave) --- // Unload wave data
|
UnloadWave :: proc(wave: Wave) --- // Unload wave data
|
||||||
UnloadSound :: proc(sound: Sound) --- // Unload sound
|
UnloadSound :: proc(sound: Sound) --- // Unload sound
|
||||||
@@ -1595,7 +1632,7 @@ foreign lib {
|
|||||||
SetSoundPitch :: proc(sound: Sound, pitch: f32) --- // Set pitch for a sound (1.0 is base level)
|
SetSoundPitch :: proc(sound: Sound, pitch: f32) --- // Set pitch for a sound (1.0 is base level)
|
||||||
SetSoundPan :: proc(sound: Sound, pan: f32) --- // Set pan for a sound (0.5 is center)
|
SetSoundPan :: proc(sound: Sound, pan: f32) --- // Set pan for a sound (0.5 is center)
|
||||||
WaveCopy :: proc(wave: Wave) -> Wave --- // Copy a wave to a new wave
|
WaveCopy :: proc(wave: Wave) -> Wave --- // Copy a wave to a new wave
|
||||||
WaveCrop :: proc(wave: ^Wave, initSample, finalSample: c.int) --- // Crop a wave to defined samples range
|
WaveCrop :: proc(wave: ^Wave, initFrame, finalFrame: c.int) --- // Crop a wave to defined samples range
|
||||||
WaveFormat :: proc(wave: ^Wave, sampleRate, sampleSize: c.int, channels: c.int) --- // Convert wave data to desired format
|
WaveFormat :: proc(wave: ^Wave, sampleRate, sampleSize: c.int, channels: c.int) --- // Convert wave data to desired format
|
||||||
LoadWaveSamples :: proc(wave: Wave) -> [^]f32 --- // Load samples data from wave as a 32bit float data array
|
LoadWaveSamples :: proc(wave: Wave) -> [^]f32 --- // Load samples data from wave as a 32bit float data array
|
||||||
UnloadWaveSamples :: proc(samples: [^]f32) --- // Unload samples data loaded with LoadWaveSamples()
|
UnloadWaveSamples :: proc(samples: [^]f32) --- // Unload samples data loaded with LoadWaveSamples()
|
||||||
@@ -1605,7 +1642,7 @@ foreign lib {
|
|||||||
|
|
||||||
LoadMusicStream :: proc(fileName: cstring) -> Music --- // Load music stream from file
|
LoadMusicStream :: proc(fileName: cstring) -> Music --- // Load music stream from file
|
||||||
LoadMusicStreamFromMemory :: proc(fileType: cstring, data: rawptr, dataSize: c.int) -> Music --- // Load music stream from data
|
LoadMusicStreamFromMemory :: proc(fileType: cstring, data: rawptr, dataSize: c.int) -> Music --- // Load music stream from data
|
||||||
IsMusicReady :: proc(music: Music) -> bool --- // Checks if a music stream is ready
|
IsMusicValid :: proc(music: Music) -> bool --- // Checks if a music stream is valid (context and buffers initialized)
|
||||||
UnloadMusicStream :: proc(music: Music) --- // Unload music stream
|
UnloadMusicStream :: proc(music: Music) --- // Unload music stream
|
||||||
PlayMusicStream :: proc(music: Music) --- // Start music playing
|
PlayMusicStream :: proc(music: Music) --- // Start music playing
|
||||||
IsMusicStreamPlaying :: proc(music: Music) -> bool --- // Check if music is playing
|
IsMusicStreamPlaying :: proc(music: Music) -> bool --- // Check if music is playing
|
||||||
@@ -1623,7 +1660,7 @@ foreign lib {
|
|||||||
// AudioStream management functions
|
// AudioStream management functions
|
||||||
|
|
||||||
LoadAudioStream :: proc(sampleRate, sampleSize: c.uint, channels: c.uint) -> AudioStream --- // Load audio stream (to stream raw audio pcm data)
|
LoadAudioStream :: proc(sampleRate, sampleSize: c.uint, channels: c.uint) -> AudioStream --- // Load audio stream (to stream raw audio pcm data)
|
||||||
IsAudioStreamReady :: proc(stream: AudioStream) -> bool --- // Checks if an audio stream is ready
|
IsAudioStreamValid :: proc(stream: AudioStream) -> bool --- // Checks if an audio stream is valid (buffers initialized)
|
||||||
UnloadAudioStream :: proc(stream: AudioStream) --- // Unload audio stream and free memory
|
UnloadAudioStream :: proc(stream: AudioStream) --- // Unload audio stream and free memory
|
||||||
UpdateAudioStream :: proc(stream: AudioStream, data: rawptr, frameCount: c.int) --- // Update audio stream buffers with data
|
UpdateAudioStream :: proc(stream: AudioStream, data: rawptr, frameCount: c.int) --- // Update audio stream buffers with data
|
||||||
IsAudioStreamProcessed :: proc(stream: AudioStream) -> bool --- // Check if any audio stream buffers requires refill
|
IsAudioStreamProcessed :: proc(stream: AudioStream) -> bool --- // Check if any audio stream buffers requires refill
|
||||||
@@ -1638,22 +1675,13 @@ foreign lib {
|
|||||||
SetAudioStreamBufferSizeDefault :: proc(size: c.int) --- // Default size for new audio streams
|
SetAudioStreamBufferSizeDefault :: proc(size: c.int) --- // Default size for new audio streams
|
||||||
SetAudioStreamCallback :: proc(stream: AudioStream, callback: AudioCallback) --- // Audio thread callback to request new data
|
SetAudioStreamCallback :: proc(stream: AudioStream, callback: AudioCallback) --- // Audio thread callback to request new data
|
||||||
|
|
||||||
AttachAudioStreamProcessor :: proc(stream: AudioStream, processor: AudioCallback) --- // Attach audio stream processor to stream, receives the samples as <float>s
|
AttachAudioStreamProcessor :: proc(stream: AudioStream, processor: AudioCallback) --- // Attach audio stream processor to stream, receives the samples as 'float'
|
||||||
DetachAudioStreamProcessor :: proc(stream: AudioStream, processor: AudioCallback) --- // Detach audio stream processor from stream
|
DetachAudioStreamProcessor :: proc(stream: AudioStream, processor: AudioCallback) --- // Detach audio stream processor from stream
|
||||||
|
|
||||||
AttachAudioMixedProcessor :: proc(processor: AudioCallback) --- // Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s
|
AttachAudioMixedProcessor :: proc(processor: AudioCallback) --- // Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'
|
||||||
DetachAudioMixedProcessor :: proc(processor: AudioCallback) --- // Detach audio stream processor from the entire audio pipeline
|
DetachAudioMixedProcessor :: proc(processor: AudioCallback) --- // Detach audio stream processor from the entire audio pipeline
|
||||||
}
|
}
|
||||||
|
|
||||||
// Workaround for broken IsMouseButtonUp in Raylib 5.0.
|
|
||||||
when VERSION == "5.0" {
|
|
||||||
IsMouseButtonUp :: proc "c" (button: MouseButton) -> bool {
|
|
||||||
return !IsMouseButtonDown(button)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
#panic("Remove this this when block and everything inside it for Raylib > 5.0. It's just here to fix a bug in Raylib 5.0. See IsMouseButtonUp inside 'foreign lib {' block.")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if a gesture have been detected
|
// Check if a gesture have been detected
|
||||||
IsGestureDetected :: proc "c" (gesture: Gesture) -> bool {
|
IsGestureDetected :: proc "c" (gesture: Gesture) -> bool {
|
||||||
@(default_calling_convention="c")
|
@(default_calling_convention="c")
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user