Match bool c style
This commit is contained in:
@@ -15,10 +15,10 @@ Vector4 :: struct
|
||||
w: F32
|
||||
|
||||
Color :: struct
|
||||
r: U8 // @todo: Add C types
|
||||
g: U8
|
||||
b: U8
|
||||
a: U8
|
||||
r: uchar // @todo: Add C types
|
||||
g: uchar
|
||||
b: uchar
|
||||
a: uchar
|
||||
|
||||
Rectangle :: struct
|
||||
x: F32
|
||||
@@ -198,16 +198,16 @@ MOUSE_BUTTON_BACK :: 6 // Mouse button back (advanced mouse device)
|
||||
|
||||
|
||||
InitWindow :: #foreign (width: int, height: int, title: *char) // Initialize window and OpenGL context
|
||||
WindowShouldClose :: #foreign (): Bool // Check if KEY_ESCAPE pressed or Close icon pressed
|
||||
WindowShouldClose :: #foreign (): bool // Check if KEY_ESCAPE pressed or Close icon pressed
|
||||
CloseWindow :: #foreign () // Close window and unload OpenGL context
|
||||
IsWindowReady :: #foreign (): Bool // Check if window has been initialized successfully
|
||||
IsWindowFullscreen :: #foreign (): Bool // Check if window is currently fullscreen
|
||||
IsWindowHidden :: #foreign (): Bool // Check if window is currently hidden (only PLATFORM_DESKTOP)
|
||||
IsWindowMinimized :: #foreign (): Bool // Check if window is currently minimized (only PLATFORM_DESKTOP)
|
||||
IsWindowMaximized :: #foreign (): Bool // Check if window is currently maximized (only PLATFORM_DESKTOP)
|
||||
IsWindowFocused :: #foreign (): Bool // Check if window is currently focused (only PLATFORM_DESKTOP)
|
||||
IsWindowResized :: #foreign (): Bool // Check if window has been resized last frame
|
||||
IsWindowState :: #foreign (flag: ConfigFlag): Bool // Check if one specific window flag is enabled
|
||||
IsWindowReady :: #foreign (): bool // Check if window has been initialized successfully
|
||||
IsWindowFullscreen :: #foreign (): bool // Check if window is currently fullscreen
|
||||
IsWindowHidden :: #foreign (): bool // Check if window is currently hidden (only PLATFORM_DESKTOP)
|
||||
IsWindowMinimized :: #foreign (): bool // Check if window is currently minimized (only PLATFORM_DESKTOP)
|
||||
IsWindowMaximized :: #foreign (): bool // Check if window is currently maximized (only PLATFORM_DESKTOP)
|
||||
IsWindowFocused :: #foreign (): bool // Check if window is currently focused (only PLATFORM_DESKTOP)
|
||||
IsWindowResized :: #foreign (): bool // Check if window has been resized last frame
|
||||
IsWindowState :: #foreign (flag: ConfigFlag): bool // Check if one specific window flag is enabled
|
||||
SetWindowState :: #foreign (flags: ConfigFlags) // Set window configuration state using flags (only PLATFORM_DESKTOP)
|
||||
ClearWindowState :: #foreign (flags: ConfigFlags) // Clear window configuration state flags
|
||||
ToggleFullscreen :: #foreign () // Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
|
||||
@@ -258,10 +258,10 @@ WaitTime :: #foreign (seconds: F64) // Wait for some time (halt program
|
||||
|
||||
ShowCursor :: #foreign () // Shows cursor
|
||||
HideCursor :: #foreign () // Hides cursor
|
||||
IsCursorHidden :: #foreign (): Bool // Check if cursor is not visible
|
||||
IsCursorHidden :: #foreign (): bool // Check if cursor is not visible
|
||||
EnableCursor :: #foreign () // Enables cursor (unlock cursor)
|
||||
DisableCursor :: #foreign () // Disables cursor (lock cursor)
|
||||
IsCursorOnScreen :: #foreign (): Bool // Check if cursor is on the current screen.
|
||||
IsCursorOnScreen :: #foreign (): bool // Check if cursor is on the current screen.
|
||||
|
||||
// Drawing-related functions
|
||||
|
||||
@@ -293,7 +293,7 @@ EndVrStereoMode :: #foreign () // End stereo renderi
|
||||
|
||||
// LoadShader :: #foreign (vsFileName: *char, fsFileName: *char): Shader // Load shader from files and bind default locations
|
||||
// LoadShaderFromMemory :: #foreign (vsCode, fsCode: *char): Shader // Load shader from code strings and bind default locations
|
||||
// IsShaderReady :: #foreign (shader: Shader): Bool // Check if a shader is ready
|
||||
// IsShaderReady :: #foreign (shader: Shader): bool // Check if a shader is ready
|
||||
// GetShaderLocation :: #foreign (shader: Shader, uniformName: *char): int // Get shader uniform location
|
||||
// GetShaderLocationAttrib :: #foreign (shader: Shader, attribName: *char): int // Get shader attribute location
|
||||
// SetShaderValue :: #foreign (shader: Shader, locIndex: ShaderLocationIndex, value: *void, uniformType: ShaderUniformDataType) // Set shader uniform value
|
||||
@@ -347,14 +347,14 @@ SetSaveFileTextCallback :: #foreign (callback: SaveFileTextCallback) // Set cust
|
||||
|
||||
LoadFileData :: #foreign (fileName: *char, bytesRead: *uint): *uchar // Load file data as byte array (read)
|
||||
UnloadFileData :: #foreign (data: *uchar) // Unload file data allocated by LoadFileData()
|
||||
SaveFileData :: #foreign (fileName: *char, data: *void, bytesToWrite: uint): Bool // Save data to file from byte array (write), returns true on success
|
||||
ExportDataAsCode :: #foreign (data: *void, size: uint, fileName: *char): Bool // Export data to code (.h), returns true on success
|
||||
SaveFileData :: #foreign (fileName: *char, data: *void, bytesToWrite: uint): bool // Save data to file from byte array (write), returns true on success
|
||||
ExportDataAsCode :: #foreign (data: *void, size: uint, fileName: *char): bool // Export data to code (.h), returns true on success
|
||||
LoadFileText :: #foreign (fileName: *char): *uchar // Load text data from file (read), returns a '\0' terminated string
|
||||
UnloadFileText :: #foreign (text: *uchar) // Unload file text data allocated by LoadFileText()
|
||||
SaveFileText :: #foreign (fileName: *char, text: *uchar): Bool // Save text data to file (write), string must be '\0' terminated, returns true on success
|
||||
FileExists :: #foreign (fileName: *char): Bool // Check if file exists
|
||||
DirectoryExists :: #foreign (dirPath: *char): Bool // Check if a directory path exists
|
||||
IsFileExtension :: #foreign (fileName: *char, ext: *char): Bool // Check file extension (including point: .png, .wav)
|
||||
SaveFileText :: #foreign (fileName: *char, text: *uchar): bool // Save text data to file (write), string must be '\0' terminated, returns true on success
|
||||
FileExists :: #foreign (fileName: *char): bool // Check if file exists
|
||||
DirectoryExists :: #foreign (dirPath: *char): bool // Check if a directory path exists
|
||||
IsFileExtension :: #foreign (fileName: *char, ext: *char): bool // Check file extension (including point: .png, .wav)
|
||||
GetFileLength :: #foreign (fileName: *char): int // Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
|
||||
GetFileExtension :: #foreign (fileName: *char): *char // Get pointer to extension for a filename string (includes dot: '.png')
|
||||
GetFileName :: #foreign (filePath: *char): *char // Get pointer to filename for a path string
|
||||
@@ -363,12 +363,12 @@ GetDirectoryPath :: #foreign (filePath: *char): *char
|
||||
GetPrevDirectoryPath :: #foreign (dirPath: *char): *char // Get previous directory path for a given path (uses static string)
|
||||
GetWorkingDirectory :: #foreign (): *char // Get current working directory (uses static string)
|
||||
GetApplicationDirectory :: #foreign (): *char // Get the directory if the running application (uses static string)
|
||||
ChangeDirectory :: #foreign (dir: *char): Bool // Change working directory, return true on success
|
||||
IsPathFile :: #foreign (path: *char): Bool // Check if a given path is a file or a directory
|
||||
ChangeDirectory :: #foreign (dir: *char): bool // Change working directory, return true on success
|
||||
IsPathFile :: #foreign (path: *char): bool // Check if a given path is a file or a directory
|
||||
LoadDirectoryFiles :: #foreign (dirPath: *char): FilePathList // Load directory filepaths
|
||||
LoadDirectoryFilesEx :: #foreign (basePath: *char, filter: *char, scanSubdirs: Bool): FilePathList // Load directory filepaths with extension filtering and recursive directory scan
|
||||
LoadDirectoryFilesEx :: #foreign (basePath: *char, filter: *char, scanSubdirs: bool): FilePathList // Load directory filepaths with extension filtering and recursive directory scan
|
||||
UnloadDirectoryFiles :: #foreign (files: FilePathList) // Unload filepaths
|
||||
IsFileDropped :: #foreign (): Bool // Check if a file has been dropped into window
|
||||
IsFileDropped :: #foreign (): bool // Check if a file has been dropped into window
|
||||
LoadDroppedFiles :: #foreign (): FilePathList // Load dropped filepaths
|
||||
UnloadDroppedFiles :: #foreign (files: FilePathList) // Unload dropped filepaths
|
||||
GetFileModTime :: #foreign (fileName: *char): long // Get file modification time (last write time)
|
||||
@@ -386,22 +386,22 @@ DecodeDataBase64 :: #foreign (data: *void, outputSize: *int): *uchar
|
||||
|
||||
// Input-related functions: keyboard
|
||||
|
||||
IsKeyPressed :: #foreign (key: int): Bool // Detect if a key has been pressed once
|
||||
IsKeyDown :: #foreign (key: int): Bool // Detect if a key is being pressed
|
||||
IsKeyReleased :: #foreign (key: int): Bool // Detect if a key has been released once
|
||||
IsKeyUp :: #foreign (key: int): Bool // Detect if a key is NOT being pressed
|
||||
IsKeyPressed :: #foreign (key: int): bool // Detect if a key has been pressed once
|
||||
IsKeyDown :: #foreign (key: int): bool // Detect if a key is being pressed
|
||||
IsKeyReleased :: #foreign (key: int): bool // Detect if a key has been released once
|
||||
IsKeyUp :: #foreign (key: int): bool // Detect if a key is NOT being pressed
|
||||
SetExitKey :: #foreign (key: int) // Set a custom key to exit program (default is ESC)
|
||||
GetKeyPressed :: #foreign (): int // Get key pressed (keycode), call it multiple times for keys queued
|
||||
GetCharPressed :: #foreign (): rune // Get char pressed (unicode), call it multiple times for chars queued
|
||||
|
||||
// Input-related functions: gamepads
|
||||
|
||||
IsGamepadAvailable :: #foreign (gamepad: int): Bool // Check if a gamepad is available
|
||||
IsGamepadAvailable :: #foreign (gamepad: int): bool // Check if a gamepad is available
|
||||
GetGamepadName :: #foreign (gamepad: int): *char // Get gamepad internal name id
|
||||
IsGamepadButtonPressed :: #foreign (gamepad: int, button: GamepadButton): Bool // Check if a gamepad button has been pressed once
|
||||
IsGamepadButtonDown :: #foreign (gamepad: int, button: GamepadButton): Bool // Check if a gamepad button is being pressed
|
||||
IsGamepadButtonReleased :: #foreign (gamepad: int, button: GamepadButton): Bool // Check if a gamepad button has been released once
|
||||
IsGamepadButtonUp :: #foreign (gamepad: int, button: GamepadButton): Bool // Check if a gamepad button is NOT being pressed
|
||||
IsGamepadButtonPressed :: #foreign (gamepad: int, button: GamepadButton): bool // Check if a gamepad button has been pressed once
|
||||
IsGamepadButtonDown :: #foreign (gamepad: int, button: GamepadButton): bool // Check if a gamepad button is being pressed
|
||||
IsGamepadButtonReleased :: #foreign (gamepad: int, button: GamepadButton): bool // Check if a gamepad button has been released once
|
||||
IsGamepadButtonUp :: #foreign (gamepad: int, button: GamepadButton): bool // Check if a gamepad button is NOT being pressed
|
||||
GetGamepadButtonPressed :: #foreign (): GamepadButton // Get the last gamepad button pressed
|
||||
GetGamepadAxisCount :: #foreign (gamepad: int): int // Get gamepad axis count for a gamepad
|
||||
GetGamepadAxisMovement :: #foreign (gamepad: int, axis: GamepadAxis): F32 // Get axis movement value for a gamepad axis
|
||||
@@ -409,10 +409,10 @@ SetGamepadMappings :: #foreign (mappings: *char): int /
|
||||
|
||||
// Input-related functions: mouse
|
||||
|
||||
IsMouseButtonPressed :: #foreign (button: MouseButton): Bool // Detect if a mouse button has been pressed once
|
||||
IsMouseButtonDown :: #foreign (button: MouseButton): Bool // Detect if a mouse button is being pressed
|
||||
IsMouseButtonReleased :: #foreign (button: MouseButton): Bool // Detect if a mouse button has been released once
|
||||
IsMouseButtonUp :: #foreign (button: MouseButton): Bool // Detect if a mouse button is NOT being pressed
|
||||
IsMouseButtonPressed :: #foreign (button: MouseButton): bool // Detect if a mouse button has been pressed once
|
||||
IsMouseButtonDown :: #foreign (button: MouseButton): bool // Detect if a mouse button is being pressed
|
||||
IsMouseButtonReleased :: #foreign (button: MouseButton): bool // Detect if a mouse button has been released once
|
||||
IsMouseButtonUp :: #foreign (button: MouseButton): bool // Detect if a mouse button is NOT being pressed
|
||||
GetMouseX :: #foreign (): int // Returns mouse position X
|
||||
GetMouseY :: #foreign (): int // Returns mouse position Y
|
||||
GetMousePosition :: #foreign (): Vector2 // Returns mouse position XY
|
||||
@@ -437,7 +437,7 @@ GetTouchPointCount :: #foreign (): int // Get number of touch poin
|
||||
//------------------------------------------------------------------------------------
|
||||
|
||||
SetGesturesEnabled :: #foreign (flags: Gestures) // Enable a set of gestures using flags
|
||||
IsGestureDetected :: #foreign (gesture: Gesture): Bool // Check if a gesture have been detected
|
||||
IsGestureDetected :: #foreign (gesture: Gesture): bool // Check if a gesture have been detected
|
||||
GetGestureDetected :: #foreign (): Gesture // Get latest detected gesture
|
||||
GetGestureHoldDuration :: #foreign (): F32 // Get gesture hold time in milliseconds
|
||||
GetGestureDragVector :: #foreign (): Vector2 // Get gesture drag vector
|
||||
@@ -502,15 +502,15 @@ DrawPolyLines :: #foreign (center: Vector2, sides: int, radius: F32,
|
||||
DrawPolyLinesEx :: #foreign (center: Vector2, sides: int, radius: F32, rotation: F32, lineThick: F32, color: Color) // Draw a polygon outline of n sides with extended parameters
|
||||
|
||||
// Basic shapes collision detection functions
|
||||
CheckCollisionRecs :: #foreign (rec1: Rectangle, rec2: Rectangle): Bool // Check collision between two rectangles
|
||||
CheckCollisionCircles :: #foreign (center1: Vector2, radius1: F32, center2: Vector2, radius2: F32): Bool // Check collision between two circles
|
||||
CheckCollisionCircleRec :: #foreign (center: Vector2, radius: F32, rec: Rectangle): Bool // Check collision between circle and rectangle
|
||||
CheckCollisionPointRec :: #foreign (point: Vector2, rec: Rectangle): Bool // Check if point is inside rectangle
|
||||
CheckCollisionPointCircle :: #foreign (point: Vector2, center: Vector2, radius: F32): Bool // Check if point is inside circle
|
||||
CheckCollisionPointTriangle :: #foreign (point: Vector2, p1: Vector2, p2: Vector2, p3: Vector2): Bool // Check if point is inside a triangle
|
||||
CheckCollisionPointPoly :: #foreign (point: Vector2, points: *Vector2, pointCount: int): Bool // Check if point is within a polygon described by array of vertices
|
||||
CheckCollisionLines :: #foreign (startPos1: Vector2, endPos1: Vector2, startPos2: Vector2, endPos2: Vector2, collisionPoint: *Vector2): Bool // Check the collision between two lines defined by two points each, returns collision point by reference
|
||||
CheckCollisionPointLine :: #foreign (point: Vector2, p1: Vector2, p2: Vector2, threshold: int): Bool // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
|
||||
CheckCollisionRecs :: #foreign (rec1: Rectangle, rec2: Rectangle): bool // Check collision between two rectangles
|
||||
CheckCollisionCircles :: #foreign (center1: Vector2, radius1: F32, center2: Vector2, radius2: F32): bool // Check collision between two circles
|
||||
CheckCollisionCircleRec :: #foreign (center: Vector2, radius: F32, rec: Rectangle): bool // Check collision between circle and rectangle
|
||||
CheckCollisionPointRec :: #foreign (point: Vector2, rec: Rectangle): bool // Check if point is inside rectangle
|
||||
CheckCollisionPointCircle :: #foreign (point: Vector2, center: Vector2, radius: F32): bool // Check if point is inside circle
|
||||
CheckCollisionPointTriangle :: #foreign (point: Vector2, p1: Vector2, p2: Vector2, p3: Vector2): bool // Check if point is inside a triangle
|
||||
CheckCollisionPointPoly :: #foreign (point: Vector2, points: *Vector2, pointCount: int): bool // Check if point is within a polygon described by array of vertices
|
||||
CheckCollisionLines :: #foreign (startPos1: Vector2, endPos1: Vector2, startPos2: Vector2, endPos2: Vector2, collisionPoint: *Vector2): bool // Check the collision between two lines defined by two points each, returns collision point by reference
|
||||
CheckCollisionPointLine :: #foreign (point: Vector2, p1: Vector2, p2: Vector2, threshold: int): bool // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
|
||||
GetCollisionRec :: #foreign (rec1: Rectangle, rec2: Rectangle): Rectangle // Get collision rectangle for two rectangles collision
|
||||
|
||||
|
||||
@@ -524,10 +524,10 @@ LoadImageAnim :: #foreign (fileName: *char, frames: *int): Image
|
||||
LoadImageFromMemory :: #foreign (fileType: *char, fileData: *void, dataSize: int): Image // Load image from memory buffer, fileType refers to extension: i.e. '.png'
|
||||
LoadImageFromTexture :: #foreign (texture: Texture2D): Image // Load image from GPU texture data
|
||||
LoadImageFromScreen :: #foreign (): Image // Load image from screen buffer and (screenshot)
|
||||
IsImageReady :: #foreign (image: Image): Bool // Check if an image is ready
|
||||
IsImageReady :: #foreign (image: Image): bool // Check if an image is ready
|
||||
UnloadImage :: #foreign (image: Image) // Unload image from CPU memory (RAM)
|
||||
ExportImage :: #foreign (image: Image, fileName: *char): Bool // Export image data to file, returns true on success
|
||||
ExportImageAsCode :: #foreign (image: Image, fileName: *char): Bool // Export image as code file defining an array of bytes, returns true on success
|
||||
ExportImage :: #foreign (image: Image, fileName: *char): bool // Export image data to file, returns true on success
|
||||
ExportImageAsCode :: #foreign (image: Image, fileName: *char): bool // Export image as code file defining an array of bytes, returns true on success
|
||||
|
||||
// Image generation functions
|
||||
|
||||
@@ -603,9 +603,9 @@ LoadTexture :: #foreign (fileName: *char): Texture2D
|
||||
LoadTextureFromImage :: #foreign (image: Image): Texture2D // Load texture from image data
|
||||
LoadTextureCubemap :: #foreign (image: Image, layout: CubemapLayout): TextureCubemap // Load cubemap from image, multiple image cubemap layouts supported
|
||||
LoadRenderTexture :: #foreign (width: int, height: int): RenderTexture2D // Load texture for rendering (framebuffer)
|
||||
IsTextureReady :: #foreign (texture: Texture2D): Bool // Check if a texture is ready
|
||||
IsTextureReady :: #foreign (texture: Texture2D): bool // Check if a texture is ready
|
||||
UnloadTexture :: #foreign (texture: Texture2D) // Unload texture from GPU memory (VRAM)
|
||||
IsRenderTextureReady :: #foreign (target: RenderTexture2D): Bool // Check if a render texture is ready
|
||||
IsRenderTextureReady :: #foreign (target: RenderTexture2D): bool // Check if a render texture is ready
|
||||
UnloadRenderTexture :: #foreign (target: RenderTexture2D) // Unload render texture from GPU memory (VRAM)
|
||||
UpdateTexture :: #foreign (texture: Texture2D, pixels: *void) // Update GPU texture with new data
|
||||
UpdateTextureRec :: #foreign (texture: Texture2D, rec: Rectangle, pixels: *void) // Update GPU texture rectangle with new data
|
||||
@@ -656,12 +656,12 @@ LoadFont :: #foreign (fileName: *char): Font
|
||||
LoadFontEx :: #foreign (fileName: *char, fontSize: int, fontChars: *rune, glyphCount: int): Font // Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set
|
||||
LoadFontFromImage :: #foreign (image: Image, key: Color, firstChar: rune): Font // Load font from Image (XNA style)
|
||||
LoadFontFromMemory :: #foreign (fileType: *char, fileData: *void, dataSize: int, fontSize: int, fontChars: *rune, glyphCount: int): Font // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
||||
IsFontReady :: #foreign (font: Font): Bool // Check if a font is ready
|
||||
IsFontReady :: #foreign (font: Font): bool // Check if a font is ready
|
||||
LoadFontData :: #foreign (fileData: *void, dataSize: int, fontSize: int, fontChars: *rune, glyphCount: int, type: FontType): *GlyphInfo // Load font data for further use
|
||||
GenImageFontAtlas :: #foreign (chars: *GlyphInfo, recs: **Rectangle, glyphCount: int, fontSize: int, padding: int, packMethod: int): Image // Generate image font atlas using chars info
|
||||
UnloadFontData :: #foreign (chars: *GlyphInfo, glyphCount: int) // Unload font chars info data (RAM)
|
||||
UnloadFont :: #foreign (font: Font) // Unload font from GPU memory (VRAM)
|
||||
ExportFontAsCode :: #foreign (font: Font, fileName: *char): Bool // Export font as code file, returns true on success
|
||||
ExportFontAsCode :: #foreign (font: Font, fileName: *char): bool // Export font as code file, returns true on success
|
||||
|
||||
// Text drawing functions
|
||||
|
||||
@@ -696,7 +696,7 @@ CodepointToUTF8 :: #foreign (codepoint: rune, utf8Size: *int): *char // En
|
||||
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
|
||||
|
||||
TextCopy :: #foreign (dst: *uchar, src: *char): int // Copy one string to another, returns bytes copied
|
||||
TextIsEqual :: #foreign (text1: *char, text2: *char): Bool // Check if two text string are equal
|
||||
TextIsEqual :: #foreign (text1: *char, text2: *char): bool // Check if two text string are equal
|
||||
TextLength :: #foreign (text: *char): uint // Get text length, checks for '\0' ending
|
||||
|
||||
// TextFormat is defined at the bottom of this file
|
||||
@@ -751,7 +751,7 @@ DrawGrid :: #foreign (slices: int, spacing: F32)
|
||||
|
||||
LoadModel :: #foreign (fileName: *char): Model // Load model from files (meshes and materials)
|
||||
LoadModelFromMesh :: #foreign (mesh: Mesh): Model // Load model from generated mesh (default material)
|
||||
IsModelReady :: #foreign (model: Model): Bool // Check if a model is ready
|
||||
IsModelReady :: #foreign (model: Model): bool // Check if a model is ready
|
||||
UnloadModel :: #foreign (model: Model) // Unload model (including meshes) from memory (RAM and/or VRAM)
|
||||
GetModelBoundingBox :: #foreign (model: Model): BoundingBox // Compute model bounding box limits (considers all meshes)
|
||||
|
||||
@@ -768,12 +768,12 @@ DrawBillboardPro :: #foreign (camera: Camera, texture: Texture2D, source: Rectan
|
||||
|
||||
// Mesh management functions
|
||||
|
||||
UploadMesh :: #foreign (mesh: *Mesh, is_dynamic: Bool) // Upload mesh vertex data in GPU and provide VAO/VBO ids
|
||||
UploadMesh :: #foreign (mesh: *Mesh, is_dynamic: bool) // Upload mesh vertex data in GPU and provide VAO/VBO ids
|
||||
UpdateMeshBuffer :: #foreign (mesh: Mesh, index: int, data: *void, dataSize: int, offset: int) // Update mesh vertex data in GPU for a specific buffer index
|
||||
UnloadMesh :: #foreign (mesh: Mesh) // Unload mesh data from CPU and GPU
|
||||
DrawMesh :: #foreign (mesh: Mesh, material: Material, transform: Matrix) // Draw a 3d mesh with material and transform
|
||||
DrawMeshInstanced :: #foreign (mesh: Mesh, material: Material, transforms: *Matrix, instances: int) // Draw multiple mesh instances with material and different transforms
|
||||
ExportMesh :: #foreign (mesh: Mesh, fileName: *char): Bool // Export mesh data to file, returns true on success
|
||||
ExportMesh :: #foreign (mesh: Mesh, fileName: *char): bool // Export mesh data to file, returns true on success
|
||||
GetMeshBoundingBox :: #foreign (mesh: Mesh): BoundingBox // Compute mesh bounding box limits
|
||||
GenMeshTangents :: #foreign (mesh: *Mesh) // Compute mesh tangents
|
||||
|
||||
@@ -795,7 +795,7 @@ GenMeshCubicmap :: #foreign (cubicmap: Image, cubeSize: Vector3): Mesh //
|
||||
|
||||
LoadMaterials :: #foreign (fileName: *char, materialCount: *int): *Material // Load materials from model file
|
||||
LoadMaterialDefault :: #foreign (): Material // Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
|
||||
IsMaterialReady :: #foreign (material: Material): Bool // Check if a material is ready
|
||||
IsMaterialReady :: #foreign (material: Material): bool // Check if a material is ready
|
||||
UnloadMaterial :: #foreign (material: Material) // Unload material from GPU memory (VRAM)
|
||||
SetMaterialTexture :: #foreign (material: *Material, mapType: MaterialMapIndex, texture: Texture2D) // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
|
||||
SetModelMeshMaterial :: #foreign (model: *Model, meshId: int, materialId: int) // Set material for a mesh
|
||||
@@ -806,13 +806,13 @@ LoadModelAnimations :: #foreign (fileName: *char, animCount: *uint): *ModelAni
|
||||
UpdateModelAnimation :: #foreign (model: Model, anim: ModelAnimation, frame: int) // Update model animation pose
|
||||
UnloadModelAnimation :: #foreign (anim: ModelAnimation) // Unload animation data
|
||||
UnloadModelAnimations :: #foreign (animations: *ModelAnimation, count: uint) // Unload animation array data
|
||||
IsModelAnimationValid :: #foreign (model: Model, anim: ModelAnimation): Bool // Check model animation skeleton match
|
||||
IsModelAnimationValid :: #foreign (model: Model, anim: ModelAnimation): bool // Check model animation skeleton match
|
||||
|
||||
// Collision detection functions
|
||||
|
||||
CheckCollisionSpheres :: #foreign (center1: Vector3, radius1: F32, center2: Vector3, radius2: F32): Bool // Check collision between two spheres
|
||||
CheckCollisionBoxes :: #foreign (box1, box2: BoundingBox): Bool // Check collision between two bounding boxes
|
||||
CheckCollisionBoxSphere :: #foreign (box: BoundingBox, center: Vector3, radius: F32): Bool // Check collision between box and sphere
|
||||
CheckCollisionSpheres :: #foreign (center1: Vector3, radius1: F32, center2: Vector3, radius2: F32): bool // Check collision between two spheres
|
||||
CheckCollisionBoxes :: #foreign (box1, box2: BoundingBox): bool // Check collision between two bounding boxes
|
||||
CheckCollisionBoxSphere :: #foreign (box: BoundingBox, center: Vector3, radius: F32): bool // Check collision between box and sphere
|
||||
GetRayCollisionSphere :: #foreign (ray: Ray, center: Vector3, radius: F32): RayCollision // Get collision info between ray and sphere
|
||||
GetRayCollisionBox :: #foreign (ray: Ray, box: BoundingBox): RayCollision // Get collision info between ray and box
|
||||
GetRayCollisionMesh :: #foreign (ray: Ray, mesh: Mesh, transform: Matrix): RayCollision // Get collision info between ray and mesh
|
||||
@@ -827,22 +827,22 @@ GetRayCollisionQuad :: #foreign (ray: Ray, p1, p2, p3, p4: Vector3): RayColl
|
||||
|
||||
InitAudioDevice :: #foreign () // Initialize audio device and context
|
||||
CloseAudioDevice :: #foreign () // Close the audio device and context
|
||||
IsAudioDeviceReady :: #foreign (): Bool // Check if audio device has been initialized successfully
|
||||
IsAudioDeviceReady :: #foreign (): bool // Check if audio device has been initialized successfully
|
||||
SetMasterVolume :: #foreign (volume: F32) // Set master volume (listener)
|
||||
|
||||
// Wave/Sound loading/unloading functions
|
||||
|
||||
LoadWave :: #foreign (fileName: *char): Wave // Load wave data from file
|
||||
LoadWaveFromMemory :: #foreign (fileType: *char, fileData: *void, dataSize: int): Wave // Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
|
||||
IsWaveReady :: #foreign (wave: Wave): Bool // Checks if wave data is ready
|
||||
IsWaveReady :: #foreign (wave: Wave): bool // Checks if wave data is ready
|
||||
LoadSound :: #foreign (fileName: *char): Sound // Load sound from file
|
||||
LoadSoundFromWave :: #foreign (wave: Wave): Sound // Load sound from wave data
|
||||
IsSoundReady :: #foreign (sound: Sound): Bool // Checks if a sound is ready
|
||||
IsSoundReady :: #foreign (sound: Sound): bool // Checks if a sound is ready
|
||||
UpdateSound :: #foreign (sound: Sound, data: *void, sampleCount: int) // Update sound buffer with new data
|
||||
UnloadWave :: #foreign (wave: Wave) // Unload wave data
|
||||
UnloadSound :: #foreign (sound: Sound) // Unload sound
|
||||
ExportWave :: #foreign (wave: Wave, fileName: *char): Bool // Export wave data to file, returns true on success
|
||||
ExportWaveAsCode :: #foreign (wave: Wave, fileName: *char): Bool // Export wave sample data to code (.h), returns true on success
|
||||
ExportWave :: #foreign (wave: Wave, fileName: *char): bool // Export wave data to file, returns true on success
|
||||
ExportWaveAsCode :: #foreign (wave: Wave, fileName: *char): bool // Export wave sample data to code (.h), returns true on success
|
||||
|
||||
// Wave/Sound management functions
|
||||
|
||||
@@ -850,7 +850,7 @@ PlaySound :: #foreign (sound: Sound)
|
||||
StopSound :: #foreign (sound: Sound) // Stop playing a sound
|
||||
PauseSound :: #foreign (sound: Sound) // Pause a sound
|
||||
ResumeSound :: #foreign (sound: Sound) // Resume a paused sound
|
||||
IsSoundPlaying :: #foreign (sound: Sound): Bool // Check if a sound is currently playing
|
||||
IsSoundPlaying :: #foreign (sound: Sound): bool // Check if a sound is currently playing
|
||||
SetSoundVolume :: #foreign (sound: Sound, volume: F32) // Set volume for a sound (1.0 is max level)
|
||||
SetSoundPitch :: #foreign (sound: Sound, pitch: F32) // Set pitch for a sound (1.0 is base level)
|
||||
SetSoundPan :: #foreign (sound: Sound, pan: F32) // Set pan for a sound (0.5 is center)
|
||||
@@ -864,10 +864,10 @@ UnloadWaveSamples :: #foreign (samples: *F32)
|
||||
|
||||
LoadMusicStream :: #foreign (fileName: *char): Music // Load music stream from file
|
||||
LoadMusicStreamFromMemory :: #foreign (fileType: *char, data: *void, dataSize: int): Music // Load music stream from data
|
||||
IsMusicReady :: #foreign (music: Music): Bool // Checks if a music stream is ready
|
||||
IsMusicReady :: #foreign (music: Music): bool // Checks if a music stream is ready
|
||||
UnloadMusicStream :: #foreign (music: Music) // Unload music stream
|
||||
PlayMusicStream :: #foreign (music: Music) // Start music playing
|
||||
IsMusicStreamPlaying :: #foreign (music: Music): Bool // Check if music is playing
|
||||
IsMusicStreamPlaying :: #foreign (music: Music): bool // Check if music is playing
|
||||
UpdateMusicStream :: #foreign (music: Music) // Updates buffers for music streaming
|
||||
StopMusicStream :: #foreign (music: Music) // Stop music playing
|
||||
PauseMusicStream :: #foreign (music: Music) // Pause music playing
|
||||
@@ -882,14 +882,14 @@ GetMusicTimePlayed :: #foreign (music: Music): F32
|
||||
// AudioStream management functions
|
||||
|
||||
LoadAudioStream :: #foreign (sampleRate, sampleSize: uint, channels: uint): AudioStream // Load audio stream (to stream raw audio pcm data)
|
||||
IsAudioStreamReady :: #foreign (stream: AudioStream): Bool // Checks if an audio stream is ready
|
||||
IsAudioStreamReady :: #foreign (stream: AudioStream): bool // Checks if an audio stream is ready
|
||||
UnloadAudioStream :: #foreign (stream: AudioStream) // Unload audio stream and free memory
|
||||
UpdateAudioStream :: #foreign (stream: AudioStream, data: *void, frameCount: int) // Update audio stream buffers with data
|
||||
IsAudioStreamProcessed :: #foreign (stream: AudioStream): Bool // Check if any audio stream buffers requires refill
|
||||
IsAudioStreamProcessed :: #foreign (stream: AudioStream): bool // Check if any audio stream buffers requires refill
|
||||
PlayAudioStream :: #foreign (stream: AudioStream) // Play audio stream
|
||||
PauseAudioStream :: #foreign (stream: AudioStream) // Pause audio stream
|
||||
ResumeAudioStream :: #foreign (stream: AudioStream) // Resume audio stream
|
||||
IsAudioStreamPlaying :: #foreign (stream: AudioStream): Bool // Check if audio stream is playing
|
||||
IsAudioStreamPlaying :: #foreign (stream: AudioStream): bool // Check if audio stream is playing
|
||||
StopAudioStream :: #foreign (stream: AudioStream) // Stop audio stream
|
||||
SetAudioStreamVolume :: #foreign (stream: AudioStream, volume: F32) // Set volume for audio stream (1.0 is max level)
|
||||
SetAudioStreamPitch :: #foreign (stream: AudioStream, pitch: F32) // Set pitch for audio stream (1.0 is base level)
|
||||
|
||||
Reference in New Issue
Block a user