Color32(r, g, b, a)
create :: Color32(r : int, g : int, b : int, a : int)
Creates a Color32 from individual RGBA components (0-255 each)
Color32(l)
create :: Color32(l : int)
Creates a grayscale Color32 from a single integer component (0-255)
InitWindow(width, height, title)
InitWindow :: (width : int, height : int, title : *char)
Initialises the window and OpenGL context
CloseWindow()
CloseWindow :: ()
Closes the window and unloads the OpenGL context
WindowShouldClose()
WindowShouldClose :: bool()
Returns true when the user presses Escape or clicks the close button
IsWindowReady()
IsWindowReady :: bool()
Returns true if the window has been initialized successfully
IsWindowFullscreen()
IsWindowFullscreen :: bool()
Returns true if the window is currently in fullscreen mode
IsWindowHidden()
IsWindowHidden :: bool()
Returns true if the window is currently hidden
IsWindowMinimized()
IsWindowMinimized :: bool()
Returns true if the window is currently minimized
IsWindowMaximized()
IsWindowMaximized :: bool()
Returns true if the window is currently maximized
IsWindowFocused()
IsWindowFocused :: bool()
Returns true if the window is currently focused
IsWindowResized()
IsWindowResized :: bool()
Returns true if the window was resized this frame
IsWindowState(flag)
IsWindowState :: bool(flag : uint32)
Returns true if a specific window config flag is enabled
SetWindowState(flags)
SetWindowState :: (flags : uint32)
Sets window configuration state flags
ClearWindowState(flags)
ClearWindowState :: (flags : uint32)
Clears window configuration state flags
ToggleFullscreen()
ToggleFullscreen :: ()
Toggles between fullscreen and windowed mode
ToggleBorderlessWindowed()
ToggleBorderlessWindowed :: ()
Toggles borderless windowed mode
MaximizeWindow()
MaximizeWindow :: ()
Maximizes the window if it is resizable
MinimizeWindow()
MinimizeWindow :: ()
Minimizes the window if it is resizable
RestoreWindow()
RestoreWindow :: ()
Restores the window from minimized or maximized state
SetWindowIcon(image)
SetWindowIcon :: (image : Image)
Sets the window icon from a single RGBA Image
SetWindowTitle(title)
SetWindowTitle :: (title : *char)
Sets the window title
SetWindowPosition(x, y)
SetWindowPosition :: (x : int, y : int)
Sets the window position on screen
SetWindowMonitor(monitor)
SetWindowMonitor :: (monitor : int)
Moves the window to the specified monitor
SetWindowMinSize(width, height)
SetWindowMinSize :: (width : int, height : int)
Sets the minimum window dimensions (requires FLAG_WINDOW_RESIZABLE)
SetWindowMaxSize(width, height)
SetWindowMaxSize :: (width : int, height : int)
Sets the maximum window dimensions (requires FLAG_WINDOW_RESIZABLE)
SetWindowSize(width, height)
SetWindowSize :: (width : int, height : int)
Sets the window dimensions
SetWindowOpacity(opacity)
SetWindowOpacity :: (opacity : float)
Sets window opacity [0.0 .. 1.0]
SetWindowFocused()
SetWindowFocused :: ()
Brings the window to focus
GetScreenWidth()
GetScreenWidth :: int()
Returns the current screen width in pixels
GetScreenHeight()
GetScreenHeight :: int()
Returns the current screen height in pixels
GetRenderWidth()
GetRenderWidth :: int()
Returns the current render width (accounts for HiDPI)
GetRenderHeight()
GetRenderHeight :: int()
Returns the current render height (accounts for HiDPI)
GetMonitorCount()
GetMonitorCount :: int()
Returns the number of connected monitors
GetCurrentMonitor()
GetCurrentMonitor :: int()
Returns the index of the monitor the window is on
GetMonitorPosition(monitor)
GetMonitorPosition :: Vector2(monitor : int)
Returns the position of the specified monitor
GetMonitorWidth(monitor)
GetMonitorWidth :: int(monitor : int)
Returns the width of the specified monitor in pixels
GetMonitorHeight(monitor)
GetMonitorHeight :: int(monitor : int)
Returns the height of the specified monitor in pixels
GetMonitorPhysicalWidth(monitor)
GetMonitorPhysicalWidth :: int(monitor : int)
Returns the physical width of the monitor in millimetres
GetMonitorPhysicalHeight(monitor)
GetMonitorPhysicalHeight :: int(monitor : int)
Returns the physical height of the monitor in millimetres
GetMonitorRefreshRate(monitor)
GetMonitorRefreshRate :: int(monitor : int)
Returns the refresh rate of the specified monitor
GetWindowPosition()
GetWindowPosition :: Vector2()
Returns the window position as a Vector2
GetWindowScaleDPI()
GetWindowScaleDPI :: Vector2()
Returns the window DPI scale factor
GetMonitorName(monitor)
GetMonitorName :: *char(monitor : int)
Returns the UTF-8 encoded name of the specified monitor
SetClipboardText(text)
SetClipboardText :: (text : *char)
Sets the clipboard text content
GetClipboardText()
GetClipboardText :: *char()
Returns the clipboard text content
EnableEventWaiting()
EnableEventWaiting :: ()
Enables waiting for events on EndDrawing() (no auto polling)
DisableEventWaiting()
DisableEventWaiting :: ()
Disables waiting for events (restores automatic polling)
ShowCursor()
ShowCursor :: ()
Shows the mouse cursor
HideCursor()
HideCursor :: ()
Hides the mouse cursor
IsCursorHidden()
IsCursorHidden :: bool()
Returns true if the cursor is not visible
EnableCursor()
EnableCursor :: ()
Unlocks and enables the cursor
DisableCursor()
DisableCursor :: ()
Locks and disables the cursor
IsCursorOnScreen()
IsCursorOnScreen :: bool()
Returns true if the cursor is within the window
BeginDrawing()
BeginDrawing :: ()
Sets up the canvas to start drawing
EndDrawing()
EndDrawing :: ()
Ends canvas drawing and swaps buffers
ClearBackground(color)
ClearBackground :: (color : Color32)
Sets the background colour for this frame
BeginMode2D(camera)
BeginMode2D :: (camera : Camera2D)
Begins 2D mode with a custom Camera2D
EndMode2D()
EndMode2D :: ()
Ends 2D camera mode
BeginMode3D(camera)
BeginMode3D :: (camera : Camera3D)
Begins 3D mode with a custom Camera3D
EndMode3D()
EndMode3D :: ()
Ends 3D camera mode and returns to 2D orthographic
BeginTextureMode(target)
BeginTextureMode :: (target : RenderTexture2D)
Begins drawing to an off-screen render texture
EndTextureMode()
EndTextureMode :: ()
Ends drawing to the render texture
BeginShaderMode(shader)
BeginShaderMode :: (shader : Shader)
Begins drawing with a custom shader
EndShaderMode()
EndShaderMode :: ()
Ends custom shader drawing (reverts to default shader)
BeginBlendMode(mode)
BeginBlendMode :: (mode : int)
Begins blending mode (alpha, additive, multiplied, etc.)
EndBlendMode()
EndBlendMode :: ()
Ends blending mode (resets to alpha blending)
BeginScissorMode(x, y, width, height)
BeginScissorMode :: (x : int, y : int, width : int, height : int)
Begins scissor mode -- restricts drawing to a screen rectangle
EndScissorMode()
EndScissorMode :: ()
Ends scissor mode
LoadShader(vsFileName, fsFileName)
LoadShader :: Shader(vsFileName : *char, fsFileName : *char)
Loads a shader from vertex and fragment source files
LoadShaderFromMemory(vsCode, fsCode)
LoadShaderFromMemory :: Shader(vsCode : *char, fsCode : *char)
Loads a shader from vertex and fragment code strings
IsShaderReady(shader)
IsShaderReady :: bool(shader : Shader)
Returns true if the shader program is ready to use
GetShaderLocation(shader, uniformName)
GetShaderLocation :: int(shader : Shader, uniformName : *char)
Returns the location index of a shader uniform variable
GetShaderLocationAttrib(shader, attribName)
GetShaderLocationAttrib :: int(shader : Shader, attribName : *char)
Returns the location index of a shader attribute variable
SetShaderValue(shader, locIndex, value, uniformType)
SetShaderValue :: (shader : Shader, locIndex : int, value : *any, uniformType : int)
Sets a shader uniform value (pointer to data)
SetShaderValueV(shader, locIndex, value, uniformType, count)
SetShaderValueV :: (shader : Shader, locIndex : int, value : *any, uniformType : int, count : int)
Sets a shader uniform value vector (pointer to data, count elements)
SetShaderValueMatrix(shader, locIndex, mat)
SetShaderValueMatrix :: (shader : Shader, locIndex : int, mat : Matrix)
Sets a shader uniform value of type mat4
SetShaderValueTexture(shader, locIndex, texture)
SetShaderValueTexture :: (shader : Shader, locIndex : int, texture : Texture2D)
Sets a shader sampler2d uniform to the given texture
UnloadShader(shader)
UnloadShader :: (shader : Shader)
Unloads a shader from GPU memory
GetCameraMatrix2D(camera)
GetCameraMatrix2D :: Matrix(camera : Camera2D)
Returns the 2D camera transform matrix
GetScreenToWorld2D(position, camera)
GetScreenToWorld2D :: Vector2(position : Vector2, camera : Camera2D)
Converts a 2D screen-space position to world-space
GetWorldToScreen2D(position, camera)
GetWorldToScreen2D :: Vector2(position : Vector2, camera : Camera2D)
Converts a 2D world-space position to screen-space
GetWorldToScreen(position, camera)
GetWorldToScreen :: Vector2(position : Vector3, camera : Camera3D)
Returns screen-space position for a 3D world-space point
GetWorldToScreenEx(position, camera, width, height)
GetWorldToScreenEx :: Vector2(position : Vector3, camera : Camera3D, width : int, height : int)
Returns screen-space position for a 3D world-space point with explicit viewport size
GetCameraMatrix(camera)
GetCameraMatrix :: Matrix(camera : Camera3D)
Returns the 3D camera view matrix
GetScreenToWorldRay(position, camera)
GetScreenToWorldRay :: Ray(position : Vector2, camera : Camera3D)
Get a ray trace from the screen position within a camera field-of-view
GetScreenToWorldRayEx(position, camera, width, height)
GetScreenToWorldRayEx :: Ray(position : Vector2, camera : Camera3D, width : int, height : int)
Get a ray trace from screen position with explicit viewport size
SetTargetFPS(fps)
SetTargetFPS :: (fps : int)
Sets the target frames-per-second
GetFPS()
GetFPS :: int()
Returns the current frames-per-second
GetFrameTime()
GetFrameTime :: float()
Returns time in seconds for the last frame drawn (delta time)
GetTime()
GetTime :: double()
Returns elapsed time in seconds since InitWindow()
WaitTime(seconds)
WaitTime :: (seconds : double)
Halts program execution for the given number of seconds
SwapScreenBuffer()
SwapScreenBuffer :: ()
Swaps the back and front screen buffers manually
PollInputEvents()
PollInputEvents :: ()
Registers all input events (use with manual frame control)
SetRandomSeed(seed)
SetRandomSeed :: (seed : uint32)
Sets the seed for the random number generator
GetRandomValue(min, max)
GetRandomValue :: int(min : int, max : int)
Returns a random integer in [min, max] inclusive
TakeScreenshot(fileName)
TakeScreenshot :: (fileName : *char)
Saves a screenshot of the current frame to file
SetConfigFlags(flags)
SetConfigFlags :: (flags : uint32)
Sets init configuration flags before InitWindow()
OpenURL(url)
OpenURL :: (url : *char)
Opens the given URL in the system browser
SetTraceLogLevel(logLevel)
SetTraceLogLevel :: (logLevel : int)
Sets the minimum log level threshold
MemAlloc(size)
MemAlloc :: *uint8(size : uint32)
Allocates memory (raylib internal allocator)
MemRealloc(ptr, size)
MemRealloc :: *uint8(ptr : *uint8, size : uint32)
Reallocates memory (raylib internal allocator)
MemFree(ptr)
MemFree :: (ptr : *uint8)
Frees memory allocated by MemAlloc/MemRealloc
FileExists(fileName)
FileExists :: bool(fileName : *char)
Returns true if the file exists on disk
DirectoryExists(dirPath)
DirectoryExists :: bool(dirPath : *char)
Returns true if the directory path exists
IsFileExtension(fileName, ext)
IsFileExtension :: bool(fileName : *char, ext : *char)
Returns true if the file has the given extension (e.g. ".png")
GetFileLength(fileName)
GetFileLength :: int(fileName : *char)
Returns the file size in bytes
GetFileExtension(fileName)
GetFileExtension :: *char(fileName : *char)
Returns a pointer to the extension part of the filename (e.g. ".png")
GetFileName(filePath)
GetFileName :: *char(filePath : *char)
Returns a pointer to the filename portion of a path
GetFileNameWithoutExt(filePath)
GetFileNameWithoutExt :: *char(filePath : *char)
Returns the filename without extension (static string)
GetDirectoryPath(filePath)
GetDirectoryPath :: *char(filePath : *char)
Returns the directory portion of a path (static string)
GetPrevDirectoryPath(dirPath)
GetPrevDirectoryPath :: *char(dirPath : *char)
Returns the parent directory of the given path (static string)
GetWorkingDirectory()
GetWorkingDirectory :: *char()
Returns the current working directory (static string)
GetApplicationDirectory()
GetApplicationDirectory :: *char()
Returns the directory where the executable resides (static string)
ChangeDirectory(dir)
ChangeDirectory :: bool(dir : *char)
Changes the working directory; returns true on success
IsPathFile(path)
IsPathFile :: bool(path : *char)
Returns true if the path points to a file (false = directory)
IsFileDropped()
IsFileDropped :: bool()
Returns true if files have been dropped onto the window this frame
LoadDroppedFiles()
LoadDroppedFiles :: FilePathList()
Load dropped filepaths (call IsFileDropped first)
UnloadDroppedFiles(files)
UnloadDroppedFiles :: (files : FilePathList)
Unload dropped filepaths
LoadDirectoryFiles(dirPath)
LoadDirectoryFiles :: FilePathList(dirPath : *char)
Load all filepaths in a directory
LoadDirectoryFilesEx(basePath, filter, scanSubdirs)
LoadDirectoryFilesEx :: FilePathList(basePath : *char, filter : *char, scanSubdirs : bool)
Load filepaths with filter and optional recursion
UnloadDirectoryFiles(files)
UnloadDirectoryFiles :: (files : FilePathList)
Unload directory filepaths
GetFileModTime(fileName)
GetFileModTime :: int(fileName : *char)
Returns the last-modified time of the file (Unix timestamp)
LoadFileData(fileName, dataSize)
LoadFileData :: *uint8(fileName : *char, dataSize : *int)
Loads file contents as a byte array; dataSize is set to the number of bytes
UnloadFileData(data)
UnloadFileData :: (data : *uint8)
Unloads data loaded by LoadFileData
SaveFileData(fileName, data, dataSize)
SaveFileData :: bool(fileName : *char, data : *uint8, dataSize : int)
Saves a byte array to file; returns true on success
LoadFileText(fileName)
LoadFileText :: *char(fileName : *char)
Loads a text file as a null-terminated string
UnloadFileText(text)
UnloadFileText :: (text : *char)
Unloads text loaded by LoadFileText
SaveFileText(fileName, text)
SaveFileText :: bool(fileName : *char, text : *char)
Saves a null-terminated string to a text file; returns true on success
CompressData(data, dataSize, compDataSize)
CompressData :: *uint8(data : *uint8, dataSize : int, compDataSize : *int)
Compresses data using DEFLATE; compDataSize receives the output size
DecompressData(compData, compDataSize, dataSize)
DecompressData :: *uint8(compData : *uint8, compDataSize : int, dataSize : *int)
Decompresses DEFLATE data; dataSize receives the output size
EncodeDataBase64(data, dataSize, outputSize)
EncodeDataBase64 :: *char(data : *uint8, dataSize : int, outputSize : *int)
Encodes data to a Base64 string; outputSize receives the string length
DecodeDataBase64(data, outputSize)
DecodeDataBase64 :: *uint8(data : *uint8, outputSize : *int)
Decodes a Base64 string to bytes; outputSize receives the output size
SetShapesTexture(texture, source)
SetShapesTexture :: (texture : Texture2D, source : Rect)
Sets the texture and source rect used when drawing basic shapes
DrawPixel(posX, posY, color)
DrawPixel :: (posX : int, posY : int, color : Color32)
Draws a single pixel
DrawPixelV(position, color)
DrawPixelV :: (position : Vector2, color : Color32)
Draws a single pixel at a Vector2 position
DrawLine(startPosX, startPosY, endPosX, endPosY, color)
DrawLine :: (startPosX : int, startPosY : int, endPosX : int, endPosY : int, color : Color32)
Draws a line between two points
DrawLineV(startPos, endPos, color)
DrawLineV :: (startPos : Vector2, endPos : Vector2, color : Color32)
Draws a line between two Vector2 points
DrawLineEx(startPos, endPos, thick, color)
DrawLineEx :: (startPos : Vector2, endPos : Vector2, thick : float, color : Color32)
Draws a thick line between two Vector2 points
DrawLineBezier(startPos, endPos, thick, color)
DrawLineBezier :: (startPos : Vector2, endPos : Vector2, thick : float, color : Color32)
Draws a cubic-bezier line segment
DrawCircle(centerX, centerY, radius, color)
DrawCircle :: (centerX : int, centerY : int, radius : float, color : Color32)
Draws a filled circle
DrawCircleV(center, radius, color)
DrawCircleV :: (center : Vector2, radius : float, color : Color32)
Draws a filled circle at a Vector2 center
DrawCircleOutline(centerX, centerY, radius, color)
DrawCircleOutline :: (centerX : int, centerY : int, radius : float, color : Color32)
Draws the outline of a circle
DrawCircleLinesV(center, radius, color)
DrawCircleLinesV :: (center : Vector2, radius : float, color : Color32)
Draws the outline of a circle at a Vector2 center
DrawCircleSector(center, radius, startAngle, endAngle, segments, color)
DrawCircleSector :: (center : Vector2, radius : float, startAngle : float, endAngle : float, segments : int, color : Color32)
Draws a filled circle sector (pie slice)
DrawCircleSectorLines(center, radius, startAngle, endAngle, segments, color)
DrawCircleSectorLines :: (center : Vector2, radius : float, startAngle : float, endAngle : float, segments : int, color : Color32)
Draws the outline of a circle sector
DrawCircleGradient(centerX, centerY, radius, color1, color2)
DrawCircleGradient :: (centerX : int, centerY : int, radius : float, color1 : Color32, color2 : Color32)
Draws a gradient-filled circle (inner color1, outer color2)
DrawEllipse(centerX, centerY, radiusH, radiusV, color)
DrawEllipse :: (centerX : int, centerY : int, radiusH : float, radiusV : float, color : Color32)
Draws a filled ellipse
DrawEllipseLines(centerX, centerY, radiusH, radiusV, color)
DrawEllipseLines :: (centerX : int, centerY : int, radiusH : float, radiusV : float, color : Color32)
Draws the outline of an ellipse
DrawRing(center, innerRadius, outerRadius, startAngle, endAngle, segments, color)
DrawRing :: (center : Vector2, innerRadius : float, outerRadius : float, startAngle : float, endAngle : float, segments : int, color : Color32)
Draws a filled ring (annulus sector)
DrawRingLines(center, innerRadius, outerRadius, startAngle, endAngle, segments, color)
DrawRingLines :: (center : Vector2, innerRadius : float, outerRadius : float, startAngle : float, endAngle : float, segments : int, color : Color32)
Draws the outline of a ring
DrawRectangle(posX, posY, width, height, color)
DrawRectangle :: (posX : int, posY : int, width : int, height : int, color : Color32)
Draws a filled rectangle
DrawRectangleV(position, size, color)
DrawRectangleV :: (position : Vector2, size : Vector2, color : Color32)
Draws a filled rectangle with Vector2 position and size
DrawRectangleRect(rect, color)
DrawRectangleRect :: (rect : Rect, color : Color32)
Draws a filled rectangle using a Rect struct
DrawRectanglePro(rec, origin, rotation, color)
DrawRectanglePro :: (rec : Rect, origin : Vector2, rotation : float, color : Color32)
Draws a rectangle with rotation around an origin point
DrawRectangleGradientV(posX, posY, width, height, color1, color2)
DrawRectangleGradientV :: (posX : int, posY : int, width : int, height : int, color1 : Color32, color2 : Color32)
Draws a vertical-gradient-filled rectangle
DrawRectangleGradientH(posX, posY, width, height, color1, color2)
DrawRectangleGradientH :: (posX : int, posY : int, width : int, height : int, color1 : Color32, color2 : Color32)
Draws a horizontal-gradient-filled rectangle
DrawRectangleGradientEx(rec, col1, col2, col3, col4)
DrawRectangleGradientEx :: (rec : Rect, col1 : Color32, col2 : Color32, col3 : Color32, col4 : Color32)
Draws a gradient-filled rectangle with custom per-vertex colors
DrawRectangleOutline(posX, posY, width, height, color)
DrawRectangleOutline :: (posX : int, posY : int, width : int, height : int, color : Color32)
Draws the outline of a rectangle
DrawRectangleLinesEx(rec, lineThick, color)
DrawRectangleLinesEx :: (rec : Rect, lineThick : float, color : Color32)
Draws the outline of a rectangle with a given line thickness
DrawRectangleRounded(rec, roundness, segments, color)
DrawRectangleRounded :: (rec : Rect, roundness : float, segments : int, color : Color32)
Draws a rectangle with rounded corners
DrawRectangleRoundedLines(rec, roundness, segments, lineThick, color)
DrawRectangleRoundedLines :: (rec : Rect, roundness : float, segments : int, lineThick : float, color : Color32)
Draws the outline of a rounded rectangle
DrawTriangle(v1, v2, v3, color)
DrawTriangle :: (v1 : Vector2, v2 : Vector2, v3 : Vector2, color : Color32)
Draws a filled triangle (vertices in counter-clockwise order)
DrawTriangleLines(v1, v2, v3, color)
DrawTriangleLines :: (v1 : Vector2, v2 : Vector2, v3 : Vector2, color : Color32)
Draws a triangle outline (vertices in counter-clockwise order)
DrawPoly(center, sides, radius, rotation, color)
DrawPoly :: (center : Vector2, sides : int, radius : float, rotation : float, color : Color32)
Draws a filled regular polygon
DrawPolyLines(center, sides, radius, rotation, color)
DrawPolyLines :: (center : Vector2, sides : int, radius : float, rotation : float, color : Color32)
Draws the outline of a regular polygon
DrawPolyLinesEx(center, sides, radius, rotation, lineThick, color)
DrawPolyLinesEx :: (center : Vector2, sides : int, radius : float, rotation : float, lineThick : float, color : Color32)
Draws the outline of a regular polygon with a given line thickness
CheckCollisionRecs(rec1, rec2)
CheckCollisionRecs :: bool(rec1 : Rect, rec2 : Rect)
Returns true if two rectangles overlap
CheckCollisionCircles(center1, radius1, center2, radius2)
CheckCollisionCircles :: bool(center1 : Vector2, radius1 : float, center2 : Vector2, radius2 : float)
Returns true if two circles overlap
CheckCollisionCircleRec(center, radius, rec)
CheckCollisionCircleRec :: bool(center : Vector2, radius : float, rec : Rect)
Returns true if a circle and rectangle overlap
CheckCollisionPointRec(point, rec)
CheckCollisionPointRec :: bool(point : Vector2, rec : Rect)
Returns true if the point is inside the rectangle
CheckCollisionPointCircle(point, center, radius)
CheckCollisionPointCircle :: bool(point : Vector2, center : Vector2, radius : float)
Returns true if the point is inside the circle
CheckCollisionPointTriangle(point, p1, p2, p3)
CheckCollisionPointTriangle :: bool(point : Vector2, p1 : Vector2, p2 : Vector2, p3 : Vector2)
Returns true if the point is inside the triangle
GetCollisionRec(rec1, rec2)
GetCollisionRec :: Rect(rec1 : Rect, rec2 : Rect)
Returns the overlapping rectangle of two colliding rectangles
DrawFPS(posX, posY)
DrawFPS :: (posX : int, posY : int)
Draws the current FPS counter at the given position
DrawText(text, posX, posY, fontSize, color)
DrawText :: (text : *char, posX : int, posY : int, fontSize : int, color : Color32)
Draws text using the default font
DrawTextEx(font, text, position, fontSize, spacing, tint)
DrawTextEx :: (font : Font, text : *char, position : Vector2, fontSize : float, spacing : float, tint : Color32)
Draws text using a custom Font with extra parameters
DrawTextPro(font, text, position, origin, rotation, fontSize, spacing, tint)
DrawTextPro :: (font : Font, text : *char, position : Vector2, origin : Vector2, rotation : float, fontSize : float, spacing : float, tint : Color32)
Draws text with rotation around an origin point
MeasureText(text, fontSize)
MeasureText :: int(text : *char, fontSize : int)
Returns the width in pixels of the given text at the given font size
MeasureTextEx(font, text, fontSize, spacing)
MeasureTextEx :: Vector2(font : Font, text : *char, fontSize : float, spacing : float)
Returns the size of the text rendered with a custom font
SetTextLineSpacing(spacing)
SetTextLineSpacing :: (spacing : int)
Sets the vertical line spacing when drawing multi-line text
GetGlyphIndex(font, codepoint)
GetGlyphIndex :: int(font : Font, codepoint : int)
Returns the glyph index for a codepoint in the given font
GetGlyphInfo(font, codepoint)
GetGlyphInfo :: GlyphInfo(font : Font, codepoint : int)
Returns glyph data for a codepoint
GetGlyphAtlasRec(font, codepoint)
GetGlyphAtlasRec :: Rect(font : Font, codepoint : int)
Returns the atlas rectangle for a glyph codepoint
IsKeyPressed(key)
IsKeyPressed :: bool(key : int)
Returns true if the key was pressed this frame (once)
IsKeyPressedRepeat(key)
IsKeyPressedRepeat :: bool(key : int)
Returns true if the key is pressed and the OS repeat fires
IsKeyDown(key)
IsKeyDown :: bool(key : int)
Returns true while the key is held down
IsKeyReleased(key)
IsKeyReleased :: bool(key : int)
Returns true if the key was released this frame
IsKeyUp(key)
IsKeyUp :: bool(key : int)
Returns true while the key is not held
GetKeyPressed()
GetKeyPressed :: int()
Returns the keycode of the next key in the input queue, or 0
GetCharPressed()
GetCharPressed :: int()
Returns the unicode codepoint of the next queued character, or 0
IsGamepadAvailable(gamepad)
IsGamepadAvailable :: bool(gamepad : int)
Returns true if the gamepad is connected and ready
GetGamepadName(gamepad)
GetGamepadName :: *char(gamepad : int)
Returns the internal name of the gamepad
IsGamepadButtonPressed(gamepad, button)
IsGamepadButtonPressed :: bool(gamepad : int, button : int)
Returns true if a gamepad button was pressed this frame
IsGamepadButtonDown(gamepad, button)
IsGamepadButtonDown :: bool(gamepad : int, button : int)
Returns true while a gamepad button is held
IsGamepadButtonReleased(gamepad, button)
IsGamepadButtonReleased :: bool(gamepad : int, button : int)
Returns true if a gamepad button was released this frame
IsGamepadButtonUp(gamepad, button)
IsGamepadButtonUp :: bool(gamepad : int, button : int)
Returns true while a gamepad button is not held
GetGamepadButtonPressed()
GetGamepadButtonPressed :: int()
Returns the last gamepad button pressed
GetGamepadAxisCount(gamepad)
GetGamepadAxisCount :: int(gamepad : int)
Returns the number of axes on the gamepad
GetGamepadAxisMovement(gamepad, axis)
GetGamepadAxisMovement :: float(gamepad : int, axis : int)
Returns the axis movement value [-1.0 .. 1.0]
IsMouseButtonPressed(button)
IsMouseButtonPressed :: bool(button : int)
Returns true if the mouse button was pressed this frame
IsMouseButtonDown(button)
IsMouseButtonDown :: bool(button : int)
Returns true while the mouse button is held
IsMouseButtonReleased(button)
IsMouseButtonReleased :: bool(button : int)
Returns true if the mouse button was released this frame
IsMouseButtonUp(button)
IsMouseButtonUp :: bool(button : int)
Returns true while the mouse button is not held
GetMouseX()
GetMouseX :: int()
Returns the current mouse X position in pixels
GetMouseY()
GetMouseY :: int()
Returns the current mouse Y position in pixels
GetMousePosition()
GetMousePosition :: Vector2()
Returns the current mouse position as a Vector2
GetMouseDelta()
GetMouseDelta :: Vector2()
Returns the mouse movement delta since the last frame
SetMousePosition(x, y)
SetMousePosition :: (x : int, y : int)
Sets the mouse cursor position
SetMouseOffset(offsetX, offsetY)
SetMouseOffset :: (offsetX : int, offsetY : int)
Sets an offset applied to all mouse position queries
SetMouseScale(scaleX, scaleY)
SetMouseScale :: (scaleX : float, scaleY : float)
Sets a scale factor applied to all mouse position queries
GetMouseWheelMove()
GetMouseWheelMove :: float()
Returns the mouse wheel scroll delta for this frame
GetMouseWheelMoveV()
GetMouseWheelMoveV :: Vector2()
Returns the mouse wheel scroll delta as a Vector2 (X and Y)
SetMouseCursor(cursor)
SetMouseCursor :: (cursor : int)
Sets the mouse cursor shape
GetTouchX()
GetTouchX :: int()
Returns the X position of touch point 0
GetTouchY()
GetTouchY :: int()
Returns the Y position of touch point 0
GetTouchPosition(index)
GetTouchPosition :: Vector2(index : int)
Returns the position of a touch point at the given index
GetTouchPointId(index)
GetTouchPointId :: int(index : int)
Returns the identifier of a touch point
GetTouchPointCount()
GetTouchPointCount :: int()
Returns the number of active touch points
SetGesturesEnabled(flags)
SetGesturesEnabled :: (flags : uint32)
Enables a set of gestures using bit flags
IsGestureDetected(gesture)
IsGestureDetected :: bool(gesture : uint32)
Returns true if the given gesture was detected this frame
GetGestureDetected()
GetGestureDetected :: int()
Returns the latest detected gesture type
GetGestureHoldDuration()
GetGestureHoldDuration :: float()
Returns the duration of the current hold gesture in milliseconds
GetGestureDragVector()
GetGestureDragVector :: Vector2()
Returns the drag gesture vector
GetGestureDragAngle()
GetGestureDragAngle :: float()
Returns the drag gesture angle in degrees
GetGesturePinchVector()
GetGesturePinchVector :: Vector2()
Returns the pinch gesture delta vector
GetGesturePinchAngle()
GetGesturePinchAngle :: float()
Returns the pinch gesture rotation angle in degrees
UpdateCamera(camera, mode)
UpdateCamera :: (camera : *Camera3D, mode : int)
Updates the 3D camera position for the selected mode
UpdateCameraPro(camera, movement, rotation, zoom)
UpdateCameraPro :: (camera : *Camera3D, movement : Vector3, rotation : Vector3, zoom : float)
Updates the 3D camera with explicit movement, rotation, and zoom
GetFontDefault()
GetFontDefault :: Font()
Returns the default built-in font
LoadFont(fileName)
LoadFont :: Font(fileName : *char)
Loads a font from file into GPU memory
LoadFontEx(fileName, fontSize, codepoints, codepointCount)
LoadFontEx :: Font(fileName : *char, fontSize : int, codepoints : *int, codepointCount : int)
Loads a font with extended parameters; pass null/0 for default charset
LoadFontFromImage(image, key, firstChar)
LoadFontFromImage :: Font(image : Image, key : Color32, firstChar : int)
Loads a font from an Image (XNA-style sprite font)
IsFontReady(font)
IsFontReady :: bool(font : Font)
Returns true if the font is loaded and ready to use
UnloadFont(font)
UnloadFont :: (font : Font)
Unloads a font from GPU memory
LoadImage(fileName)
LoadImage :: Image(fileName : *char)
Loads an image from file into CPU memory (RAM)
LoadImageRaw(fileName, width, height, format, headerSize)
LoadImageRaw :: Image(fileName : *char, width : int, height : int, format : int, headerSize : int)
Loads an image from a raw file with explicit dimensions and format
LoadImageFromMemory(fileType, fileData, dataSize)
LoadImageFromMemory :: Image(fileType : *char, fileData : *uint8, dataSize : int)
Loads an image from a memory buffer; fileType is the extension e.g. ".png"
LoadImageFromTexture(texture)
LoadImageFromTexture :: Image(texture : Texture2D)
Loads an image from GPU texture data (slow, copies VRAM to RAM)
LoadImageFromScreen()
LoadImageFromScreen :: Image()
Loads an image from the current screen buffer (screenshot)
IsImageReady(image)
IsImageReady :: bool(image : Image)
Returns true if the image is loaded and has valid pixel data
UnloadImage(image)
UnloadImage :: (image : Image)
Unloads image data from CPU memory (RAM)
ExportImage(image, fileName)
ExportImage :: bool(image : Image, fileName : *char)
Exports image data to file; returns true on success
GetImageColor(image, x, y)
GetImageColor :: Color32(image : Image, x : int, y : int)
Returns the pixel color at (x, y) in the image
GenImageColor(width, height, color)
GenImageColor :: Image(width : int, height : int, color : Color32)
Generates an image filled with a solid color
GenImageGradientLinear(width, height, direction, start, end)
GenImageGradientLinear :: Image(width : int, height : int, direction : int, start : Color32, end : Color32)
Generates a linear-gradient image; direction is in degrees [0..360]
GenImageGradientRadial(width, height, density, inner, outer)
GenImageGradientRadial :: Image(width : int, height : int, density : float, inner : Color32, outer : Color32)
Generates a radial-gradient image
GenImageChecked(width, height, checksX, checksY, col1, col2)
GenImageChecked :: Image(width : int, height : int, checksX : int, checksY : int, col1 : Color32, col2 : Color32)
Generates a checkerboard image
GenImageWhiteNoise(width, height, factor)
GenImageWhiteNoise :: Image(width : int, height : int, factor : float)
Generates a white-noise image
GenImagePerlinNoise(width, height, offsetX, offsetY, scale)
GenImagePerlinNoise :: Image(width : int, height : int, offsetX : int, offsetY : int, scale : float)
Generates a Perlin noise image
GenImageCellular(width, height, tileSize)
GenImageCellular :: Image(width : int, height : int, tileSize : int)
Generates a cellular automaton noise image
ImageCopy(image)
ImageCopy :: Image(image : Image)
Creates a copy of an image
ImageFromImage(image, rec)
ImageFromImage :: Image(image : Image, rec : Rect)
Creates a sub-image from a rectangular region of another image
ImageFormat(image, newFormat)
ImageFormat :: (image : *Image, newFormat : int)
Converts the image pixel data to a new format in-place
ImageToPOT(image, fill)
ImageToPOT :: (image : *Image, fill : Color32)
Pads the image to power-of-two dimensions, filling new pixels with fill
ImageCrop(image, crop)
ImageCrop :: (image : *Image, crop : Rect)
Crops the image to the given rectangle in-place
ImageAlphaCrop(image, threshold)
ImageAlphaCrop :: (image : *Image, threshold : float)
Crops the image removing alpha-transparent borders
ImageAlphaClear(image, color, threshold)
ImageAlphaClear :: (image : *Image, color : Color32, threshold : float)
Clears pixels with alpha below threshold to the given color
ImageAlphaMask(image, alphaMask)
ImageAlphaMask :: (image : *Image, alphaMask : Image)
Applies an alpha mask image to the image
ImageAlphaPremultiply(image)
ImageAlphaPremultiply :: (image : *Image)
Pre-multiplies the alpha channel into RGB
ImageBlurGaussian(image, blurSize)
ImageBlurGaussian :: (image : *Image, blurSize : int)
Applies a Gaussian blur approximation
ImageResize(image, newWidth, newHeight)
ImageResize :: (image : *Image, newWidth : int, newHeight : int)
Resizes an image in-place using bicubic scaling
ImageResizeNN(image, newWidth, newHeight)
ImageResizeNN :: (image : *Image, newWidth : int, newHeight : int)
Resizes an image in-place using nearest-neighbour scaling
ImageResizeCanvas(image, newWidth, newHeight, offsetX, offsetY, fill)
ImageResizeCanvas :: (image : *Image, newWidth : int, newHeight : int, offsetX : int, offsetY : int, fill : Color32)
Resizes the canvas, filling new space with fill color
ImageMipmaps(image)
ImageMipmaps :: (image : *Image)
Computes all mipmap levels for the image
ImageDither(image, rBpp, gBpp, bBpp, aBpp)
ImageDither :: (image : *Image, rBpp : int, gBpp : int, bBpp : int, aBpp : int)
Dithers the image to a lower bit depth using Floyd-Steinberg
ImageFlipVertical(image)
ImageFlipVertical :: (image : *Image)
Flips the image vertically in-place
ImageFlipHorizontal(image)
ImageFlipHorizontal :: (image : *Image)
Flips the image horizontally in-place
ImageRotate(image, degrees)
ImageRotate :: (image : *Image, degrees : int)
Rotates the image by the given angle in degrees
ImageRotateCW(image)
ImageRotateCW :: (image : *Image)
Rotates the image 90 degrees clockwise
ImageRotateCCW(image)
ImageRotateCCW :: (image : *Image)
Rotates the image 90 degrees counter-clockwise
ImageColorTint(image, color)
ImageColorTint :: (image : *Image, color : Color32)
Tints all pixels of the image by multiplying with color
ImageColorInvert(image)
ImageColorInvert :: (image : *Image)
Inverts all colors in the image
ImageColorGrayscale(image)
ImageColorGrayscale :: (image : *Image)
Converts the image to grayscale
ImageColorContrast(image, contrast)
ImageColorContrast :: (image : *Image, contrast : float)
Adjusts image contrast (-100 to 100)
ImageColorBrightness(image, brightness)
ImageColorBrightness :: (image : *Image, brightness : int)
Adjusts image brightness (-255 to 255)
ImageColorReplace(image, color, replace)
ImageColorReplace :: (image : *Image, color : Color32, replace : Color32)
Replaces all pixels of one color with another
ImageClearBackground(dst, color)
ImageClearBackground :: (dst : *Image, color : Color32)
Clears the entire image with the given color
ImageDrawPixel(dst, posX, posY, color)
ImageDrawPixel :: (image : *Image, posX : int, posY : int, color : Color32)
Draws a pixel onto an image (CPU-side)
ImageDrawLine(dst, startPosX, startPosY, endPosX, endPosY, color)
ImageDrawLine :: (dst : *Image, startPosX : int, startPosY : int, endPosX : int, endPosY : int, color : Color32)
Draws a line onto an image (CPU-side)
ImageDrawCircle(dst, centerX, centerY, radius, color)
ImageDrawCircle :: (dst : *Image, centerX : int, centerY : int, radius : int, color : Color32)
Draws a filled circle onto an image (CPU-side)
ImageDrawCircleLines(dst, centerX, centerY, radius, color)
ImageDrawCircleLines :: (dst : *Image, centerX : int, centerY : int, radius : int, color : Color32)
Draws a circle outline onto an image (CPU-side)
ImageDrawRectangle(dst, posX, posY, width, height, color)
ImageDrawRectangle :: (dst : *Image, posX : int, posY : int, width : int, height : int, color : Color32)
Draws a filled rectangle onto an image (CPU-side)
ImageDrawRectangleRec(dst, rec, color)
ImageDrawRectangleRec :: (dst : *Image, rec : Rect, color : Color32)
Draws a filled rectangle (Rect) onto an image
ImageDrawRectangleLines(dst, rec, thick, color)
ImageDrawRectangleLines :: (dst : *Image, rec : Rect, thick : int, color : Color32)
Draws a rectangle outline onto an image
ImageDraw(dst, src, srcRec, dstRec, tint)
ImageDraw :: (dst : *Image, src : Image, srcRec : Rect, dstRec : Rect, tint : Color32)
Draws a source image region onto a destination image with tint
ImageDrawText(dst, text, posX, posY, fontSize, color)
ImageDrawText :: (dst : *Image, text : *char, posX : int, posY : int, fontSize : int, color : Color32)
Draws text onto an image using the default font (CPU-side)
LoadRenderTexture(width, height)
LoadRenderTexture :: RenderTexture2D(width : int, height : int)
Loads a render texture (framebuffer) of the given size
UnloadRenderTexture(target)
UnloadRenderTexture :: (target : RenderTexture2D)
Unloads a render texture from GPU memory
LoadTexture(fileName)
LoadTexture :: Texture2D(fileName : *char)
Loads a texture from file into GPU memory (VRAM)
LoadTextureFromImage(image)
LoadTextureFromImage :: Texture2D(image : Image)
Loads a texture from an Image struct
IsTextureReady(texture)
IsTextureReady :: bool(texture : Texture2D)
Returns true if the texture is loaded and valid
UnloadTexture(texture)
UnloadTexture :: (texture : Texture2D)
Unloads texture from GPU memory (VRAM)
IsRenderTextureReady(target)
IsRenderTextureReady :: bool(target : RenderTexture2D)
Returns true if the render texture is valid
UpdateTexture(texture, pixels)
UpdateTexture :: (texture : Texture2D, pixels : *uint8)
Updates the GPU texture with new pixel data
UpdateTextureRec(texture, rec, pixels)
UpdateTextureRec :: (texture : Texture2D, rec : Rect, pixels : *uint8)
Updates a rectangular region of the GPU texture with new pixel data
GenTextureMipmaps(texture)
GenTextureMipmaps :: (texture : *Texture2D)
Generates GPU mipmaps for a texture
SetTextureFilter(texture, filter)
SetTextureFilter :: (texture : Texture2D, filter : int)
Sets the texture scaling filter mode
SetTextureWrap(texture, wrap)
SetTextureWrap :: (texture : Texture2D, wrap : int)
Sets the texture wrapping mode
DrawTexture(texture, posX, posY, tint)
DrawTexture :: (texture : Texture2D, posX : int, posY : int, tint : Color32)
Draws a Texture2D at the given position
DrawTextureV(texture, position, tint)
DrawTextureV :: (texture : Texture2D, position : Vector2, tint : Color32)
Draws a Texture2D at a Vector2 position
DrawTextureEx(texture, position, rotation, scale, tint)
DrawTextureEx :: (texture : Texture2D, position : Vector2, rotation : float, scale : float, tint : Color32)
Draws a Texture2D with extended transform parameters
DrawTextureRec(texture, source, position, tint)
DrawTextureRec :: (texture : Texture2D, source : Rect, position : Vector2, tint : Color32)
Draws a sub-rectangle of a texture
DrawTexturePro(texture, source, dest, origin, rotation, tint)
DrawTexturePro :: (texture : Texture2D, source : Rect, dest : Rect, origin : Vector2, rotation : float, tint : Color32)
Draws a texture with full source/dest rectangle and rotation control
DrawTextureNPatch(texture, nPatchInfo, dest, origin, rotation, tint)
DrawTextureNPatch :: (texture : Texture2D, nPatchInfo : NPatchInfo, dest : Rect, origin : Vector2, rotation : float, tint : Color32)
Draws a texture (or part of it) that stretches or shrinks using n-patch info
Fade(color, alpha)
Fade :: Color32(color : Color32, alpha : float)
Returns the color with the given alpha (0.0 to 1.0)
ColorToInt(color)
ColorToInt :: int(color : Color32)
Returns the hexadecimal integer value for a Color32
ColorNormalize(color)
ColorNormalize :: Vector4(color : Color32)
Returns the color components normalized to [0.0 .. 1.0] as a Vector4
ColorFromNormalized(normalized)
ColorFromNormalized :: Color32(normalized : Vector4)
Returns a Color32 from normalized [0.0 .. 1.0] Vector4 components
ColorToHSV(color)
ColorToHSV :: Vector3(color : Color32)
Returns HSV values (hue 0..360, saturation/value 0..1) as a Vector3
ColorFromHSV(hue, saturation, value)
ColorFromHSV :: Color32(hue : float, saturation : float, value : float)
Returns a Color32 from HSV values
ColorTint(color, tint)
ColorTint :: Color32(color : Color32, tint : Color32)
Returns a color multiplied with another (tint)
ColorBrightness(color, factor)
ColorBrightness :: Color32(color : Color32, factor : float)
Adjusts color brightness by factor (-1.0 to 1.0)
ColorContrast(color, contrast)
ColorContrast :: Color32(color : Color32, contrast : float)
Adjusts color contrast by factor (-1.0 to 1.0)
ColorAlpha(color, alpha)
ColorAlpha :: Color32(color : Color32, alpha : float)
Returns the color with the alpha channel set to the given value (0.0 to 1.0)
ColorAlphaBlend(dst, src, tint)
ColorAlphaBlend :: Color32(dst : Color32, src : Color32, tint : Color32)
Blends src alpha into dst color with tint
GetColor(hexValue)
GetColor :: Color32(hexValue : uint32)
Returns a Color32 from a hexadecimal RGBA value (e.g. 0xFF00FFFF)
GetPixelDataSize(width, height, format)
GetPixelDataSize :: int(width : int, height : int, format : int)
Returns the byte size of pixel data for the given dimensions and format
DrawLine3D(startPos, endPos, color)
DrawLine3D :: (startPos : Vector3, endPos : Vector3, color : Color32)
Draws a line in 3D world space
DrawPoint3D(position, color)
DrawPoint3D :: (position : Vector3, color : Color32)
Draws a point (small line) in 3D space
DrawCircle3D(center, radius, rotationAxis, rotationAngle, color)
DrawCircle3D :: (center : Vector3, radius : float, rotationAxis : Vector3, rotationAngle : float, color : Color32)
Draws a circle in 3D world space
DrawTriangle3D(v1, v2, v3, color)
DrawTriangle3D :: (v1 : Vector3, v2 : Vector3, v3 : Vector3, color : Color32)
Draws a filled triangle in 3D (vertices in counter-clockwise order)
DrawCube(position, width, height, length, color)
DrawCube :: (position : Vector3, width : float, height : float, length : float, color : Color32)
Draws a solid cube
DrawCubeV(position, size, color)
DrawCubeV :: (position : Vector3, size : Vector3, color : Color32)
Draws a solid cube with Vector3 size
DrawCubeWires(position, width, height, length, color)
DrawCubeWires :: (position : Vector3, width : float, height : float, length : float, color : Color32)
Draws a wireframe cube
DrawCubeWiresV(position, size, color)
DrawCubeWiresV :: (position : Vector3, size : Vector3, color : Color32)
Draws a wireframe cube with Vector3 size
DrawSphere(centerPos, radius, color)
DrawSphere :: (centerPos : Vector3, radius : float, color : Color32)
Draws a solid sphere
DrawSphereEx(centerPos, radius, rings, slices, color)
DrawSphereEx :: (centerPos : Vector3, radius : float, rings : int, slices : int, color : Color32)
Draws a solid sphere with subdivision control
DrawSphereWires(centerPos, radius, rings, slices, color)
DrawSphereWires :: (centerPos : Vector3, radius : float, rings : int, slices : int, color : Color32)
Draws a wireframe sphere
DrawCylinder(position, radiusTop, radiusBottom, height, slices, color)
DrawCylinder :: (position : Vector3, radiusTop : float, radiusBottom : float, height : float, slices : int, color : Color32)
Draws a solid cylinder (or cone if one radius is 0)
DrawCylinderEx(startPos, endPos, startRadius, endRadius, sides, color)
DrawCylinderEx :: (startPos : Vector3, endPos : Vector3, startRadius : float, endRadius : float, sides : int, color : Color32)
Draws a cylinder with endpoints and radius control
DrawCylinderWires(position, radiusTop, radiusBottom, height, slices, color)
DrawCylinderWires :: (position : Vector3, radiusTop : float, radiusBottom : float, height : float, slices : int, color : Color32)
Draws a wireframe cylinder
DrawCylinderWiresEx(startPos, endPos, startRadius, endRadius, sides, color)
DrawCylinderWiresEx :: (startPos : Vector3, endPos : Vector3, startRadius : float, endRadius : float, sides : int, color : Color32)
Draws a wireframe cylinder with endpoint control
DrawCapsule(startPos, endPos, radius, slices, rings, color)
DrawCapsule :: (startPos : Vector3, endPos : Vector3, radius : float, slices : int, rings : int, color : Color32)
Draws a solid capsule (cylinder with hemispherical caps)
DrawCapsuleWires(startPos, endPos, radius, slices, rings, color)
DrawCapsuleWires :: (startPos : Vector3, endPos : Vector3, radius : float, slices : int, rings : int, color : Color32)
Draws a wireframe capsule
DrawPlane(centerPos, size, color)
DrawPlane :: (centerPos : Vector3, size : Vector2, color : Color32)
Draws a flat XZ plane
DrawRay(ray, color)
DrawRay :: (ray : Ray, color : Color32)
Draws a ray as a line
DrawGrid(slices, spacing)
DrawGrid :: (slices : int, spacing : float)
Draws a grid centered at (0,0,0)
DrawBoundingBox(box, color)
DrawBoundingBox :: (box : BoundingBox, color : Color32)
Draw bounding box as wireframe lines
CheckCollisionSpheres(center1, radius1, center2, radius2)
CheckCollisionSpheres :: bool(center1 : Vector3, radius1 : float, center2 : Vector3, radius2 : float)
Returns true if two spheres overlap
CheckCollisionBoxes(box1, box2)
CheckCollisionBoxes :: bool(box1 : BoundingBox, box2 : BoundingBox)
Returns true if two bounding boxes overlap
CheckCollisionBoxSphere(box, center, radius)
CheckCollisionBoxSphere :: bool(box : BoundingBox, center : Vector3, radius : float)
Returns true if a bounding box and sphere overlap
GetRayCollisionSphere(ray, center, radius)
GetRayCollisionSphere :: RayCollision(ray : Ray, center : Vector3, radius : float)
Returns ray-sphere hit info
GetRayCollisionBox(ray, box)
GetRayCollisionBox :: RayCollision(ray : Ray, box : BoundingBox)
Returns ray-box hit info
GetRayCollisionTriangle(ray, p1, p2, p3)
GetRayCollisionTriangle :: RayCollision(ray : Ray, p1 : Vector3, p2 : Vector3, p3 : Vector3)
Returns ray-triangle hit info
GetRayCollisionQuad(ray, p1, p2, p3, p4)
GetRayCollisionQuad :: RayCollision(ray : Ray, p1 : Vector3, p2 : Vector3, p3 : Vector3, p4 : Vector3)
Returns ray-quad hit info
GetRayCollisionMesh(ray, mesh, transform)
GetRayCollisionMesh :: RayCollision(ray : Ray, mesh : Mesh, transform : Matrix)
Returns ray-mesh hit info
LoadModel(fileName)
LoadModel :: Model(fileName : *char)
Load a model from a file (OBJ, GLTF, GLB, VOX, IQM, M3D)
LoadModelFromMesh(mesh)
LoadModelFromMesh :: Model(mesh : Mesh)
Load model from a generated mesh (uses default material)
IsModelReady(model)
IsModelReady :: bool(model : Model)
Check if a model is ready (loaded into GPU)
UnloadModel(model)
UnloadModel :: (model : Model)
Unload model (including meshes) from memory
GetModelBoundingBox(model)
GetModelBoundingBox :: BoundingBox(model : Model)
Compute model bounding box (considers all meshes)
DrawModel(model, position, scale, tint)
DrawModel :: (model : Model, position : Vector3, scale : float, tint : Color32)
Draw a model with texture if set
DrawModelEx(model, position, rotationAxis, rotationAngle, scale, tint)
DrawModelEx :: (model : Model, position : Vector3, rotationAxis : Vector3, rotationAngle : float, scale : Vector3, tint : Color32)
Draw a model with extended parameters
DrawModelWires(model, position, scale, tint)
DrawModelWires :: (model : Model, position : Vector3, scale : float, tint : Color32)
Draw a model as wireframe
DrawModelWiresEx(model, position, rotationAxis, rotationAngle, scale, tint)
DrawModelWiresEx :: (model : Model, position : Vector3, rotationAxis : Vector3, rotationAngle : float, scale : Vector3, tint : Color32)
Draw a model as wireframe with extended parameters
UploadMesh(mesh, dynamic)
UploadMesh :: (mesh : *Mesh, dynamic : bool)
Upload mesh vertex data to GPU
UnloadMesh(mesh)
UnloadMesh :: (mesh : Mesh)
Unload mesh data from CPU and GPU
DrawMesh(mesh, material, transform)
DrawMesh :: (mesh : Mesh, material : Material, transform : Matrix)
Draw a 3D mesh with a material and transform
ExportMesh(mesh, fileName)
ExportMesh :: bool(mesh : Mesh, fileName : *char)
Export mesh data to file; returns true on success
GetMeshBoundingBox(mesh)
GetMeshBoundingBox :: BoundingBox(mesh : Mesh)
Compute mesh bounding box limits
GenMeshTangents(mesh)
GenMeshTangents :: (mesh : *Mesh)
Compute and set mesh tangents
GenMeshPoly(sides, radius)
GenMeshPoly :: Mesh(sides : int, radius : float)
Generate a regular polygon mesh
GenMeshPlane(width, length, resX, resZ)
GenMeshPlane :: Mesh(width : float, length : float, resX : int, resZ : int)
Generate a plane mesh with subdivisions
GenMeshCube(width, height, length)
GenMeshCube :: Mesh(width : float, height : float, length : float)
Generate a cuboid mesh
GenMeshSphere(radius, rings, slices)
GenMeshSphere :: Mesh(radius : float, rings : int, slices : int)
Generate a sphere mesh
GenMeshHemiSphere(radius, rings, slices)
GenMeshHemiSphere :: Mesh(radius : float, rings : int, slices : int)
Generate a hemisphere mesh (no bottom cap)
GenMeshCylinder(radius, height, slices)
GenMeshCylinder :: Mesh(radius : float, height : float, slices : int)
Generate a cylinder mesh
GenMeshCone(radius, height, slices)
GenMeshCone :: Mesh(radius : float, height : float, slices : int)
Generate a cone/pyramid mesh
GenMeshTorus(radius, size, radSeg, sides)
GenMeshTorus :: Mesh(radius : float, size : float, radSeg : int, sides : int)
Generate a torus mesh
GenMeshKnot(radius, size, radSeg, sides)
GenMeshKnot :: Mesh(radius : float, size : float, radSeg : int, sides : int)
Generate a trefoil knot mesh
GenMeshHeightmap(heightmap, size)
GenMeshHeightmap :: Mesh(heightmap : Image, size : Vector3)
Generate a heightmap mesh from image data
GenMeshCubicmap(cubicmap, cubeSize)
GenMeshCubicmap :: Mesh(cubicmap : Image, cubeSize : Vector3)
Generate a cubes-based map mesh from image data
LoadMaterialDefault()
LoadMaterialDefault :: Material()
Load the default material (supports DIFFUSE, SPECULAR, NORMAL maps)
IsMaterialReady(material)
IsMaterialReady :: bool(material : Material)
Check if a material is ready (shader assigned)
UnloadMaterial(material)
UnloadMaterial :: (material : Material)
Unload material from GPU memory
SetMaterialTexture(material, mapType, texture)
SetMaterialTexture :: (material : *Material, mapType : int, texture : Texture2D)
Set a texture for a material map type
SetModelMeshMaterial(model, meshId, materialId)
SetModelMeshMaterial :: (model : *Model, meshId : int, materialId : int)
Set material for a specific mesh in the model
LoadModelAnimations(fileName, animCount)
LoadModelAnimations :: *ModelAnimation(fileName : *char, animCount : *int)
Load model animations from file; returns pointer to array, sets animCount
UpdateModelAnimation(model, anim, frame)
UpdateModelAnimation :: (model : Model, anim : ModelAnimation, frame : int)
Update model animation pose for the given frame
UnloadModelAnimation(anim)
UnloadModelAnimation :: (anim : ModelAnimation)
Unload a single animation
UnloadModelAnimations(animations, animCount)
UnloadModelAnimations :: (animations : *ModelAnimation, animCount : int)
Unload an array of animations
IsModelAnimationValid(model, anim)
IsModelAnimationValid :: bool(model : Model, anim : ModelAnimation)
Check if animation skeleton matches the model
InitAudioDevice()
InitAudioDevice :: ()
Initializes the audio device and context
CloseAudioDevice()
CloseAudioDevice :: ()
Closes the audio device and context
IsAudioDeviceReady()
IsAudioDeviceReady :: bool()
Returns true if the audio device is initialized
SetMasterVolume(volume)
SetMasterVolume :: (volume : float)
Sets the master volume (0.0 to 1.0)
GetMasterVolume()
GetMasterVolume :: float()
Returns the current master volume
LoadWave(fileName)
LoadWave :: Wave(fileName : *char)
Loads wave data from file into CPU memory
IsWaveReady(wave)
IsWaveReady :: bool(wave : Wave)
Returns true if the wave is loaded and ready
LoadSound(fileName)
LoadSound :: Sound(fileName : *char)
Loads a sound from file into audio buffer (RAM)
LoadSoundFromWave(wave)
LoadSoundFromWave :: Sound(wave : Wave)
Loads a sound from wave data
IsSoundReady(sound)
IsSoundReady :: bool(sound : Sound)
Returns true if the sound is ready to play
UnloadWave(wave)
UnloadWave :: (wave : Wave)
Unloads wave data from CPU memory
UnloadSound(sound)
UnloadSound :: (sound : Sound)
Unloads a sound from memory
ExportWave(wave, fileName)
ExportWave :: bool(wave : Wave, fileName : *char)
Exports wave data to a file; returns true on success
PlaySound(sound)
PlaySound :: (sound : Sound)
Plays a sound
StopSound(sound)
StopSound :: (sound : Sound)
Stops playing a sound
PauseSound(sound)
PauseSound :: (sound : Sound)
Pauses a sound
ResumeSound(sound)
ResumeSound :: (sound : Sound)
Resumes a paused sound
IsSoundPlaying(sound)
IsSoundPlaying :: bool(sound : Sound)
Returns true if the sound is currently playing
SetSoundVolume(sound, volume)
SetSoundVolume :: (sound : Sound, volume : float)
Sets the volume for a sound (1.0 is max)
SetSoundPitch(sound, pitch)
SetSoundPitch :: (sound : Sound, pitch : float)
Sets the pitch for a sound (1.0 is base)
SetSoundPan(sound, pan)
SetSoundPan :: (sound : Sound, pan : float)
Sets the pan for a sound (0.5 is center)
WaveCopy(wave)
WaveCopy :: Wave(wave : Wave)
Copies a wave to a new wave
WaveCrop(wave, initSample, finalSample)
WaveCrop :: (wave : *Wave, initSample : int, finalSample : int)
Crops a wave to the specified sample range
WaveFormat(wave, sampleRate, sampleSize, channels)
WaveFormat :: (wave : *Wave, sampleRate : int, sampleSize : int, channels : int)
Converts wave data to the desired sample rate, bit depth, and channels
LoadWaveSamples(wave)
LoadWaveSamples :: *float(wave : Wave)
Loads wave sample data as a 32-bit float array
UnloadWaveSamples(samples)
UnloadWaveSamples :: (samples : *float)
Unloads sample data loaded by LoadWaveSamples
LoadMusicStream(fileName)
LoadMusicStream :: Music(fileName : *char)
Loads a music stream from file
IsMusicReady(music)
IsMusicReady :: bool(music : Music)
Returns true if the music stream is ready to play
UnloadMusicStream(music)
UnloadMusicStream :: (music : Music)
Unloads a music stream
PlayMusicStream(music)
PlayMusicStream :: (music : Music)
Starts playing a music stream
IsMusicStreamPlaying(music)
IsMusicStreamPlaying :: bool(music : Music)
Returns true if the music stream is playing
UpdateMusicStream(music)
UpdateMusicStream :: (music : Music)
Refills streaming music buffers; call each frame
StopMusicStream(music)
StopMusicStream :: (music : Music)
Stops music playback
PauseMusicStream(music)
PauseMusicStream :: (music : Music)
Pauses music playback
ResumeMusicStream(music)
ResumeMusicStream :: (music : Music)
Resumes paused music playback
SeekMusicStream(music, position)
SeekMusicStream :: (music : Music, position : float)
Seeks the music stream to the given position in seconds
SetMusicVolume(music, volume)
SetMusicVolume :: (music : Music, volume : float)
Sets the volume for a music stream (1.0 is max)
SetMusicPitch(music, pitch)
SetMusicPitch :: (music : Music, pitch : float)
Sets the pitch for a music stream (1.0 is base)
SetMusicPan(music, pan)
SetMusicPan :: (music : Music, pan : float)
Sets the pan for a music stream (0.5 is center)
GetMusicTimeLength(music)
GetMusicTimeLength :: float(music : Music)
Returns the total duration of the music in seconds
GetMusicTimePlayed(music)
GetMusicTimePlayed :: float(music : Music)
Returns the current playback position in seconds
LoadAudioStream(sampleRate, sampleSize, channels)
LoadAudioStream :: AudioStream(sampleRate : uint32, sampleSize : uint32, channels : uint32)
Loads an audio stream for raw PCM streaming
IsAudioStreamReady(stream)
IsAudioStreamReady :: bool(stream : AudioStream)
Returns true if the audio stream is ready
UnloadAudioStream(stream)
UnloadAudioStream :: (stream : AudioStream)
Unloads an audio stream and frees buffers
UpdateAudioStream(stream, data, frameCount)
UpdateAudioStream :: (stream : AudioStream, data : *uint8, frameCount : int)
Pushes raw PCM data to the audio stream
IsAudioStreamProcessed(stream)
IsAudioStreamProcessed :: bool(stream : AudioStream)
Returns true if any audio stream buffer needs refilling
PlayAudioStream(stream)
PlayAudioStream :: (stream : AudioStream)
Plays an audio stream
PauseAudioStream(stream)
PauseAudioStream :: (stream : AudioStream)
Pauses an audio stream
ResumeAudioStream(stream)
ResumeAudioStream :: (stream : AudioStream)
Resumes a paused audio stream
IsAudioStreamPlaying(stream)
IsAudioStreamPlaying :: bool(stream : AudioStream)
Returns true if the audio stream is currently playing
StopAudioStream(stream)
StopAudioStream :: (stream : AudioStream)
Stops an audio stream
SetAudioStreamVolume(stream, volume)
SetAudioStreamVolume :: (stream : AudioStream, volume : float)
Sets the volume for an audio stream (1.0 is max)
SetAudioStreamPitch(stream, pitch)
SetAudioStreamPitch :: (stream : AudioStream, pitch : float)
Sets the pitch for an audio stream (1.0 is base)
SetAudioStreamPan(stream, pan)
SetAudioStreamPan :: (stream : AudioStream, pan : float)
Sets the pan for an audio stream (0.5 is centered)
SetAudioStreamBufferSizeDefault(size)
SetAudioStreamBufferSizeDefault :: (size : int)
Sets the default buffer size for new audio streams