Functions
- InitWindow(width, height, title) ⇒
undefined
Initialize window and OpenGL context
- WindowShouldClose() ⇒
boolean
Check if KEY_ESCAPE pressed or Close icon pressed
- CloseWindow() ⇒
undefined
Close window and unload OpenGL context
- IsWindowReady() ⇒
boolean
Check if window has been initialized successfully
- IsWindowFullscreen() ⇒
boolean
Check if window is currently fullscreen
- IsWindowHidden() ⇒
boolean
Check if window is currently hidden (only PLATFORM_DESKTOP)
- IsWindowMinimized() ⇒
boolean
Check if window is currently minimized (only PLATFORM_DESKTOP)
- IsWindowMaximized() ⇒
boolean
Check if window is currently maximized (only PLATFORM_DESKTOP)
- IsWindowFocused() ⇒
boolean
Check if window is currently focused (only PLATFORM_DESKTOP)
- IsWindowResized() ⇒
boolean
Check if window has been resized last frame
- IsWindowState(flag) ⇒
boolean
Check if one specific window flag is enabled
- SetWindowState(flags) ⇒
undefined
Set window configuration state using flags (only PLATFORM_DESKTOP)
- ClearWindowState(flags) ⇒
undefined
Clear window configuration state flags
- ToggleFullscreen() ⇒
undefined
Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
- MaximizeWindow() ⇒
undefined
Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
- MinimizeWindow() ⇒
undefined
Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
- RestoreWindow() ⇒
undefined
Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
- SetWindowIcon(image) ⇒
undefined
Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
- SetWindowIcons(images, count) ⇒
undefined
Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
- SetWindowTitle(title) ⇒
undefined
Set title for window (only PLATFORM_DESKTOP)
- SetWindowPosition(x, y) ⇒
undefined
Set window position on screen (only PLATFORM_DESKTOP)
- SetWindowMonitor(monitor) ⇒
undefined
Set monitor for the current window (fullscreen mode)
- SetWindowMinSize(width, height) ⇒
undefined
Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
- SetWindowSize(width, height) ⇒
undefined
Set window dimensions
- SetWindowOpacity(opacity) ⇒
undefined
Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
- GetWindowHandle() ⇒
number
Get native window handle
- GetScreenWidth() ⇒
number
Get current screen width
- GetScreenHeight() ⇒
number
Get current screen height
- GetRenderWidth() ⇒
number
Get current render width (it considers HiDPI)
- GetRenderHeight() ⇒
number
Get current render height (it considers HiDPI)
- GetMonitorCount() ⇒
number
Get number of connected monitors
- GetCurrentMonitor() ⇒
number
Get current connected monitor
- GetMonitorPosition(monitor) ⇒
Vector2
Get specified monitor position
- GetMonitorWidth(monitor) ⇒
number
Get specified monitor width (current video mode used by monitor)
- GetMonitorHeight(monitor) ⇒
number
Get specified monitor height (current video mode used by monitor)
- GetMonitorPhysicalWidth(monitor) ⇒
number
Get specified monitor physical width in millimetres
- GetMonitorPhysicalHeight(monitor) ⇒
number
Get specified monitor physical height in millimetres
- GetMonitorRefreshRate(monitor) ⇒
number
Get specified monitor refresh rate
- GetWindowPosition() ⇒
Vector2
Get window position XY on monitor
- GetWindowScaleDPI() ⇒
Vector2
Get window scale DPI factor
- GetMonitorName(monitor) ⇒
string
Get the human-readable, UTF-8 encoded name of the primary monitor
- SetClipboardText(text) ⇒
undefined
Set clipboard text content
- GetClipboardText() ⇒
string
Get clipboard text content
- EnableEventWaiting() ⇒
undefined
Enable waiting for events on EndDrawing(), no automatic event polling
- DisableEventWaiting() ⇒
undefined
Disable waiting for events on EndDrawing(), automatic events polling
- SwapScreenBuffer() ⇒
undefined
Swap back buffer with front buffer (screen drawing)
- PollInputEvents() ⇒
undefined
Register all input events
- WaitTime(seconds) ⇒
undefined
Wait for some time (halt program execution)
- ShowCursor() ⇒
undefined
Shows cursor
- HideCursor() ⇒
undefined
Hides cursor
- IsCursorHidden() ⇒
boolean
Check if cursor is not visible
- EnableCursor() ⇒
undefined
Enables cursor (unlock cursor)
- DisableCursor() ⇒
undefined
Disables cursor (lock cursor)
- IsCursorOnScreen() ⇒
boolean
Check if cursor is on the screen
- ClearBackground(color) ⇒
undefined
Set background color (framebuffer clear color)
- BeginDrawing() ⇒
undefined
Setup canvas (framebuffer) to start drawing
- EndDrawing() ⇒
undefined
End canvas drawing and swap buffers (double buffering)
- BeginMode2D(camera) ⇒
undefined
Begin 2D mode with custom camera (2D)
- EndMode2D() ⇒
undefined
Ends 2D mode with custom camera
- BeginMode3D(camera) ⇒
undefined
Begin 3D mode with custom camera (3D)
- EndMode3D() ⇒
undefined
Ends 3D mode and returns to default 2D orthographic mode
- BeginTextureMode(target) ⇒
undefined
Begin drawing to render texture
- EndTextureMode() ⇒
undefined
Ends drawing to render texture
- BeginShaderMode(shader) ⇒
undefined
Begin custom shader drawing
- EndShaderMode() ⇒
undefined
End custom shader drawing (use default shader)
- BeginBlendMode(mode) ⇒
undefined
Begin blending mode (alpha, additive, multiplied, subtract, custom)
- EndBlendMode() ⇒
undefined
End blending mode (reset to default: alpha blending)
- BeginScissorMode(x, y, width, height) ⇒
undefined
Begin scissor mode (define screen area for following drawing)
- EndScissorMode() ⇒
undefined
End scissor mode
- EndVrStereoMode() ⇒
undefined
End stereo rendering (requires VR simulator)
- LoadShader(vsFileName, fsFileName) ⇒
Shader
Load shader from files and bind default locations
- LoadShaderFromMemory(vsCode, fsCode) ⇒
Shader
Load shader from code strings and bind default locations
- IsShaderReady(shader) ⇒
boolean
Check if a shader is ready
- GetShaderLocation(shader, uniformName) ⇒
number
Get shader uniform location
- GetShaderLocationAttrib(shader, attribName) ⇒
number
Get shader attribute location
- SetShaderValueMatrix(shader, locIndex, mat) ⇒
undefined
Set shader uniform value (matrix 4x4)
- SetShaderValueTexture(shader, locIndex, texture) ⇒
undefined
Set shader uniform value for texture (sampler2d)
- UnloadShader(shader) ⇒
undefined
Unload shader from GPU memory (VRAM)
- GetMouseRay(mousePosition, camera) ⇒
Ray
Get a ray trace from mouse position
- GetCameraMatrix(camera) ⇒
Matrix
Get camera transform matrix (view matrix)
- GetCameraMatrix2D(camera) ⇒
Matrix
Get camera 2d transform matrix
- GetWorldToScreen(position, camera) ⇒
Vector2
Get the screen space position for a 3d world space position
- GetScreenToWorld2D(position, camera) ⇒
Vector2
Get the world space position for a 2d camera screen space position
- GetWorldToScreenEx(position, camera, width, height) ⇒
Vector2
Get size position for a 3d world space position
- GetWorldToScreen2D(position, camera) ⇒
Vector2
Get the screen space position for a 2d camera world space position
- SetTargetFPS(fps) ⇒
undefined
Set target FPS (maximum)
- GetFPS() ⇒
number
Get current FPS
- GetFrameTime() ⇒
number
Get time in seconds for last frame drawn (delta time)
- GetTime() ⇒
number
Get elapsed time in seconds since InitWindow()
- GetRandomValue(min, max) ⇒
number
Get a random value between min and max (both included)
- SetRandomSeed(seed) ⇒
undefined
Set the seed for the random number generator
- TakeScreenshot(fileName) ⇒
undefined
Takes a screenshot of current screen (filename extension defines format)
- SetConfigFlags(flags) ⇒
undefined
Setup init configuration flags (view FLAGS)
- SetTraceLogLevel(logLevel) ⇒
undefined
Set the current threshold (minimum) log level
- MemAlloc(size) ⇒
number
Internal memory allocator
- MemRealloc(ptr, size) ⇒
number
Internal memory reallocator
- MemFree(ptr) ⇒
undefined
Internal memory free
- OpenURL(url) ⇒
undefined
Open URL with default system browser (if available)
- LoadFileData(fileName, bytesRead) ⇒
Buffer
Load file data as byte array (read)
- UnloadFileData(data) ⇒
undefined
Unload file data allocated by LoadFileData()
- SaveFileData(fileName, data, bytesToWrite) ⇒
boolean
Save data to file from byte array (write), returns true on success
- ExportDataAsCode(data, size, fileName) ⇒
boolean
Export data to code (.h), returns true on success
- LoadFileText(fileName) ⇒
string
Load text data from file (read), returns a '\0' terminated string
- UnloadFileText(text) ⇒
undefined
Unload file text data allocated by LoadFileText()
- SaveFileText(fileName, text) ⇒
boolean
Save text data to file (write), string must be '\0' terminated, returns true on success
- FileExists(fileName) ⇒
boolean
Check if file exists
- DirectoryExists(dirPath) ⇒
boolean
Check if a directory path exists
- IsFileExtension(fileName, ext) ⇒
boolean
Check file extension (including point: .png, .wav)
- GetFileLength(fileName) ⇒
number
Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
- GetFileExtension(fileName) ⇒
string
Get pointer to extension for a filename string (includes dot: '.png')
- GetFileName(filePath) ⇒
string
Get pointer to filename for a path string
- GetFileNameWithoutExt(filePath) ⇒
string
Get filename string without extension (uses static string)
- GetDirectoryPath(filePath) ⇒
string
Get full path for a given fileName with path (uses static string)
- GetPrevDirectoryPath(dirPath) ⇒
string
Get previous directory path for a given path (uses static string)
- GetWorkingDirectory() ⇒
string
Get current working directory (uses static string)
- GetApplicationDirectory() ⇒
string
Get the directory if the running application (uses static string)
- ChangeDirectory(dir) ⇒
boolean
Change working directory, return true on success
- IsPathFile(path) ⇒
boolean
Check if a given path is a file or a directory
- LoadDirectoryFiles(dirPath) ⇒
FilePathList
Load directory filepaths
- LoadDirectoryFilesEx(basePath, filter, scanSubdirs) ⇒
FilePathList
Load directory filepaths with extension filtering and recursive directory scan
- UnloadDirectoryFiles(files) ⇒
undefined
Unload filepaths
- IsFileDropped() ⇒
boolean
Check if a file has been dropped into window
- LoadDroppedFiles() ⇒
FilePathList
Load dropped filepaths
- UnloadDroppedFiles(files) ⇒
undefined
Unload dropped filepaths
- GetFileModTime(fileName) ⇒
number
Get file modification time (last write time)
- CompressData(data, dataSize, compDataSize) ⇒
Buffer
Compress data (DEFLATE algorithm), memory must be MemFree()
- DecompressData(compData, compDataSize, dataSize) ⇒
Buffer
Decompress data (DEFLATE algorithm), memory must be MemFree()
- EncodeDataBase64(data, dataSize, outputSize) ⇒
string
Encode data to Base64 string, memory must be MemFree()
- DecodeDataBase64(data, outputSize) ⇒
Buffer
Decode Base64 string data, memory must be MemFree()
- IsKeyPressed(key) ⇒
boolean
Check if a key has been pressed once
- IsKeyDown(key) ⇒
boolean
Check if a key is being pressed
- IsKeyReleased(key) ⇒
boolean
Check if a key has been released once
- IsKeyUp(key) ⇒
boolean
Check if a key is NOT being pressed
- SetExitKey(key) ⇒
undefined
Set a custom key to exit program (default is ESC)
- GetKeyPressed() ⇒
number
Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
- GetCharPressed() ⇒
number
Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
- IsGamepadAvailable(gamepad) ⇒
boolean
Check if a gamepad is available
- GetGamepadName(gamepad) ⇒
string
Get gamepad internal name id
- IsGamepadButtonPressed(gamepad, button) ⇒
boolean
Check if a gamepad button has been pressed once
- IsGamepadButtonDown(gamepad, button) ⇒
boolean
Check if a gamepad button is being pressed
- IsGamepadButtonReleased(gamepad, button) ⇒
boolean
Check if a gamepad button has been released once
- IsGamepadButtonUp(gamepad, button) ⇒
boolean
Check if a gamepad button is NOT being pressed
- GetGamepadButtonPressed() ⇒
number
Get the last gamepad button pressed
- GetGamepadAxisCount(gamepad) ⇒
number
Get gamepad axis count for a gamepad
- GetGamepadAxisMovement(gamepad, axis) ⇒
number
Get axis movement value for a gamepad axis
- SetGamepadMappings(mappings) ⇒
number
Set internal gamepad mappings (SDL_GameControllerDB)
- IsMouseButtonPressed(button) ⇒
boolean
Check if a mouse button has been pressed once
- IsMouseButtonDown(button) ⇒
boolean
Check if a mouse button is being pressed
- IsMouseButtonReleased(button) ⇒
boolean
Check if a mouse button has been released once
- IsMouseButtonUp(button) ⇒
boolean
Check if a mouse button is NOT being pressed
- GetMouseX() ⇒
number
Get mouse position X
- GetMouseY() ⇒
number
Get mouse position Y
- GetMousePosition() ⇒
Vector2
Get mouse position XY
- GetMouseDelta() ⇒
Vector2
Get mouse delta between frames
- SetMousePosition(x, y) ⇒
undefined
Set mouse position XY
- SetMouseOffset(offsetX, offsetY) ⇒
undefined
Set mouse offset
- SetMouseScale(scaleX, scaleY) ⇒
undefined
Set mouse scaling
- GetMouseWheelMove() ⇒
number
Get mouse wheel movement for X or Y, whichever is larger
- GetMouseWheelMoveV() ⇒
Vector2
Get mouse wheel movement for both X and Y
- SetMouseCursor(cursor) ⇒
undefined
Set mouse cursor
- GetTouchX() ⇒
number
Get touch position X for touch point 0 (relative to screen size)
- GetTouchY() ⇒
number
Get touch position Y for touch point 0 (relative to screen size)
- GetTouchPosition(index) ⇒
Vector2
Get touch position XY for a touch point index (relative to screen size)
- GetTouchPointId(index) ⇒
number
Get touch point identifier for given index
- GetTouchPointCount() ⇒
number
Get number of touch points
- SetGesturesEnabled(flags) ⇒
undefined
Enable a set of gestures using flags
- IsGestureDetected(gesture) ⇒
boolean
Check if a gesture have been detected
- GetGestureDetected() ⇒
number
Get latest detected gesture
- GetGestureHoldDuration() ⇒
number
Get gesture hold time in milliseconds
- GetGestureDragVector() ⇒
Vector2
Get gesture drag vector
- GetGestureDragAngle() ⇒
number
Get gesture drag angle
- GetGesturePinchVector() ⇒
Vector2
Get gesture pinch delta
- GetGesturePinchAngle() ⇒
number
Get gesture pinch angle
- UpdateCameraPro(camera, movement, rotation, zoom) ⇒
undefined
Update camera movement/rotation
- SetShapesTexture(texture, source) ⇒
undefined
Set texture and rectangle to be used on shapes drawing
- DrawPixel(posX, posY, color) ⇒
undefined
Draw a pixel
- DrawPixelV(position, color) ⇒
undefined
Draw a pixel (Vector version)
- DrawLine(startPosX, startPosY, endPosX, endPosY, color) ⇒
undefined
Draw a line
- DrawLineV(startPos, endPos, color) ⇒
undefined
Draw a line (Vector version)
- DrawLineEx(startPos, endPos, thick, color) ⇒
undefined
Draw a line defining thickness
- DrawLineBezier(startPos, endPos, thick, color) ⇒
undefined
Draw a line using cubic-bezier curves in-out
- DrawLineBezierQuad(startPos, endPos, controlPos, thick, color) ⇒
undefined
Draw line using quadratic bezier curves with a control point
- DrawLineBezierCubic(startPos, endPos, startControlPos, endControlPos, thick, color) ⇒
undefined
Draw line using cubic bezier curves with 2 control points
- DrawLineStrip(points, pointCount, color) ⇒
undefined
Draw lines sequence
- DrawCircle(centerX, centerY, radius, color) ⇒
undefined
Draw a color-filled circle
- DrawCircleSector(center, radius, startAngle, endAngle, segments, color) ⇒
undefined
Draw a piece of a circle
- DrawCircleSectorLines(center, radius, startAngle, endAngle, segments, color) ⇒
undefined
Draw circle sector outline
- DrawCircleGradient(centerX, centerY, radius, color1, color2) ⇒
undefined
Draw a gradient-filled circle
- DrawCircleV(center, radius, color) ⇒
undefined
Draw a color-filled circle (Vector version)
- DrawCircleLines(centerX, centerY, radius, color) ⇒
undefined
Draw circle outline
- DrawEllipse(centerX, centerY, radiusH, radiusV, color) ⇒
undefined
Draw ellipse
- DrawEllipseLines(centerX, centerY, radiusH, radiusV, color) ⇒
undefined
Draw ellipse outline
- DrawRing(center, innerRadius, outerRadius, startAngle, endAngle, segments, color) ⇒
undefined
Draw ring
- DrawRingLines(center, innerRadius, outerRadius, startAngle, endAngle, segments, color) ⇒
undefined
Draw ring outline
- DrawRectangle(posX, posY, width, height, color) ⇒
undefined
Draw a color-filled rectangle
- DrawRectangleV(position, size, color) ⇒
undefined
Draw a color-filled rectangle (Vector version)
- DrawRectangleRec(rec, color) ⇒
undefined
Draw a color-filled rectangle
- DrawRectanglePro(rec, origin, rotation, color) ⇒
undefined
Draw a color-filled rectangle with pro parameters
- DrawRectangleGradientV(posX, posY, width, height, color1, color2) ⇒
undefined
Draw a vertical-gradient-filled rectangle
- DrawRectangleGradientH(posX, posY, width, height, color1, color2) ⇒
undefined
Draw a horizontal-gradient-filled rectangle
- DrawRectangleGradientEx(rec, col1, col2, col3, col4) ⇒
undefined
Draw a gradient-filled rectangle with custom vertex colors
- DrawRectangleLines(posX, posY, width, height, color) ⇒
undefined
Draw rectangle outline
- DrawRectangleLinesEx(rec, lineThick, color) ⇒
undefined
Draw rectangle outline with extended parameters
- DrawRectangleRounded(rec, roundness, segments, color) ⇒
undefined
Draw rectangle with rounded edges
- DrawRectangleRoundedLines(rec, roundness, segments, lineThick, color) ⇒
undefined
Draw rectangle with rounded edges outline
- DrawTriangle(v1, v2, v3, color) ⇒
undefined
Draw a color-filled triangle (vertex in counter-clockwise order!)
- DrawTriangleLines(v1, v2, v3, color) ⇒
undefined
Draw triangle outline (vertex in counter-clockwise order!)
- DrawTriangleFan(points, pointCount, color) ⇒
undefined
Draw a triangle fan defined by points (first vertex is the center)
- DrawTriangleStrip(points, pointCount, color) ⇒
undefined
Draw a triangle strip defined by points
- DrawPoly(center, sides, radius, rotation, color) ⇒
undefined
Draw a regular polygon (Vector version)
- DrawPolyLines(center, sides, radius, rotation, color) ⇒
undefined
Draw a polygon outline of n sides
- DrawPolyLinesEx(center, sides, radius, rotation, lineThick, color) ⇒
undefined
Draw a polygon outline of n sides with extended parameters
- CheckCollisionRecs(rec1, rec2) ⇒
boolean
Check collision between two rectangles
- CheckCollisionCircles(center1, radius1, center2, radius2) ⇒
boolean
Check collision between two circles
- CheckCollisionCircleRec(center, radius, rec) ⇒
boolean
Check collision between circle and rectangle
- CheckCollisionPointRec(point, rec) ⇒
boolean
Check if point is inside rectangle
- CheckCollisionPointCircle(point, center, radius) ⇒
boolean
Check if point is inside circle
- CheckCollisionPointTriangle(point, p1, p2, p3) ⇒
boolean
Check if point is inside a triangle
- CheckCollisionPointPoly(point, points, pointCount) ⇒
boolean
Check if point is within a polygon described by array of vertices
- CheckCollisionLines(startPos1, endPos1, startPos2, endPos2, collisionPoint) ⇒
boolean
Check the collision between two lines defined by two points each, returns collision point by reference
- CheckCollisionPointLine(point, p1, p2, threshold) ⇒
boolean
Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
- GetCollisionRec(rec1, rec2) ⇒
Rectangle
Get collision rectangle for two rectangles collision
- LoadImage(fileName) ⇒
Image
Load image from file into CPU memory (RAM)
- LoadImageRaw(fileName, width, height, format, headerSize) ⇒
Image
Load image from RAW file data
- LoadImageAnim(fileName, frames) ⇒
Image
Load image sequence from file (frames appended to image.data)
- LoadImageFromMemory(fileType, fileData, dataSize) ⇒
Image
Load image from memory buffer, fileType refers to extension: i.e. '.png'
- LoadImageFromTexture(texture) ⇒
Image
Load image from GPU texture data
- LoadImageFromScreen() ⇒
Image
Load image from screen buffer and (screenshot)
- IsImageReady(image) ⇒
boolean
Check if an image is ready
- UnloadImage(image) ⇒
undefined
Unload image from CPU memory (RAM)
- ExportImage(image, fileName) ⇒
boolean
Export image data to file, returns true on success
- ExportImageAsCode(image, fileName) ⇒
boolean
Export image as code file defining an array of bytes, returns true on success
- GenImageColor(width, height, color) ⇒
Image
Generate image: plain color
- GenImageGradientV(width, height, top, bottom) ⇒
Image
Generate image: vertical gradient
- GenImageGradientH(width, height, left, right) ⇒
Image
Generate image: horizontal gradient
- GenImageGradientRadial(width, height, density, inner, outer) ⇒
Image
Generate image: radial gradient
- GenImageChecked(width, height, checksX, checksY, col1, col2) ⇒
Image
Generate image: checked
- GenImageWhiteNoise(width, height, factor) ⇒
Image
Generate image: white noise
- GenImagePerlinNoise(width, height, offsetX, offsetY, scale) ⇒
Image
Generate image: perlin noise
- GenImageCellular(width, height, tileSize) ⇒
Image
Generate image: cellular algorithm, bigger tileSize means bigger cells
- GenImageText(width, height, text) ⇒
Image
Generate image: grayscale image from text data
- ImageCopy(image) ⇒
Image
Create an image duplicate (useful for transformations)
- ImageFromImage(image, rec) ⇒
Image
Create an image from another image piece
- ImageText(text, fontSize, color) ⇒
Image
Create an image from text (default font)
- ImageTextEx(font, text, fontSize, spacing, tint) ⇒
Image
Create an image from text (custom sprite font)
- ImageBlurGaussian(image, blurSize) ⇒
undefined
Apply Gaussian blur using a box blur approximation
- LoadImageColors(image) ⇒
number
Load color data from image as a Color array (RGBA - 32bit)
- LoadImagePalette(image, maxPaletteSize, colorCount) ⇒
number
Load colors palette from image as a Color array (RGBA - 32bit)
- UnloadImageColors(colors) ⇒
undefined
Unload color data loaded with LoadImageColors()
- UnloadImagePalette(colors) ⇒
undefined
Unload colors palette loaded with LoadImagePalette()
- GetImageAlphaBorder(image, threshold) ⇒
Rectangle
Get image alpha border rectangle
- GetImageColor(image, x, y) ⇒
Color
Get image pixel color at (x, y) position
- ImageDrawCircleLines(dst, centerX, centerY, radius, color) ⇒
undefined
Draw circle outline within an image
- ImageDrawCircleLinesV(dst, center, radius, color) ⇒
undefined
Draw circle outline within an image (Vector version)
- LoadTexture(fileName) ⇒
Texture2D
Load texture from file into GPU memory (VRAM)
- LoadTextureFromImage(image) ⇒
Texture2D
Load texture from image data
- LoadTextureCubemap(image, layout) ⇒
TextureCubemap
Load cubemap from image, multiple image cubemap layouts supported
- LoadRenderTexture(width, height) ⇒
RenderTexture2D
Load texture for rendering (framebuffer)
- IsTextureReady(texture) ⇒
boolean
Check if a texture is ready
- UnloadTexture(texture) ⇒
undefined
Unload texture from GPU memory (VRAM)
- IsRenderTextureReady(target) ⇒
boolean
Check if a render texture is ready
- UnloadRenderTexture(target) ⇒
undefined
Unload render texture from GPU memory (VRAM)
- UpdateTexture(texture, pixels) ⇒
undefined
Update GPU texture with new data
- UpdateTextureRec(texture, rec, pixels) ⇒
undefined
Update GPU texture rectangle with new data
- SetTextureFilter(texture, filter) ⇒
undefined
Set texture scaling filter mode
- SetTextureWrap(texture, wrap) ⇒
undefined
Set texture wrapping mode
- DrawTexture(texture, posX, posY, tint) ⇒
undefined
Draw a Texture2D
- DrawTextureV(texture, position, tint) ⇒
undefined
Draw a Texture2D with position defined as Vector2
- DrawTextureEx(texture, position, rotation, scale, tint) ⇒
undefined
Draw a Texture2D with extended parameters
- DrawTextureRec(texture, source, position, tint) ⇒
undefined
Draw a part of a texture defined by a rectangle
- DrawTexturePro(texture, source, dest, origin, rotation, tint) ⇒
undefined
Draw a part of a texture defined by a rectangle with 'pro' parameters
- DrawTextureNPatch(texture, nPatchInfo, dest, origin, rotation, tint) ⇒
undefined
Draws a texture (or part of it) that stretches or shrinks nicely
- Fade(color, alpha) ⇒
Color
Get color with alpha applied, alpha goes from 0.0f to 1.0f
- ColorToInt(color) ⇒
number
Get hexadecimal value for a Color
- ColorNormalize(color) ⇒
Vector4
Get Color normalized as float [0..1]
- ColorFromNormalized(normalized) ⇒
Color
Get Color from normalized values [0..1]
- ColorToHSV(color) ⇒
Vector3
Get HSV values for a Color, hue [0..360], saturation/value [0..1]
- ColorFromHSV(hue, saturation, value) ⇒
Color
Get a Color from HSV values, hue [0..360], saturation/value [0..1]
- ColorTint(color, tint) ⇒
Color
Get color multiplied with another color
- ColorBrightness(color, factor) ⇒
Color
Get color with brightness correction, brightness factor goes from -1.0f to 1.0f
- ColorContrast(color, contrast) ⇒
Color
Get color with contrast correction, contrast values between -1.0f and 1.0f
- ColorAlpha(color, alpha) ⇒
Color
Get color with alpha applied, alpha goes from 0.0f to 1.0f
- ColorAlphaBlend(dst, src, tint) ⇒
Color
Get src alpha-blended into dst color with tint
- GetColor(hexValue) ⇒
Color
Get Color structure from hexadecimal value
- GetPixelColor(srcPtr, format) ⇒
Color
Get Color from a source pixel pointer of certain format
- SetPixelColor(dstPtr, color, format) ⇒
undefined
Set color formatted into destination pixel pointer
- GetPixelDataSize(width, height, format) ⇒
number
Get pixel data size in bytes for certain format
- GetFontDefault() ⇒
Font
Get the default Font
- LoadFont(fileName) ⇒
Font
Load font from file into GPU memory (VRAM)
- LoadFontEx(fileName, fontSize, fontChars, glyphCount) ⇒
Font
Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set
- LoadFontFromImage(image, key, firstChar) ⇒
Font
Load font from Image (XNA style)
- LoadFontFromMemory(fileType, fileData, dataSize, fontSize, fontChars, glyphCount) ⇒
Font
Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
- IsFontReady(font) ⇒
boolean
Check if a font is ready
- LoadFontData(fileData, dataSize, fontSize, fontChars, glyphCount, type) ⇒
number
Load font data for further use
- GenImageFontAtlas(chars, recs, glyphCount, fontSize, padding, packMethod) ⇒
Image
Generate image font atlas using chars info
- UnloadFontData(chars, glyphCount) ⇒
undefined
Unload font chars info data (RAM)
- UnloadFont(font) ⇒
undefined
Unload font from GPU memory (VRAM)
- ExportFontAsCode(font, fileName) ⇒
boolean
Export font as code file, returns true on success
- DrawFPS(posX, posY) ⇒
undefined
Draw current FPS
- DrawText(text, posX, posY, fontSize, color) ⇒
undefined
Draw text (using default font)
- DrawTextEx(font, text, position, fontSize, spacing, tint) ⇒
undefined
Draw text using font and additional parameters
- DrawTextPro(font, text, position, origin, rotation, fontSize, spacing, tint) ⇒
undefined
Draw text using Font and pro parameters (rotation)
- DrawTextCodepoint(font, codepoint, position, fontSize, tint) ⇒
undefined
Draw one character (codepoint)
- DrawTextCodepoints(font, codepoints, count, position, fontSize, spacing, tint) ⇒
undefined
Draw multiple character (codepoint)
- MeasureText(text, fontSize) ⇒
number
Measure string width for default font
- MeasureTextEx(font, text, fontSize, spacing) ⇒
Vector2
Measure string size for Font
- GetGlyphIndex(font, codepoint) ⇒
number
Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
- GetGlyphInfo(font, codepoint) ⇒
GlyphInfo
Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found
- GetGlyphAtlasRec(font, codepoint) ⇒
Rectangle
Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
- LoadUTF8(codepoints, length) ⇒
string
Load UTF-8 text encoded from codepoints array
- UnloadUTF8(text) ⇒
undefined
Unload UTF-8 text encoded from codepoints array
- LoadCodepoints(text, count) ⇒
number
Load all codepoints from a UTF-8 text string, codepoints count returned by parameter
- UnloadCodepoints(codepoints) ⇒
undefined
Unload codepoints data from memory
- GetCodepointCount(text) ⇒
number
Get total number of codepoints in a UTF-8 encoded string
- GetCodepoint(text, codepointSize) ⇒
number
Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
- GetCodepointNext(text, codepointSize) ⇒
number
Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
- GetCodepointPrevious(text, codepointSize) ⇒
number
Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
- CodepointToUTF8(codepoint, utf8Size) ⇒
string
Encode one codepoint into UTF-8 byte array (array length returned as parameter)
- TextCopy(dst, src) ⇒
number
Copy one string to another, returns bytes copied
- TextIsEqual(text1, text2) ⇒
boolean
Check if two text string are equal
- TextLength(text) ⇒
number
Get text length, checks for '\0' ending
- TextSubtext(text, position, length) ⇒
string
Get a piece of a text string
- TextReplace(text, replace, by) ⇒
string
Replace text string (WARNING: memory must be freed!)
- TextInsert(text, insert, position) ⇒
string
Insert text in a position (WARNING: memory must be freed!)
- TextJoin(textList, count, delimiter) ⇒
string
Join text strings with delimiter
- TextSplit(text, delimiter, count) ⇒
number
Split text into multiple strings
- TextAppend(text, append, position) ⇒
undefined
Append text at specific position and move cursor!
- TextFindIndex(text, find) ⇒
number
Find first text occurrence within a string
- TextToUpper(text) ⇒
string
Get upper case version of provided string
- TextToLower(text) ⇒
string
Get lower case version of provided string
- TextToPascal(text) ⇒
string
Get Pascal case notation version of provided string
- TextToInteger(text) ⇒
number
Get integer value from text (negative values not supported)
- DrawLine3D(startPos, endPos, color) ⇒
undefined
Draw a line in 3D world space
- DrawPoint3D(position, color) ⇒
undefined
Draw a point in 3D space, actually a small line
- DrawCircle3D(center, radius, rotationAxis, rotationAngle, color) ⇒
undefined
Draw a circle in 3D world space
- DrawTriangle3D(v1, v2, v3, color) ⇒
undefined
Draw a color-filled triangle (vertex in counter-clockwise order!)
- DrawTriangleStrip3D(points, pointCount, color) ⇒
undefined
Draw a triangle strip defined by points
- DrawCube(position, width, height, length, color) ⇒
undefined
Draw cube
- DrawCubeV(position, size, color) ⇒
undefined
Draw cube (Vector version)
- DrawCubeWires(position, width, height, length, color) ⇒
undefined
Draw cube wires
- DrawCubeWiresV(position, size, color) ⇒
undefined
Draw cube wires (Vector version)
- DrawSphere(centerPos, radius, color) ⇒
undefined
Draw sphere
- DrawSphereEx(centerPos, radius, rings, slices, color) ⇒
undefined
Draw sphere with extended parameters
- DrawSphereWires(centerPos, radius, rings, slices, color) ⇒
undefined
Draw sphere wires
- DrawCylinder(position, radiusTop, radiusBottom, height, slices, color) ⇒
undefined
Draw a cylinder/cone
- DrawCylinderEx(startPos, endPos, startRadius, endRadius, sides, color) ⇒
undefined
Draw a cylinder with base at startPos and top at endPos
- DrawCylinderWires(position, radiusTop, radiusBottom, height, slices, color) ⇒
undefined
Draw a cylinder/cone wires
- DrawCylinderWiresEx(startPos, endPos, startRadius, endRadius, sides, color) ⇒
undefined
Draw a cylinder wires with base at startPos and top at endPos
- DrawCapsule(startPos, endPos, radius, slices, rings, color) ⇒
undefined
Draw a capsule with the center of its sphere caps at startPos and endPos
- DrawCapsuleWires(startPos, endPos, radius, slices, rings, color) ⇒
undefined
Draw capsule wireframe with the center of its sphere caps at startPos and endPos
- DrawPlane(centerPos, size, color) ⇒
undefined
Draw a plane XZ
- DrawRay(ray, color) ⇒
undefined
Draw a ray line
- DrawGrid(slices, spacing) ⇒
undefined
Draw a grid (centered at (0, 0, 0))
- LoadModel(fileName) ⇒
Model
Load model from files (meshes and materials)
- LoadModelFromMesh(mesh) ⇒
Model
Load model from generated mesh (default material)
- IsModelReady(model) ⇒
boolean
Check if a model is ready
- UnloadModel(model) ⇒
undefined
Unload model (including meshes) from memory (RAM and/or VRAM)
- GetModelBoundingBox(model) ⇒
BoundingBox
Compute model bounding box limits (considers all meshes)
- DrawModel(model, position, scale, tint) ⇒
undefined
Draw a model (with texture if set)
- DrawModelEx(model, position, rotationAxis, rotationAngle, scale, tint) ⇒
undefined
Draw a model with extended parameters
- DrawModelWires(model, position, scale, tint) ⇒
undefined
Draw a model wires (with texture if set)
- DrawModelWiresEx(model, position, rotationAxis, rotationAngle, scale, tint) ⇒
undefined
Draw a model wires (with texture if set) with extended parameters
- DrawBoundingBox(box, color) ⇒
undefined
Draw bounding box (wires)
- DrawBillboard(camera, texture, position, size, tint) ⇒
undefined
Draw a billboard texture
- DrawBillboardRec(camera, texture, source, position, size, tint) ⇒
undefined
Draw a billboard texture defined by source
- DrawBillboardPro(camera, texture, source, position, up, size, origin, rotation, tint) ⇒
undefined
Draw a billboard texture defined by source and rotation
- UpdateMeshBuffer(mesh, index, data, dataSize, offset) ⇒
undefined
Update mesh vertex data in GPU for a specific buffer index
- UnloadMesh(mesh) ⇒
undefined
Unload mesh data from CPU and GPU
- ExportMesh(mesh, fileName) ⇒
boolean
Export mesh data to file, returns true on success
- GetMeshBoundingBox(mesh) ⇒
BoundingBox
Compute mesh bounding box limits
- GenMeshPoly(sides, radius) ⇒
Mesh
Generate polygonal mesh
- GenMeshPlane(width, length, resX, resZ) ⇒
Mesh
Generate plane mesh (with subdivisions)
- GenMeshCube(width, height, length) ⇒
Mesh
Generate cuboid mesh
- GenMeshSphere(radius, rings, slices) ⇒
Mesh
Generate sphere mesh (standard sphere)
- GenMeshHemiSphere(radius, rings, slices) ⇒
Mesh
Generate half-sphere mesh (no bottom cap)
- GenMeshCylinder(radius, height, slices) ⇒
Mesh
Generate cylinder mesh
- GenMeshCone(radius, height, slices) ⇒
Mesh
Generate cone/pyramid mesh
- GenMeshTorus(radius, size, radSeg, sides) ⇒
Mesh
Generate torus mesh
- GenMeshKnot(radius, size, radSeg, sides) ⇒
Mesh
Generate trefoil knot mesh
- GenMeshHeightmap(heightmap, size) ⇒
Mesh
Generate heightmap mesh from image data
- GenMeshCubicmap(cubicmap, cubeSize) ⇒
Mesh
Generate cubes-based map mesh from image data
- LoadModelAnimations(fileName, animCount) ⇒
number
Load model animations from file
- UpdateModelAnimation(model, anim, frame) ⇒
undefined
Update model animation pose
- UnloadModelAnimation(anim) ⇒
undefined
Unload animation data
- UnloadModelAnimations(animations, count) ⇒
undefined
Unload animation array data
- IsModelAnimationValid(model, anim) ⇒
boolean
Check model animation skeleton match
- CheckCollisionSpheres(center1, radius1, center2, radius2) ⇒
boolean
Check collision between two spheres
- CheckCollisionBoxes(box1, box2) ⇒
boolean
Check collision between two bounding boxes
- CheckCollisionBoxSphere(box, center, radius) ⇒
boolean
Check collision between box and sphere
- GetRayCollisionSphere(ray, center, radius) ⇒
RayCollision
Get collision info between ray and sphere
- GetRayCollisionBox(ray, box) ⇒
RayCollision
Get collision info between ray and box
- GetRayCollisionMesh(ray, mesh, transform) ⇒
RayCollision
Get collision info between ray and mesh
- GetRayCollisionTriangle(ray, p1, p2, p3) ⇒
RayCollision
Get collision info between ray and triangle
- GetRayCollisionQuad(ray, p1, p2, p3, p4) ⇒
RayCollision
Get collision info between ray and quad
- InitAudioDevice() ⇒
undefined
Initialize audio device and context
- CloseAudioDevice() ⇒
undefined
Close the audio device and context
- IsAudioDeviceReady() ⇒
boolean
Check if audio device has been initialized successfully
- SetMasterVolume(volume) ⇒
undefined
Set master volume (listener)
- LoadWave(fileName) ⇒
Wave
Load wave data from file
- LoadWaveFromMemory(fileType, fileData, dataSize) ⇒
Wave
Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
- IsWaveReady(wave) ⇒
boolean
Checks if wave data is ready
- LoadSound(fileName) ⇒
Sound
Load sound from file
- LoadSoundFromWave(wave) ⇒
Sound
Load sound from wave data
- IsSoundReady(sound) ⇒
boolean
Checks if a sound is ready
- UpdateSound(sound, data, sampleCount) ⇒
undefined
Update sound buffer with new data
- UnloadWave(wave) ⇒
undefined
Unload wave data
- UnloadSound(sound) ⇒
undefined
Unload sound
- ExportWave(wave, fileName) ⇒
boolean
Export wave data to file, returns true on success
- ExportWaveAsCode(wave, fileName) ⇒
boolean
Export wave sample data to code (.h), returns true on success
- PlaySound(sound) ⇒
undefined
Play a sound
- StopSound(sound) ⇒
undefined
Stop playing a sound
- PauseSound(sound) ⇒
undefined
Pause a sound
- ResumeSound(sound) ⇒
undefined
Resume a paused sound
- IsSoundPlaying(sound) ⇒
boolean
Check if a sound is currently playing
- SetSoundVolume(sound, volume) ⇒
undefined
Set volume for a sound (1.0 is max level)
- SetSoundPitch(sound, pitch) ⇒
undefined
Set pitch for a sound (1.0 is base level)
- SetSoundPan(sound, pan) ⇒
undefined
Set pan for a sound (0.5 is center)
- WaveCopy(wave) ⇒
Wave
Copy a wave to a new wave
- LoadWaveSamples(wave) ⇒
number
Load samples data from wave as a 32bit float data array
- UnloadWaveSamples(samples) ⇒
undefined
Unload samples data loaded with LoadWaveSamples()
- LoadMusicStream(fileName) ⇒
Music
Load music stream from file
- LoadMusicStreamFromMemory(fileType, data, dataSize) ⇒
Music
Load music stream from data
- IsMusicReady(music) ⇒
boolean
Checks if a music stream is ready
- UnloadMusicStream(music) ⇒
undefined
Unload music stream
- PlayMusicStream(music) ⇒
undefined
Start music playing
- IsMusicStreamPlaying(music) ⇒
boolean
Check if music is playing
- UpdateMusicStream(music) ⇒
undefined
Updates buffers for music streaming
- StopMusicStream(music) ⇒
undefined
Stop music playing
- PauseMusicStream(music) ⇒
undefined
Pause music playing
- ResumeMusicStream(music) ⇒
undefined
Resume playing paused music
- SeekMusicStream(music, position) ⇒
undefined
Seek music to a position (in seconds)
- SetMusicVolume(music, volume) ⇒
undefined
Set volume for music (1.0 is max level)
- SetMusicPitch(music, pitch) ⇒
undefined
Set pitch for a music (1.0 is base level)
- SetMusicPan(music, pan) ⇒
undefined
Set pan for a music (0.5 is center)
- GetMusicTimeLength(music) ⇒
number
Get music time length (in seconds)
- GetMusicTimePlayed(music) ⇒
number
Get current music time played (in seconds)
- LoadAudioStream(sampleRate, sampleSize, channels) ⇒
AudioStream
Load audio stream (to stream raw audio pcm data)
- IsAudioStreamReady(stream) ⇒
boolean
Checks if an audio stream is ready
- UnloadAudioStream(stream) ⇒
undefined
Unload audio stream and free memory
- UpdateAudioStream(stream, data, frameCount) ⇒
undefined
Update audio stream buffers with data
- IsAudioStreamProcessed(stream) ⇒
boolean
Check if any audio stream buffers requires refill
- PlayAudioStream(stream) ⇒
undefined
Play audio stream
- PauseAudioStream(stream) ⇒
undefined
Pause audio stream
- ResumeAudioStream(stream) ⇒
undefined
Resume audio stream
- IsAudioStreamPlaying(stream) ⇒
boolean
Check if audio stream is playing
- StopAudioStream(stream) ⇒
undefined
Stop audio stream
- SetAudioStreamVolume(stream, volume) ⇒
undefined
Set volume for audio stream (1.0 is max level)
- SetAudioStreamPitch(stream, pitch) ⇒
undefined
Set pitch for audio stream (1.0 is base level)
- SetAudioStreamPan(stream, pan) ⇒
undefined
Set pan for audio stream (0.5 is centered)
- SetAudioStreamBufferSizeDefault(size) ⇒
undefined
Default size for new audio streams
- EaseLinearNone(t, b, c, d) ⇒
number
Ease: Linear
- EaseLinearIn(t, b, c, d) ⇒
number
Ease: Linear In
- EaseLinearOut(t, b, c, d) ⇒
number
Ease: Linear Out
- EaseLinearInOut(t, b, c, d) ⇒
number
Ease: Linear In Out
- EaseSineIn(t, b, c, d) ⇒
number
Ease: Sine In
- EaseSineOut(t, b, c, d) ⇒
number
Ease: Sine Out
- EaseSineInOut(t, b, c, d) ⇒
number
Ease: Sine Out
- EaseCircIn(t, b, c, d) ⇒
number
Ease: Circular In
- EaseCircOut(t, b, c, d) ⇒
number
Ease: Circular Out
- EaseCircInOut(t, b, c, d) ⇒
number
Ease: Circular In Out
- EaseCubicIn(t, b, c, d) ⇒
number
Ease: Cubic In
- EaseCubicOut(t, b, c, d) ⇒
number
Ease: Cubic Out
- EaseCubicInOut(t, b, c, d) ⇒
number
Ease: Cubic In Out
- EaseQuadIn(t, b, c, d) ⇒
number
Ease: Quadratic In
- EaseQuadOut(t, b, c, d) ⇒
number
Ease: Quadratic Out
- EaseQuadInOut(t, b, c, d) ⇒
number
Ease: Quadratic In Out
- EaseExpoIn(t, b, c, d) ⇒
number
Ease: Exponential In
- EaseExpoOut(t, b, c, d) ⇒
number
Ease: Exponential Out
- EaseExpoInOut(t, b, c, d) ⇒
number
Ease: Exponential In Out
- EaseBackIn(t, b, c, d) ⇒
number
Ease: Back In
- EaseBackOut(t, b, c, d) ⇒
number
Ease: Back Out
- EaseBackInOut(t, b, c, d) ⇒
number
Ease: Back In Out
- EaseBounceOut(t, b, c, d) ⇒
number
Ease: Bounce Out
- EaseBounceIn(t, b, c, d) ⇒
number
Ease: Bounce In
- EaseBounceInOut(t, b, c, d) ⇒
number
Ease: Bounce In Out
- EaseElasticIn(t, b, c, d) ⇒
number
Ease: Elastic In
- EaseElasticOut(t, b, c, d) ⇒
number
Ease: Elastic Out
- EaseElasticInOut(t, b, c, d) ⇒
number
Ease: Elastic In Out
- GuiEnable() ⇒
undefined
Enable gui controls (global state)
- GuiDisable() ⇒
undefined
Disable gui controls (global state)
- GuiLock() ⇒
undefined
Lock gui controls (global state)
- GuiUnlock() ⇒
undefined
Unlock gui controls (global state)
- GuiIsLocked() ⇒
boolean
Check if gui is locked (global state)
- GuiFade(alpha) ⇒
undefined
Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
- GuiSetState(state) ⇒
undefined
Set gui state (global state)
- GuiGetState() ⇒
number
Get gui state (global state)
- GuiSetFont(font) ⇒
undefined
Set gui custom font (global state)
- GuiGetFont() ⇒
Font
Get gui custom font (global state)
- GuiSetStyle(control, property, value) ⇒
undefined
Set one style property
- GuiGetStyle(control, property) ⇒
number
Get one style property
- GuiWindowBox(bounds, title) ⇒
boolean
Window Box control, shows a window that can be closed
- GuiGroupBox(bounds, text) ⇒
undefined
Group Box control with text name
- GuiLine(bounds, text) ⇒
undefined
Line separator control, could contain text
- GuiPanel(bounds, text) ⇒
undefined
Panel control, useful to group controls
- GuiTabBar(bounds, text, count, active) ⇒
number
Tab Bar control, returns TAB to be closed or -1
- GuiScrollPanel(bounds, text, content, scroll) ⇒
Rectangle
Scroll Panel control
- GuiLabel(bounds, text) ⇒
undefined
Label control, shows text
- GuiButton(bounds, text) ⇒
boolean
Button control, returns true when clicked
- GuiLabelButton(bounds, text) ⇒
boolean
Label button control, show true when clicked
- GuiToggle(bounds, text, active) ⇒
boolean
Toggle Button control, returns true when active
- GuiToggleGroup(bounds, text, active) ⇒
number
Toggle Group control, returns active toggle index
- GuiCheckBox(bounds, text, checked) ⇒
boolean
Check Box control, returns true when active
- GuiComboBox(bounds, text, active) ⇒
number
Combo Box control, returns selected item index
- GuiDropdownBox(bounds, text, active, editMode) ⇒
boolean
Dropdown Box control, returns selected item
- GuiSpinner(bounds, text, value, minValue, maxValue, editMode) ⇒
boolean
Spinner control, returns selected value
- GuiValueBox(bounds, text, value, minValue, maxValue, editMode) ⇒
boolean
Value Box control, updates input text with numbers
- GuiTextBox(bounds, text, textSize, editMode) ⇒
boolean
Text Box control, updates input text
- GuiTextBoxMulti(bounds, text, textSize, editMode) ⇒
boolean
Text Box control with multiple lines
- GuiSlider(bounds, textLeft, textRight, value, minValue, maxValue) ⇒
number
Slider control, returns selected value
- GuiSliderBar(bounds, textLeft, textRight, value, minValue, maxValue) ⇒
number
Slider Bar control, returns selected value
- GuiProgressBar(bounds, textLeft, textRight, value, minValue, maxValue) ⇒
number
Progress Bar control, shows current progress value
- GuiStatusBar(bounds, text) ⇒
undefined
Status Bar control, shows info text
- GuiDummyRec(bounds, text) ⇒
undefined
Dummy control for placeholders
- GuiGrid(bounds, text, spacing, subdivs) ⇒
Vector2
Grid control, returns mouse cell position
- GuiListView(bounds, text, scrollIndex, active) ⇒
number
List View control, returns selected list item index
- GuiListViewEx(bounds, text, count, focus, scrollIndex, active) ⇒
number
List View with extended parameters
- GuiMessageBox(bounds, title, message, buttons) ⇒
number
Message Box control, displays a message
- GuiTextInputBox(bounds, title, message, buttons, text, textMaxSize, secretViewActive) ⇒
number
Text Input Box control, ask for text, supports secret
- GuiColorPicker(bounds, text, color) ⇒
Color
Color Picker control (multiple color controls)
- GuiColorPanel(bounds, text, color) ⇒
Color
Color Panel control
- GuiColorBarAlpha(bounds, text, alpha) ⇒
number
Color Bar Alpha control
- GuiColorBarHue(bounds, text, value) ⇒
number
Color Bar Hue control
- GuiLoadStyle(fileName) ⇒
undefined
Load style file over global style variable (.rgs)
- GuiLoadStyleDefault() ⇒
undefined
Load style default over global style
- GuiEnableTooltip() ⇒
undefined
Enable gui tooltips (global state)
- GuiDisableTooltip() ⇒
undefined
Disable gui tooltips (global state)
- GuiSetTooltip(tooltip) ⇒
undefined
Set tooltip string
- GuiIconText(iconId, text) ⇒
string
Get text with icon id prepended (if supported)
- GuiGetIcons() ⇒
number
Get raygui icons data pointer
- GuiLoadIcons(fileName, loadIconsName) ⇒
number
Load raygui icons file (.rgi) into internal icons data
- GuiSetIconScale(scale) ⇒
undefined
Set icon drawing size
- rlMatrixMode(mode) ⇒
undefined
Choose the current matrix to be transformed
- rlPushMatrix() ⇒
undefined
Push the current matrix to stack
- rlPopMatrix() ⇒
undefined
Pop latest inserted matrix from stack
- rlLoadIdentity() ⇒
undefined
Reset current matrix to identity matrix
- rlTranslatef(x, y, z) ⇒
undefined
Multiply the current matrix by a translation matrix
- rlRotatef(angle, x, y, z) ⇒
undefined
Multiply the current matrix by a rotation matrix
- rlScalef(x, y, z) ⇒
undefined
Multiply the current matrix by a scaling matrix
- rlMultMatrixf(matf) ⇒
undefined
Multiply the current matrix by another matrix
- rlViewport(x, y, width, height) ⇒
undefined
Set the viewport area
- rlBegin(mode) ⇒
undefined
Initialize drawing mode (how to organize vertex)
- rlEnd() ⇒
undefined
Finish vertex providing
- rlVertex2i(x, y) ⇒
undefined
Define one vertex (position) - 2 int
- rlVertex2f(x, y) ⇒
undefined
Define one vertex (position) - 2 float
- rlVertex3f(x, y, z) ⇒
undefined
Define one vertex (position) - 3 float
- rlTexCoord2f(x, y) ⇒
undefined
Define one vertex (texture coordinate) - 2 float
- rlNormal3f(x, y, z) ⇒
undefined
Define one vertex (normal) - 3 float
- rlColor4ub(r, g, b, a) ⇒
undefined
Define one vertex (color) - 4 byte
- rlColor3f(x, y, z) ⇒
undefined
Define one vertex (color) - 3 float
- rlColor4f(x, y, z, w) ⇒
undefined
Define one vertex (color) - 4 float
- rlEnableVertexArray(vaoId) ⇒
boolean
Enable vertex array (VAO, if supported)
- rlDisableVertexArray() ⇒
undefined
Disable vertex array (VAO, if supported)
- rlEnableVertexBuffer(id) ⇒
undefined
Enable vertex buffer (VBO)
- rlDisableVertexBuffer() ⇒
undefined
Disable vertex buffer (VBO)
- rlEnableVertexBufferElement(id) ⇒
undefined
Enable vertex buffer element (VBO element)
- rlDisableVertexBufferElement() ⇒
undefined
Disable vertex buffer element (VBO element)
- rlEnableVertexAttribute(index) ⇒
undefined
Enable vertex attribute index
- rlDisableVertexAttribute(index) ⇒
undefined
Disable vertex attribute index
- rlActiveTextureSlot(slot) ⇒
undefined
Select and active a texture slot
- rlEnableTexture(id) ⇒
undefined
Enable texture
- rlDisableTexture() ⇒
undefined
Disable texture
- rlEnableTextureCubemap(id) ⇒
undefined
Enable texture cubemap
- rlDisableTextureCubemap() ⇒
undefined
Disable texture cubemap
- rlTextureParameters(id, param, value) ⇒
undefined
Set texture parameters (filter, wrap)
- rlCubemapParameters(id, param, value) ⇒
undefined
Set cubemap parameters (filter, wrap)
- rlEnableShader(id) ⇒
undefined
Enable shader program
- rlDisableShader() ⇒
undefined
Disable shader program
- rlEnableFramebuffer(id) ⇒
undefined
Enable render texture (fbo)
- rlDisableFramebuffer() ⇒
undefined
Disable render texture (fbo), return to default framebuffer
- rlActiveDrawBuffers(count) ⇒
undefined
Activate multiple draw color buffers
- rlEnableColorBlend() ⇒
undefined
Enable color blending
- rlDisableColorBlend() ⇒
undefined
Disable color blending
- rlEnableDepthTest() ⇒
undefined
Enable depth test
- rlDisableDepthTest() ⇒
undefined
Disable depth test
- rlEnableDepthMask() ⇒
undefined
Enable depth write
- rlDisableDepthMask() ⇒
undefined
Disable depth write
- rlEnableBackfaceCulling() ⇒
undefined
Enable backface culling
- rlDisableBackfaceCulling() ⇒
undefined
Disable backface culling
- rlSetCullFace(mode) ⇒
undefined
Set face culling mode
- rlEnableScissorTest() ⇒
undefined
Enable scissor test
- rlDisableScissorTest() ⇒
undefined
Disable scissor test
- rlScissor(x, y, width, height) ⇒
undefined
Scissor test
- rlEnableWireMode() ⇒
undefined
Enable wire mode
- rlDisableWireMode() ⇒
undefined
Disable wire mode
- rlSetLineWidth(width) ⇒
undefined
Set the line drawing width
- rlGetLineWidth() ⇒
number
Get the line drawing width
- rlEnableSmoothLines() ⇒
undefined
Enable line aliasing
- rlDisableSmoothLines() ⇒
undefined
Disable line aliasing
- rlEnableStereoRender() ⇒
undefined
Enable stereo rendering
- rlDisableStereoRender() ⇒
undefined
Disable stereo rendering
- rlIsStereoRenderEnabled() ⇒
boolean
Check if stereo render is enabled
- rlClearColor(r, g, b, a) ⇒
undefined
Clear color buffer with color
- rlClearScreenBuffers() ⇒
undefined
Clear used screen buffers (color and depth)
- rlCheckErrors() ⇒
undefined
Check and log OpenGL error codes
- rlSetBlendMode(mode) ⇒
undefined
Set blending mode
- rlSetBlendFactors(glSrcFactor, glDstFactor, glEquation) ⇒
undefined
Set blending mode factor and equation (using OpenGL factors)
- rlSetBlendFactorsSeparate(glSrcRGB, glDstRGB, glSrcAlpha, glDstAlpha, glEqRGB, glEqAlpha) ⇒
undefined
Set blending mode factors and equations separately (using OpenGL factors)
- rlglInit(width, height) ⇒
undefined
Initialize rlgl (buffers, shaders, textures, states)
- rlglClose() ⇒
undefined
De-initialize rlgl (buffers, shaders, textures)
- rlLoadExtensions(loader) ⇒
undefined
Load OpenGL extensions (loader function required)
- rlGetVersion() ⇒
number
Get current OpenGL version
- rlSetFramebufferWidth(width) ⇒
undefined
Set current framebuffer width
- rlGetFramebufferWidth() ⇒
number
Get default framebuffer width
- rlSetFramebufferHeight(height) ⇒
undefined
Set current framebuffer height
- rlGetFramebufferHeight() ⇒
number
Get default framebuffer height
- rlGetTextureIdDefault() ⇒
number
Get default texture id
- rlGetShaderIdDefault() ⇒
number
Get default shader id
- rlGetShaderLocsDefault() ⇒
number
Get default shader locations
- rlLoadRenderBatch(numBuffers, bufferElements) ⇒
rlRenderBatch
Load a render batch system
- rlUnloadRenderBatch(batch) ⇒
undefined
Unload render batch system
- rlDrawRenderBatch(batch) ⇒
undefined
Draw render batch data (Update->Draw->Reset)
- rlSetRenderBatchActive(batch) ⇒
undefined
Set the active render batch for rlgl (NULL for default internal)
- rlDrawRenderBatchActive() ⇒
undefined
Update and draw internal render batch
- rlCheckRenderBatchLimit(vCount) ⇒
boolean
Check internal buffer overflow for a given number of vertex
- rlSetTexture(id) ⇒
undefined
Set current texture for render batch and check buffers limits
- rlLoadVertexArray() ⇒
number
Load vertex array (vao) if supported
- rlLoadVertexBuffer(buffer, size, dynamic) ⇒
number
Load a vertex buffer attribute
- rlLoadVertexBufferElement(buffer, size, dynamic) ⇒
number
Load a new attributes element buffer
- rlUpdateVertexBuffer(bufferId, data, dataSize, offset) ⇒
undefined
Update GPU buffer with new data
- rlUpdateVertexBufferElements(id, data, dataSize, offset) ⇒
undefined
Update vertex buffer elements with new data
- rlSetVertexAttributeDefault(locIndex, value, attribType, count) ⇒
undefined
Set vertex attribute default value
- rlLoadTexture(data, width, height, format, mipmapCount) ⇒
number
Load texture in GPU
- rlLoadTextureDepth(width, height, useRenderBuffer) ⇒
number
Load depth texture/renderbuffer (to be attached to fbo)
- rlLoadTextureCubemap(data, size, format) ⇒
number
Load texture cubemap
- rlUpdateTexture(id, offsetX, offsetY, width, height, format, data) ⇒
undefined
Update GPU texture with new data
- rlGetGlTextureFormats(format, glInternalFormat, glFormat, glType) ⇒
undefined
Get OpenGL internal formats
- rlGetPixelFormatName(format) ⇒
string
Get name string for pixel format
- rlUnloadTexture(id) ⇒
undefined
Unload texture from GPU memory
- rlGenTextureMipmaps(id, width, height, format, mipmaps) ⇒
undefined
Generate mipmap data for selected texture
- rlReadTexturePixels(id, width, height, format) ⇒
number
Read texture pixel data
- rlReadScreenPixels(width, height) ⇒
Buffer
Read screen pixel data (color buffer)
- rlLoadFramebuffer(width, height) ⇒
number
Load an empty framebuffer
- rlFramebufferAttach(fboId, texId, attachType, texType, mipLevel) ⇒
undefined
Attach texture/renderbuffer to a framebuffer
- rlFramebufferComplete(id) ⇒
boolean
Verify framebuffer is complete
- rlUnloadFramebuffer(id) ⇒
undefined
Delete framebuffer from GPU
- rlLoadShaderCode(vsCode, fsCode) ⇒
number
Load shader from code strings
- rlCompileShader(shaderCode, type) ⇒
number
Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
- rlLoadShaderProgram(vShaderId, fShaderId) ⇒
number
Load custom shader program
- rlUnloadShaderProgram(id) ⇒
undefined
Unload shader program
- rlGetLocationUniform(shaderId, uniformName) ⇒
number
Get shader location uniform
- rlGetLocationAttrib(shaderId, attribName) ⇒
number
Get shader location attribute
- rlSetUniform(locIndex, value, uniformType, count) ⇒
undefined
Set shader value uniform
- rlSetUniformMatrix(locIndex, mat) ⇒
undefined
Set shader value matrix
- rlSetUniformSampler(locIndex, textureId) ⇒
undefined
Set shader value sampler
- rlSetShader(id, locs) ⇒
undefined
Set shader currently active (id and locations)
- rlLoadComputeShaderProgram(shaderId) ⇒
number
Load compute shader program
- rlComputeShaderDispatch(groupX, groupY, groupZ) ⇒
undefined
Dispatch compute shader (equivalent to draw for graphics pipeline)
- rlLoadShaderBuffer(size, data, usageHint) ⇒
number
Load shader storage buffer object (SSBO)
- rlUnloadShaderBuffer(ssboId) ⇒
undefined
Unload shader storage buffer object (SSBO)
- rlUpdateShaderBuffer(id, data, dataSize, offset) ⇒
undefined
Update SSBO buffer data
- rlBindShaderBuffer(id, index) ⇒
undefined
Bind SSBO buffer
- rlReadShaderBuffer(id, dest, count, offset) ⇒
undefined
Read SSBO buffer data (GPU->CPU)
- rlCopyShaderBuffer(destId, srcId, destOffset, srcOffset, count) ⇒
undefined
Copy SSBO data between buffers
- rlGetShaderBufferSize(id) ⇒
number
Get SSBO buffer size
- rlBindImageTexture(id, index, format, readonly) ⇒
undefined
Bind image texture
- rlGetMatrixModelview() ⇒
Matrix
Get internal modelview matrix
- rlGetMatrixProjection() ⇒
Matrix
Get internal projection matrix
- rlGetMatrixTransform() ⇒
Matrix
Get internal accumulated transform matrix
- rlGetMatrixProjectionStereo(eye) ⇒
Matrix
Get internal projection matrix for stereo render (selected eye)
- rlGetMatrixViewOffsetStereo(eye) ⇒
Matrix
Get internal view offset matrix for stereo render (selected eye)
- rlSetMatrixProjection(proj) ⇒
undefined
Set a custom projection matrix (replaces internal projection matrix)
- rlSetMatrixModelview(view) ⇒
undefined
Set a custom modelview matrix (replaces internal modelview matrix)
- rlSetMatrixProjectionStereo(right, left) ⇒
undefined
Set eyes projection matrices for stereo rendering
- rlSetMatrixViewOffsetStereo(right, left) ⇒
undefined
Set eyes view offsets matrices for stereo rendering
- rlLoadDrawCube() ⇒
undefined
Load and draw a cube
- rlLoadDrawQuad() ⇒
undefined
Load and draw a quad
- UpdateCamera(camera, mode) ⇒
undefined
Update camera position for selected mode
- ImageFormat(image, newFormat) ⇒
undefined
Convert image data to desired format
- ImageToPOT(image, fill) ⇒
undefined
Convert image to POT (power-of-two)
- ImageCrop(image, crop) ⇒
undefined
Crop an image to a defined rectangle
- ImageAlphaCrop(image, threshold) ⇒
undefined
Crop image depending on alpha value
- ImageAlphaClear(image, color, threshold) ⇒
undefined
Clear alpha channel to desired color
- ImageAlphaMask(image, alphaMask) ⇒
undefined
Apply alpha mask to image
- ImageAlphaPremultiply(image) ⇒
undefined
Premultiply alpha channel
- ImageResize(image, newWidth, newHeight) ⇒
undefined
Resize image (Bicubic scaling algorithm)
- ImageResizeNN(image, newWidth, newHeight) ⇒
undefined
Resize image (Nearest-Neighbor scaling algorithm)
- ImageResizeCanvas(image, newWidth, newHeight, offsetX, offsetY, fill) ⇒
undefined
Resize canvas and fill with color
- ImageMipmaps(image) ⇒
undefined
Compute all mipmap levels for a provided image
- ImageDither(image, rBpp, gBpp, bBpp, aBpp) ⇒
undefined
Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
- ImageFlipVertical(image) ⇒
undefined
Flip image vertically
- ImageFlipHorizontal(image) ⇒
undefined
Flip image horizontally
- ImageRotateCW(image) ⇒
undefined
Rotate image clockwise 90deg
- ImageRotateCCW(image) ⇒
undefined
Rotate image counter-clockwise 90deg
- ImageColorTint(image, color) ⇒
undefined
Modify image color: tint
- ImageColorInvert(image) ⇒
undefined
Modify image color: invert
- ImageColorGrayscale(image) ⇒
undefined
Modify image color: grayscale
- ImageColorContrast(image, contrast) ⇒
undefined
Modify image color: contrast (-100 to 100)
- ImageColorBrightness(image, brightness) ⇒
undefined
Modify image color: brightness (-255 to 255)
- ImageColorReplace(image, color, replace) ⇒
undefined
Modify image color: replace color
- ImageClearBackground(dst, color) ⇒
undefined
Clear image background with given color
- ImageDrawPixel(dst, posX, posY, color) ⇒
undefined
Draw pixel within an image
- ImageDrawPixelV(dst, position, color) ⇒
undefined
Draw pixel within an image (Vector version)
- ImageDrawLine(dst, startPosX, startPosY, endPosX, endPosY, color) ⇒
undefined
Draw line within an image
- ImageDrawLineV(dst, start, end, color) ⇒
undefined
Draw line within an image (Vector version)
- ImageDrawCircle(dst, centerX, centerY, radius, color) ⇒
undefined
Draw a filled circle within an image
- ImageDrawCircleV(dst, center, radius, color) ⇒
undefined
Draw a filled circle within an image (Vector version)
- ImageDrawRectangle(dst, posX, posY, width, height, color) ⇒
undefined
Draw rectangle within an image
- ImageDrawRectangleV(dst, position, size, color) ⇒
undefined
Draw rectangle within an image (Vector version)
- ImageDrawRectangleRec(dst, rec, color) ⇒
undefined
Draw rectangle within an image
- ImageDrawRectangleLines(dst, rec, thick, color) ⇒
undefined
Draw rectangle lines within an image
- ImageDraw(dst, src, srcRec, dstRec, tint) ⇒
undefined
Draw a source image within a destination image (tint applied to source)
- ImageDrawText(dst, text, posX, posY, fontSize, color) ⇒
undefined
Draw text (using default font) within an image (destination)
- ImageDrawTextEx(dst, font, text, position, fontSize, spacing, tint) ⇒
undefined
Draw text (custom sprite font) within an image (destination)
- GenTextureMipmaps(texture) ⇒
undefined
Generate GPU mipmaps for a texture
- UploadMesh(mesh, dynamic) ⇒
undefined
Upload mesh vertex data in GPU and provide VAO/VBO ids
- GenMeshTangents(mesh) ⇒
undefined
Compute mesh tangents
- SetModelMeshMaterial(model, meshId, materialId) ⇒
undefined
Set material for a mesh
- WaveCrop(wave, initSample, finalSample) ⇒
undefined
Crop a wave to defined samples range
- WaveFormat(wave, sampleRate, sampleSize, channels) ⇒
undefined
Convert wave data to desired format
- Color(r, g, b, a) ⇒
Color
Color, 4 components, R8G8B8A8 (32bit)
- Vector2(x, y) ⇒
Vector2
Vector2, 2 components
- Vector3(x, y, z) ⇒
Vector3
Vector3, 3 components
- Vector4(x, y, z, w) ⇒
Vector4
Vector4, 4 components
- Rectangle(x, y, width, height) ⇒
Rectangle
Rectangle, 4 components
- Camera2D(offset, target, rotation, zoom) ⇒
Camera2D
Camera2D, defines position/orientation in 2d space
- Camera3D(position, target, up, fovy, projection) ⇒
Camera3D
Camera, defines position/orientation in 3d space
- SetShaderFloat(shader, locIndex, value) ⇒
undefined
Set shader uniform value float
- SetShaderInt(shader, locIndex, value) ⇒
undefined
Set shader uniform value float
- SetShaderVec2(shader, locIndex, value) ⇒
undefined
Set shader uniform value vector2
- SetShaderVec3(shader, locIndex, value) ⇒
undefined
Set shader uniform value vector3
- SetShaderVec4(shader, locIndex, value) ⇒
undefined
Set shader uniform value vector4
InitWindow(width, height, title) ⇒ undefined
Initialize window and OpenGL context
Kind: global function
Param | Type |
---|---|
width | number |
height | number |
title | string |
WindowShouldClose() ⇒ boolean
Check if KEY_ESCAPE pressed or Close icon pressed
Kind: global function
Returns: boolean
- The resulting bool.
CloseWindow() ⇒ undefined
Close window and unload OpenGL context
IsWindowReady() ⇒ boolean
Check if window has been initialized successfully
Kind: global function
Returns: boolean
- The resulting bool.
IsWindowFullscreen() ⇒ boolean
Check if window is currently fullscreen
Kind: global function
Returns: boolean
- The resulting bool.
IsWindowHidden() ⇒ boolean
Check if window is currently hidden (only PLATFORM_DESKTOP)
Kind: global function
Returns: boolean
- The resulting bool.
IsWindowMinimized() ⇒ boolean
Check if window is currently minimized (only PLATFORM_DESKTOP)
Kind: global function
Returns: boolean
- The resulting bool.
IsWindowMaximized() ⇒ boolean
Check if window is currently maximized (only PLATFORM_DESKTOP)
Kind: global function
Returns: boolean
- The resulting bool.
IsWindowFocused() ⇒ boolean
Check if window is currently focused (only PLATFORM_DESKTOP)
Kind: global function
Returns: boolean
- The resulting bool.
IsWindowResized() ⇒ boolean
Check if window has been resized last frame
Kind: global function
Returns: boolean
- The resulting bool.
IsWindowState(flag) ⇒ boolean
Check if one specific window flag is enabled
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
flag | number |
SetWindowState(flags) ⇒ undefined
Set window configuration state using flags (only PLATFORM_DESKTOP)
Kind: global function
Param | Type |
---|---|
flags | number |
ClearWindowState(flags) ⇒ undefined
Clear window configuration state flags
Kind: global function
Param | Type |
---|---|
flags | number |
ToggleFullscreen() ⇒ undefined
Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
MaximizeWindow() ⇒ undefined
Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
MinimizeWindow() ⇒ undefined
Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
RestoreWindow() ⇒ undefined
Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
SetWindowIcon(image) ⇒ undefined
Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
Kind: global function
Param | Type |
---|---|
image | Image |
SetWindowIcons(images, count) ⇒ undefined
Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
Kind: global function
Param | Type |
---|---|
images | number |
count | number |
SetWindowTitle(title) ⇒ undefined
Set title for window (only PLATFORM_DESKTOP)
Kind: global function
Param | Type |
---|---|
title | string |
SetWindowPosition(x, y) ⇒ undefined
Set window position on screen (only PLATFORM_DESKTOP)
Kind: global function
Param | Type |
---|---|
x | number |
y | number |
SetWindowMonitor(monitor) ⇒ undefined
Set monitor for the current window (fullscreen mode)
Kind: global function
Param | Type |
---|---|
monitor | number |
SetWindowMinSize(width, height) ⇒ undefined
Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
Kind: global function
Param | Type |
---|---|
width | number |
height | number |
SetWindowSize(width, height) ⇒ undefined
Set window dimensions
Kind: global function
Param | Type |
---|---|
width | number |
height | number |
SetWindowOpacity(opacity) ⇒ undefined
Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
Kind: global function
Param | Type |
---|---|
opacity | number |
GetWindowHandle() ⇒ number
Get native window handle
Kind: global function
Returns: number
- The resulting void *.
GetScreenWidth() ⇒ number
Get current screen width
Kind: global function
Returns: number
- The resulting int.
GetScreenHeight() ⇒ number
Get current screen height
Kind: global function
Returns: number
- The resulting int.
GetRenderWidth() ⇒ number
Get current render width (it considers HiDPI)
Kind: global function
Returns: number
- The resulting int.
GetRenderHeight() ⇒ number
Get current render height (it considers HiDPI)
Kind: global function
Returns: number
- The resulting int.
GetMonitorCount() ⇒ number
Get number of connected monitors
Kind: global function
Returns: number
- The resulting int.
GetCurrentMonitor() ⇒ number
Get current connected monitor
Kind: global function
Returns: number
- The resulting int.
GetMonitorPosition(monitor) ⇒ Vector2
Get specified monitor position
Kind: global function
Returns: Vector2
- The resulting Vector2.
Param | Type |
---|---|
monitor | number |
GetMonitorWidth(monitor) ⇒ number
Get specified monitor width (current video mode used by monitor)
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
monitor | number |
GetMonitorHeight(monitor) ⇒ number
Get specified monitor height (current video mode used by monitor)
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
monitor | number |
GetMonitorPhysicalWidth(monitor) ⇒ number
Get specified monitor physical width in millimetres
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
monitor | number |
GetMonitorPhysicalHeight(monitor) ⇒ number
Get specified monitor physical height in millimetres
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
monitor | number |
GetMonitorRefreshRate(monitor) ⇒ number
Get specified monitor refresh rate
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
monitor | number |
GetWindowPosition() ⇒ Vector2
Get window position XY on monitor
Kind: global function
Returns: Vector2
- The resulting Vector2.
GetWindowScaleDPI() ⇒ Vector2
Get window scale DPI factor
Kind: global function
Returns: Vector2
- The resulting Vector2.
GetMonitorName(monitor) ⇒ string
Get the human-readable, UTF-8 encoded name of the primary monitor
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
monitor | number |
SetClipboardText(text) ⇒ undefined
Set clipboard text content
Kind: global function
Param | Type |
---|---|
text | string |
GetClipboardText() ⇒ string
Get clipboard text content
Kind: global function
Returns: string
- The resulting const char *.
EnableEventWaiting() ⇒ undefined
Enable waiting for events on EndDrawing(), no automatic event polling
DisableEventWaiting() ⇒ undefined
Disable waiting for events on EndDrawing(), automatic events polling
SwapScreenBuffer() ⇒ undefined
Swap back buffer with front buffer (screen drawing)
PollInputEvents() ⇒ undefined
Register all input events
WaitTime(seconds) ⇒ undefined
Wait for some time (halt program execution)
Kind: global function
Param | Type |
---|---|
seconds | number |
ShowCursor() ⇒ undefined
Shows cursor
HideCursor() ⇒ undefined
Hides cursor
IsCursorHidden() ⇒ boolean
Check if cursor is not visible
Kind: global function
Returns: boolean
- The resulting bool.
EnableCursor() ⇒ undefined
Enables cursor (unlock cursor)
DisableCursor() ⇒ undefined
Disables cursor (lock cursor)
IsCursorOnScreen() ⇒ boolean
Check if cursor is on the screen
Kind: global function
Returns: boolean
- The resulting bool.
ClearBackground(color) ⇒ undefined
Set background color (framebuffer clear color)
Kind: global function
Param | Type |
---|---|
color | Color |
BeginDrawing() ⇒ undefined
Setup canvas (framebuffer) to start drawing
EndDrawing() ⇒ undefined
End canvas drawing and swap buffers (double buffering)
BeginMode2D(camera) ⇒ undefined
Begin 2D mode with custom camera (2D)
Kind: global function
Param | Type |
---|---|
camera | Camera2D |
EndMode2D() ⇒ undefined
Ends 2D mode with custom camera
BeginMode3D(camera) ⇒ undefined
Begin 3D mode with custom camera (3D)
Kind: global function
Param | Type |
---|---|
camera | Camera3D |
EndMode3D() ⇒ undefined
Ends 3D mode and returns to default 2D orthographic mode
BeginTextureMode(target) ⇒ undefined
Begin drawing to render texture
Kind: global function
Param | Type |
---|---|
target | RenderTexture |
EndTextureMode() ⇒ undefined
Ends drawing to render texture
BeginShaderMode(shader) ⇒ undefined
Begin custom shader drawing
Kind: global function
Param | Type |
---|---|
shader | Shader |
EndShaderMode() ⇒ undefined
End custom shader drawing (use default shader)
BeginBlendMode(mode) ⇒ undefined
Begin blending mode (alpha, additive, multiplied, subtract, custom)
Kind: global function
Param | Type |
---|---|
mode | number |
EndBlendMode() ⇒ undefined
End blending mode (reset to default: alpha blending)
BeginScissorMode(x, y, width, height) ⇒ undefined
Begin scissor mode (define screen area for following drawing)
Kind: global function
Param | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
EndScissorMode() ⇒ undefined
End scissor mode
EndVrStereoMode() ⇒ undefined
End stereo rendering (requires VR simulator)
LoadShader(vsFileName, fsFileName) ⇒ Shader
Load shader from files and bind default locations
Kind: global function
Returns: Shader
- The resulting Shader.
Param | Type |
---|---|
vsFileName | string |
fsFileName | string |
LoadShaderFromMemory(vsCode, fsCode) ⇒ Shader
Load shader from code strings and bind default locations
Kind: global function
Returns: Shader
- The resulting Shader.
Param | Type |
---|---|
vsCode | string |
fsCode | string |
IsShaderReady(shader) ⇒ boolean
Check if a shader is ready
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
shader | Shader |
GetShaderLocation(shader, uniformName) ⇒ number
Get shader uniform location
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
shader | Shader |
uniformName | string |
GetShaderLocationAttrib(shader, attribName) ⇒ number
Get shader attribute location
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
shader | Shader |
attribName | string |
SetShaderValueMatrix(shader, locIndex, mat) ⇒ undefined
Set shader uniform value (matrix 4x4)
Kind: global function
Param | Type |
---|---|
shader | Shader |
locIndex | number |
mat | Matrix |
SetShaderValueTexture(shader, locIndex, texture) ⇒ undefined
Set shader uniform value for texture (sampler2d)
Kind: global function
Param | Type |
---|---|
shader | Shader |
locIndex | number |
texture | Texture |
UnloadShader(shader) ⇒ undefined
Unload shader from GPU memory (VRAM)
Kind: global function
Param | Type |
---|---|
shader | Shader |
GetMouseRay(mousePosition, camera) ⇒ Ray
Get a ray trace from mouse position
Kind: global function
Returns: Ray
- The resulting Ray.
Param | Type |
---|---|
mousePosition | Vector2 |
camera | Camera3D |
GetCameraMatrix(camera) ⇒ Matrix
Get camera transform matrix (view matrix)
Kind: global function
Returns: Matrix
- The resulting Matrix.
Param | Type |
---|---|
camera | Camera3D |
GetCameraMatrix2D(camera) ⇒ Matrix
Get camera 2d transform matrix
Kind: global function
Returns: Matrix
- The resulting Matrix.
Param | Type |
---|---|
camera | Camera2D |
GetWorldToScreen(position, camera) ⇒ Vector2
Get the screen space position for a 3d world space position
Kind: global function
Returns: Vector2
- The resulting Vector2.
Param | Type |
---|---|
position | Vector3 |
camera | Camera3D |
GetScreenToWorld2D(position, camera) ⇒ Vector2
Get the world space position for a 2d camera screen space position
Kind: global function
Returns: Vector2
- The resulting Vector2.
Param | Type |
---|---|
position | Vector2 |
camera | Camera2D |
GetWorldToScreenEx(position, camera, width, height) ⇒ Vector2
Get size position for a 3d world space position
Kind: global function
Returns: Vector2
- The resulting Vector2.
Param | Type |
---|---|
position | Vector3 |
camera | Camera3D |
width | number |
height | number |
GetWorldToScreen2D(position, camera) ⇒ Vector2
Get the screen space position for a 2d camera world space position
Kind: global function
Returns: Vector2
- The resulting Vector2.
Param | Type |
---|---|
position | Vector2 |
camera | Camera2D |
SetTargetFPS(fps) ⇒ undefined
Set target FPS (maximum)
Kind: global function
Param | Type |
---|---|
fps | number |
GetFPS() ⇒ number
Get current FPS
Kind: global function
Returns: number
- The resulting int.
GetFrameTime() ⇒ number
Get time in seconds for last frame drawn (delta time)
Kind: global function
Returns: number
- The resulting float.
GetTime() ⇒ number
Get elapsed time in seconds since InitWindow()
Kind: global function
Returns: number
- The resulting double.
GetRandomValue(min, max) ⇒ number
Get a random value between min and max (both included)
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
min | number |
max | number |
SetRandomSeed(seed) ⇒ undefined
Set the seed for the random number generator
Kind: global function
Param | Type |
---|---|
seed | number |
TakeScreenshot(fileName) ⇒ undefined
Takes a screenshot of current screen (filename extension defines format)
Kind: global function
Param | Type |
---|---|
fileName | string |
SetConfigFlags(flags) ⇒ undefined
Setup init configuration flags (view FLAGS)
Kind: global function
Param | Type |
---|---|
flags | number |
SetTraceLogLevel(logLevel) ⇒ undefined
Set the current threshold (minimum) log level
Kind: global function
Param | Type |
---|---|
logLevel | number |
MemAlloc(size) ⇒ number
Internal memory allocator
Kind: global function
Returns: number
- The resulting void *.
Param | Type |
---|---|
size | number |
MemRealloc(ptr, size) ⇒ number
Internal memory reallocator
Kind: global function
Returns: number
- The resulting void *.
Param | Type |
---|---|
ptr | number |
size | number |
MemFree(ptr) ⇒ undefined
Internal memory free
Kind: global function
Param | Type |
---|---|
ptr | number |
OpenURL(url) ⇒ undefined
Open URL with default system browser (if available)
Kind: global function
Param | Type |
---|---|
url | string |
LoadFileData(fileName, bytesRead) ⇒ Buffer
Load file data as byte array (read)
Kind: global function
Returns: Buffer
- The resulting unsigned char *.
Param | Type |
---|---|
fileName | string |
bytesRead | number |
UnloadFileData(data) ⇒ undefined
Unload file data allocated by LoadFileData()
Kind: global function
Param | Type |
---|---|
data | Buffer |
SaveFileData(fileName, data, bytesToWrite) ⇒ boolean
Save data to file from byte array (write), returns true on success
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
fileName | string |
data | number |
bytesToWrite | number |
ExportDataAsCode(data, size, fileName) ⇒ boolean
Export data to code (.h), returns true on success
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
data | Buffer |
size | number |
fileName | string |
LoadFileText(fileName) ⇒ string
Load text data from file (read), returns a ‘\0’ terminated string
Kind: global function
Returns: string
- The resulting char *.
Param | Type |
---|---|
fileName | string |
UnloadFileText(text) ⇒ undefined
Unload file text data allocated by LoadFileText()
Kind: global function
Param | Type |
---|---|
text | string |
SaveFileText(fileName, text) ⇒ boolean
Save text data to file (write), string must be ‘\0’ terminated, returns true on success
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
fileName | string |
text | string |
FileExists(fileName) ⇒ boolean
Check if file exists
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
fileName | string |
DirectoryExists(dirPath) ⇒ boolean
Check if a directory path exists
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
dirPath | string |
IsFileExtension(fileName, ext) ⇒ boolean
Check file extension (including point: .png, .wav)
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
fileName | string |
ext | string |
GetFileLength(fileName) ⇒ number
Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
fileName | string |
GetFileExtension(fileName) ⇒ string
Get pointer to extension for a filename string (includes dot: ‘.png’)
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
fileName | string |
GetFileName(filePath) ⇒ string
Get pointer to filename for a path string
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
filePath | string |
GetFileNameWithoutExt(filePath) ⇒ string
Get filename string without extension (uses static string)
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
filePath | string |
GetDirectoryPath(filePath) ⇒ string
Get full path for a given fileName with path (uses static string)
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
filePath | string |
GetPrevDirectoryPath(dirPath) ⇒ string
Get previous directory path for a given path (uses static string)
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
dirPath | string |
GetWorkingDirectory() ⇒ string
Get current working directory (uses static string)
Kind: global function
Returns: string
- The resulting const char *.
GetApplicationDirectory() ⇒ string
Get the directory if the running application (uses static string)
Kind: global function
Returns: string
- The resulting const char *.
ChangeDirectory(dir) ⇒ boolean
Change working directory, return true on success
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
dir | string |
IsPathFile(path) ⇒ boolean
Check if a given path is a file or a directory
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
path | string |
LoadDirectoryFiles(dirPath) ⇒ FilePathList
Load directory filepaths
Kind: global function
Returns: FilePathList
- The resulting FilePathList.
Param | Type |
---|---|
dirPath | string |
LoadDirectoryFilesEx(basePath, filter, scanSubdirs) ⇒ FilePathList
Load directory filepaths with extension filtering and recursive directory scan
Kind: global function
Returns: FilePathList
- The resulting FilePathList.
Param | Type |
---|---|
basePath | string |
filter | string |
scanSubdirs | boolean |
UnloadDirectoryFiles(files) ⇒ undefined
Unload filepaths
Kind: global function
Param | Type |
---|---|
files | FilePathList |
IsFileDropped() ⇒ boolean
Check if a file has been dropped into window
Kind: global function
Returns: boolean
- The resulting bool.
LoadDroppedFiles() ⇒ FilePathList
Load dropped filepaths
Kind: global function
Returns: FilePathList
- The resulting FilePathList.
UnloadDroppedFiles(files) ⇒ undefined
Unload dropped filepaths
Kind: global function
Param | Type |
---|---|
files | FilePathList |
GetFileModTime(fileName) ⇒ number
Get file modification time (last write time)
Kind: global function
Returns: number
- The resulting long.
Param | Type |
---|---|
fileName | string |
CompressData(data, dataSize, compDataSize) ⇒ Buffer
Compress data (DEFLATE algorithm), memory must be MemFree()
Kind: global function
Returns: Buffer
- The resulting unsigned char *.
Param | Type |
---|---|
data | Buffer |
dataSize | number |
compDataSize | number |
DecompressData(compData, compDataSize, dataSize) ⇒ Buffer
Decompress data (DEFLATE algorithm), memory must be MemFree()
Kind: global function
Returns: Buffer
- The resulting unsigned char *.
Param | Type |
---|---|
compData | Buffer |
compDataSize | number |
dataSize | number |
EncodeDataBase64(data, dataSize, outputSize) ⇒ string
Encode data to Base64 string, memory must be MemFree()
Kind: global function
Returns: string
- The resulting char *.
Param | Type |
---|---|
data | Buffer |
dataSize | number |
outputSize | number |
DecodeDataBase64(data, outputSize) ⇒ Buffer
Decode Base64 string data, memory must be MemFree()
Kind: global function
Returns: Buffer
- The resulting unsigned char *.
Param | Type |
---|---|
data | Buffer |
outputSize | number |
IsKeyPressed(key) ⇒ boolean
Check if a key has been pressed once
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
key | number |
IsKeyDown(key) ⇒ boolean
Check if a key is being pressed
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
key | number |
IsKeyReleased(key) ⇒ boolean
Check if a key has been released once
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
key | number |
IsKeyUp(key) ⇒ boolean
Check if a key is NOT being pressed
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
key | number |
SetExitKey(key) ⇒ undefined
Set a custom key to exit program (default is ESC)
Kind: global function
Param | Type |
---|---|
key | number |
GetKeyPressed() ⇒ number
Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
Kind: global function
Returns: number
- The resulting int.
GetCharPressed() ⇒ number
Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
Kind: global function
Returns: number
- The resulting int.
IsGamepadAvailable(gamepad) ⇒ boolean
Check if a gamepad is available
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
gamepad | number |
GetGamepadName(gamepad) ⇒ string
Get gamepad internal name id
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
gamepad | number |
IsGamepadButtonPressed(gamepad, button) ⇒ boolean
Check if a gamepad button has been pressed once
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
gamepad | number |
button | number |
IsGamepadButtonDown(gamepad, button) ⇒ boolean
Check if a gamepad button is being pressed
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
gamepad | number |
button | number |
IsGamepadButtonReleased(gamepad, button) ⇒ boolean
Check if a gamepad button has been released once
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
gamepad | number |
button | number |
IsGamepadButtonUp(gamepad, button) ⇒ boolean
Check if a gamepad button is NOT being pressed
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
gamepad | number |
button | number |
GetGamepadButtonPressed() ⇒ number
Get the last gamepad button pressed
Kind: global function
Returns: number
- The resulting int.
GetGamepadAxisCount(gamepad) ⇒ number
Get gamepad axis count for a gamepad
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
gamepad | number |
GetGamepadAxisMovement(gamepad, axis) ⇒ number
Get axis movement value for a gamepad axis
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
gamepad | number |
axis | number |
SetGamepadMappings(mappings) ⇒ number
Set internal gamepad mappings (SDL_GameControllerDB)
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
mappings | string |
IsMouseButtonPressed(button) ⇒ boolean
Check if a mouse button has been pressed once
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
button | number |
IsMouseButtonDown(button) ⇒ boolean
Check if a mouse button is being pressed
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
button | number |
IsMouseButtonReleased(button) ⇒ boolean
Check if a mouse button has been released once
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
button | number |
IsMouseButtonUp(button) ⇒ boolean
Check if a mouse button is NOT being pressed
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
button | number |
GetMouseX() ⇒ number
Get mouse position X
Kind: global function
Returns: number
- The resulting int.
GetMouseY() ⇒ number
Get mouse position Y
Kind: global function
Returns: number
- The resulting int.
GetMousePosition() ⇒ Vector2
Get mouse position XY
Kind: global function
Returns: Vector2
- The resulting Vector2.
GetMouseDelta() ⇒ Vector2
Get mouse delta between frames
Kind: global function
Returns: Vector2
- The resulting Vector2.
SetMousePosition(x, y) ⇒ undefined
Set mouse position XY
Kind: global function
Param | Type |
---|---|
x | number |
y | number |
SetMouseOffset(offsetX, offsetY) ⇒ undefined
Set mouse offset
Kind: global function
Param | Type |
---|---|
offsetX | number |
offsetY | number |
SetMouseScale(scaleX, scaleY) ⇒ undefined
Set mouse scaling
Kind: global function
Param | Type |
---|---|
scaleX | number |
scaleY | number |
GetMouseWheelMove() ⇒ number
Get mouse wheel movement for X or Y, whichever is larger
Kind: global function
Returns: number
- The resulting float.
GetMouseWheelMoveV() ⇒ Vector2
Get mouse wheel movement for both X and Y
Kind: global function
Returns: Vector2
- The resulting Vector2.
SetMouseCursor(cursor) ⇒ undefined
Set mouse cursor
Kind: global function
Param | Type |
---|---|
cursor | number |
GetTouchX() ⇒ number
Get touch position X for touch point 0 (relative to screen size)
Kind: global function
Returns: number
- The resulting int.
GetTouchY() ⇒ number
Get touch position Y for touch point 0 (relative to screen size)
Kind: global function
Returns: number
- The resulting int.
GetTouchPosition(index) ⇒ Vector2
Get touch position XY for a touch point index (relative to screen size)
Kind: global function
Returns: Vector2
- The resulting Vector2.
Param | Type |
---|---|
index | number |
GetTouchPointId(index) ⇒ number
Get touch point identifier for given index
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
index | number |
GetTouchPointCount() ⇒ number
Get number of touch points
Kind: global function
Returns: number
- The resulting int.
SetGesturesEnabled(flags) ⇒ undefined
Enable a set of gestures using flags
Kind: global function
Param | Type |
---|---|
flags | number |
IsGestureDetected(gesture) ⇒ boolean
Check if a gesture have been detected
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
gesture | number |
GetGestureDetected() ⇒ number
Get latest detected gesture
Kind: global function
Returns: number
- The resulting int.
GetGestureHoldDuration() ⇒ number
Get gesture hold time in milliseconds
Kind: global function
Returns: number
- The resulting float.
GetGestureDragVector() ⇒ Vector2
Get gesture drag vector
Kind: global function
Returns: Vector2
- The resulting Vector2.
GetGestureDragAngle() ⇒ number
Get gesture drag angle
Kind: global function
Returns: number
- The resulting float.
GetGesturePinchVector() ⇒ Vector2
Get gesture pinch delta
Kind: global function
Returns: Vector2
- The resulting Vector2.
GetGesturePinchAngle() ⇒ number
Get gesture pinch angle
Kind: global function
Returns: number
- The resulting float.
UpdateCameraPro(camera, movement, rotation, zoom) ⇒ undefined
Update camera movement/rotation
Kind: global function
Param | Type |
---|---|
camera | number |
movement | Vector3 |
rotation | Vector3 |
zoom | number |
SetShapesTexture(texture, source) ⇒ undefined
Set texture and rectangle to be used on shapes drawing
Kind: global function
Param | Type |
---|---|
texture | Texture |
source | Rectangle |
DrawPixel(posX, posY, color) ⇒ undefined
Draw a pixel
Kind: global function
Param | Type |
---|---|
posX | number |
posY | number |
color | Color |
DrawPixelV(position, color) ⇒ undefined
Draw a pixel (Vector version)
Kind: global function
Param | Type |
---|---|
position | Vector2 |
color | Color |
DrawLine(startPosX, startPosY, endPosX, endPosY, color) ⇒ undefined
Draw a line
Kind: global function
Param | Type |
---|---|
startPosX | number |
startPosY | number |
endPosX | number |
endPosY | number |
color | Color |
DrawLineV(startPos, endPos, color) ⇒ undefined
Draw a line (Vector version)
Kind: global function
Param | Type |
---|---|
startPos | Vector2 |
endPos | Vector2 |
color | Color |
DrawLineEx(startPos, endPos, thick, color) ⇒ undefined
Draw a line defining thickness
Kind: global function
Param | Type |
---|---|
startPos | Vector2 |
endPos | Vector2 |
thick | number |
color | Color |
DrawLineBezier(startPos, endPos, thick, color) ⇒ undefined
Draw a line using cubic-bezier curves in-out
Kind: global function
Param | Type |
---|---|
startPos | Vector2 |
endPos | Vector2 |
thick | number |
color | Color |
DrawLineBezierQuad(startPos, endPos, controlPos, thick, color) ⇒ undefined
Draw line using quadratic bezier curves with a control point
Kind: global function
Param | Type |
---|---|
startPos | Vector2 |
endPos | Vector2 |
controlPos | Vector2 |
thick | number |
color | Color |
DrawLineBezierCubic(startPos, endPos, startControlPos, endControlPos, thick, color) ⇒ undefined
Draw line using cubic bezier curves with 2 control points
Kind: global function
Param | Type |
---|---|
startPos | Vector2 |
endPos | Vector2 |
startControlPos | Vector2 |
endControlPos | Vector2 |
thick | number |
color | Color |
DrawLineStrip(points, pointCount, color) ⇒ undefined
Draw lines sequence
Kind: global function
Param | Type |
---|---|
points | number |
pointCount | number |
color | Color |
DrawCircle(centerX, centerY, radius, color) ⇒ undefined
Draw a color-filled circle
Kind: global function
Param | Type |
---|---|
centerX | number |
centerY | number |
radius | number |
color | Color |
DrawCircleSector(center, radius, startAngle, endAngle, segments, color) ⇒ undefined
Draw a piece of a circle
Kind: global function
Param | Type |
---|---|
center | Vector2 |
radius | number |
startAngle | number |
endAngle | number |
segments | number |
color | Color |
DrawCircleSectorLines(center, radius, startAngle, endAngle, segments, color) ⇒ undefined
Draw circle sector outline
Kind: global function
Param | Type |
---|---|
center | Vector2 |
radius | number |
startAngle | number |
endAngle | number |
segments | number |
color | Color |
DrawCircleGradient(centerX, centerY, radius, color1, color2) ⇒ undefined
Draw a gradient-filled circle
Kind: global function
Param | Type |
---|---|
centerX | number |
centerY | number |
radius | number |
color1 | Color |
color2 | Color |
DrawCircleV(center, radius, color) ⇒ undefined
Draw a color-filled circle (Vector version)
Kind: global function
Param | Type |
---|---|
center | Vector2 |
radius | number |
color | Color |
DrawCircleLines(centerX, centerY, radius, color) ⇒ undefined
Draw circle outline
Kind: global function
Param | Type |
---|---|
centerX | number |
centerY | number |
radius | number |
color | Color |
DrawEllipse(centerX, centerY, radiusH, radiusV, color) ⇒ undefined
Draw ellipse
Kind: global function
Param | Type |
---|---|
centerX | number |
centerY | number |
radiusH | number |
radiusV | number |
color | Color |
DrawEllipseLines(centerX, centerY, radiusH, radiusV, color) ⇒ undefined
Draw ellipse outline
Kind: global function
Param | Type |
---|---|
centerX | number |
centerY | number |
radiusH | number |
radiusV | number |
color | Color |
DrawRing(center, innerRadius, outerRadius, startAngle, endAngle, segments, color) ⇒ undefined
Draw ring
Kind: global function
Param | Type |
---|---|
center | Vector2 |
innerRadius | number |
outerRadius | number |
startAngle | number |
endAngle | number |
segments | number |
color | Color |
DrawRingLines(center, innerRadius, outerRadius, startAngle, endAngle, segments, color) ⇒ undefined
Draw ring outline
Kind: global function
Param | Type |
---|---|
center | Vector2 |
innerRadius | number |
outerRadius | number |
startAngle | number |
endAngle | number |
segments | number |
color | Color |
DrawRectangle(posX, posY, width, height, color) ⇒ undefined
Draw a color-filled rectangle
Kind: global function
Param | Type |
---|---|
posX | number |
posY | number |
width | number |
height | number |
color | Color |
DrawRectangleV(position, size, color) ⇒ undefined
Draw a color-filled rectangle (Vector version)
Kind: global function
Param | Type |
---|---|
position | Vector2 |
size | Vector2 |
color | Color |
DrawRectangleRec(rec, color) ⇒ undefined
Draw a color-filled rectangle
Kind: global function
Param | Type |
---|---|
rec | Rectangle |
color | Color |
DrawRectanglePro(rec, origin, rotation, color) ⇒ undefined
Draw a color-filled rectangle with pro parameters
Kind: global function
Param | Type |
---|---|
rec | Rectangle |
origin | Vector2 |
rotation | number |
color | Color |
DrawRectangleGradientV(posX, posY, width, height, color1, color2) ⇒ undefined
Draw a vertical-gradient-filled rectangle
Kind: global function
Param | Type |
---|---|
posX | number |
posY | number |
width | number |
height | number |
color1 | Color |
color2 | Color |
DrawRectangleGradientH(posX, posY, width, height, color1, color2) ⇒ undefined
Draw a horizontal-gradient-filled rectangle
Kind: global function
Param | Type |
---|---|
posX | number |
posY | number |
width | number |
height | number |
color1 | Color |
color2 | Color |
DrawRectangleGradientEx(rec, col1, col2, col3, col4) ⇒ undefined
Draw a gradient-filled rectangle with custom vertex colors
Kind: global function
Param | Type |
---|---|
rec | Rectangle |
col1 | Color |
col2 | Color |
col3 | Color |
col4 | Color |
DrawRectangleLines(posX, posY, width, height, color) ⇒ undefined
Draw rectangle outline
Kind: global function
Param | Type |
---|---|
posX | number |
posY | number |
width | number |
height | number |
color | Color |
DrawRectangleLinesEx(rec, lineThick, color) ⇒ undefined
Draw rectangle outline with extended parameters
Kind: global function
Param | Type |
---|---|
rec | Rectangle |
lineThick | number |
color | Color |
DrawRectangleRounded(rec, roundness, segments, color) ⇒ undefined
Draw rectangle with rounded edges
Kind: global function
Param | Type |
---|---|
rec | Rectangle |
roundness | number |
segments | number |
color | Color |
DrawRectangleRoundedLines(rec, roundness, segments, lineThick, color) ⇒ undefined
Draw rectangle with rounded edges outline
Kind: global function
Param | Type |
---|---|
rec | Rectangle |
roundness | number |
segments | number |
lineThick | number |
color | Color |
DrawTriangle(v1, v2, v3, color) ⇒ undefined
Draw a color-filled triangle (vertex in counter-clockwise order!)
Kind: global function
Param | Type |
---|---|
v1 | Vector2 |
v2 | Vector2 |
v3 | Vector2 |
color | Color |
DrawTriangleLines(v1, v2, v3, color) ⇒ undefined
Draw triangle outline (vertex in counter-clockwise order!)
Kind: global function
Param | Type |
---|---|
v1 | Vector2 |
v2 | Vector2 |
v3 | Vector2 |
color | Color |
DrawTriangleFan(points, pointCount, color) ⇒ undefined
Draw a triangle fan defined by points (first vertex is the center)
Kind: global function
Param | Type |
---|---|
points | number |
pointCount | number |
color | Color |
DrawTriangleStrip(points, pointCount, color) ⇒ undefined
Draw a triangle strip defined by points
Kind: global function
Param | Type |
---|---|
points | number |
pointCount | number |
color | Color |
DrawPoly(center, sides, radius, rotation, color) ⇒ undefined
Draw a regular polygon (Vector version)
Kind: global function
Param | Type |
---|---|
center | Vector2 |
sides | number |
radius | number |
rotation | number |
color | Color |
DrawPolyLines(center, sides, radius, rotation, color) ⇒ undefined
Draw a polygon outline of n sides
Kind: global function
Param | Type |
---|---|
center | Vector2 |
sides | number |
radius | number |
rotation | number |
color | Color |
DrawPolyLinesEx(center, sides, radius, rotation, lineThick, color) ⇒ undefined
Draw a polygon outline of n sides with extended parameters
Kind: global function
Param | Type |
---|---|
center | Vector2 |
sides | number |
radius | number |
rotation | number |
lineThick | number |
color | Color |
CheckCollisionRecs(rec1, rec2) ⇒ boolean
Check collision between two rectangles
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
rec1 | Rectangle |
rec2 | Rectangle |
CheckCollisionCircles(center1, radius1, center2, radius2) ⇒ boolean
Check collision between two circles
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
center1 | Vector2 |
radius1 | number |
center2 | Vector2 |
radius2 | number |
CheckCollisionCircleRec(center, radius, rec) ⇒ boolean
Check collision between circle and rectangle
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
center | Vector2 |
radius | number |
rec | Rectangle |
CheckCollisionPointRec(point, rec) ⇒ boolean
Check if point is inside rectangle
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
point | Vector2 |
rec | Rectangle |
CheckCollisionPointCircle(point, center, radius) ⇒ boolean
Check if point is inside circle
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
point | Vector2 |
center | Vector2 |
radius | number |
CheckCollisionPointTriangle(point, p1, p2, p3) ⇒ boolean
Check if point is inside a triangle
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
point | Vector2 |
p1 | Vector2 |
p2 | Vector2 |
p3 | Vector2 |
CheckCollisionPointPoly(point, points, pointCount) ⇒ boolean
Check if point is within a polygon described by array of vertices
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
point | Vector2 |
points | number |
pointCount | number |
CheckCollisionLines(startPos1, endPos1, startPos2, endPos2, collisionPoint) ⇒ boolean
Check the collision between two lines defined by two points each, returns collision point by reference
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
startPos1 | Vector2 |
endPos1 | Vector2 |
startPos2 | Vector2 |
endPos2 | Vector2 |
collisionPoint | number |
CheckCollisionPointLine(point, p1, p2, threshold) ⇒ boolean
Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
point | Vector2 |
p1 | Vector2 |
p2 | Vector2 |
threshold | number |
GetCollisionRec(rec1, rec2) ⇒ Rectangle
Get collision rectangle for two rectangles collision
Kind: global function
Returns: Rectangle
- The resulting Rectangle.
Param | Type |
---|---|
rec1 | Rectangle |
rec2 | Rectangle |
LoadImage(fileName) ⇒ Image
Load image from file into CPU memory (RAM)
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
fileName | string |
LoadImageRaw(fileName, width, height, format, headerSize) ⇒ Image
Load image from RAW file data
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
fileName | string |
width | number |
height | number |
format | number |
headerSize | number |
LoadImageAnim(fileName, frames) ⇒ Image
Load image sequence from file (frames appended to image.data)
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
fileName | string |
frames | number |
LoadImageFromMemory(fileType, fileData, dataSize) ⇒ Image
Load image from memory buffer, fileType refers to extension: i.e. ‘.png’
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
fileType | string |
fileData | Buffer |
dataSize | number |
LoadImageFromTexture(texture) ⇒ Image
Load image from GPU texture data
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
texture | Texture |
LoadImageFromScreen() ⇒ Image
Load image from screen buffer and (screenshot)
Kind: global function
Returns: Image
- The resulting Image.
IsImageReady(image) ⇒ boolean
Check if an image is ready
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
image | Image |
UnloadImage(image) ⇒ undefined
Unload image from CPU memory (RAM)
Kind: global function
Param | Type |
---|---|
image | Image |
ExportImage(image, fileName) ⇒ boolean
Export image data to file, returns true on success
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
image | Image |
fileName | string |
ExportImageAsCode(image, fileName) ⇒ boolean
Export image as code file defining an array of bytes, returns true on success
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
image | Image |
fileName | string |
GenImageColor(width, height, color) ⇒ Image
Generate image: plain color
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
width | number |
height | number |
color | Color |
GenImageGradientV(width, height, top, bottom) ⇒ Image
Generate image: vertical gradient
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
width | number |
height | number |
top | Color |
bottom | Color |
GenImageGradientH(width, height, left, right) ⇒ Image
Generate image: horizontal gradient
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
width | number |
height | number |
left | Color |
right | Color |
GenImageGradientRadial(width, height, density, inner, outer) ⇒ Image
Generate image: radial gradient
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
width | number |
height | number |
density | number |
inner | Color |
outer | Color |
GenImageChecked(width, height, checksX, checksY, col1, col2) ⇒ Image
Generate image: checked
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
width | number |
height | number |
checksX | number |
checksY | number |
col1 | Color |
col2 | Color |
GenImageWhiteNoise(width, height, factor) ⇒ Image
Generate image: white noise
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
width | number |
height | number |
factor | number |
GenImagePerlinNoise(width, height, offsetX, offsetY, scale) ⇒ Image
Generate image: perlin noise
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
width | number |
height | number |
offsetX | number |
offsetY | number |
scale | number |
GenImageCellular(width, height, tileSize) ⇒ Image
Generate image: cellular algorithm, bigger tileSize means bigger cells
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
width | number |
height | number |
tileSize | number |
GenImageText(width, height, text) ⇒ Image
Generate image: grayscale image from text data
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
width | number |
height | number |
text | string |
ImageCopy(image) ⇒ Image
Create an image duplicate (useful for transformations)
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
image | Image |
ImageFromImage(image, rec) ⇒ Image
Create an image from another image piece
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
image | Image |
rec | Rectangle |
ImageText(text, fontSize, color) ⇒ Image
Create an image from text (default font)
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
text | string |
fontSize | number |
color | Color |
ImageTextEx(font, text, fontSize, spacing, tint) ⇒ Image
Create an image from text (custom sprite font)
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
font | Font |
text | string |
fontSize | number |
spacing | number |
tint | Color |
ImageBlurGaussian(image, blurSize) ⇒ undefined
Apply Gaussian blur using a box blur approximation
Kind: global function
Param | Type |
---|---|
image | number |
blurSize | number |
LoadImageColors(image) ⇒ number
Load color data from image as a Color array (RGBA - 32bit)
Kind: global function
Returns: number
- The resulting Color *.
Param | Type |
---|---|
image | Image |
LoadImagePalette(image, maxPaletteSize, colorCount) ⇒ number
Load colors palette from image as a Color array (RGBA - 32bit)
Kind: global function
Returns: number
- The resulting Color *.
Param | Type |
---|---|
image | Image |
maxPaletteSize | number |
colorCount | number |
UnloadImageColors(colors) ⇒ undefined
Unload color data loaded with LoadImageColors()
Kind: global function
Param | Type |
---|---|
colors | number |
UnloadImagePalette(colors) ⇒ undefined
Unload colors palette loaded with LoadImagePalette()
Kind: global function
Param | Type |
---|---|
colors | number |
GetImageAlphaBorder(image, threshold) ⇒ Rectangle
Get image alpha border rectangle
Kind: global function
Returns: Rectangle
- The resulting Rectangle.
Param | Type |
---|---|
image | Image |
threshold | number |
GetImageColor(image, x, y) ⇒ Color
Get image pixel color at (x, y) position
Kind: global function
Returns: Color
- The resulting Color.
Param | Type |
---|---|
image | Image |
x | number |
y | number |
ImageDrawCircleLines(dst, centerX, centerY, radius, color) ⇒ undefined
Draw circle outline within an image
Kind: global function
Param | Type |
---|---|
dst | number |
centerX | number |
centerY | number |
radius | number |
color | Color |
ImageDrawCircleLinesV(dst, center, radius, color) ⇒ undefined
Draw circle outline within an image (Vector version)
Kind: global function
Param | Type |
---|---|
dst | number |
center | Vector2 |
radius | number |
color | Color |
LoadTexture(fileName) ⇒ Texture2D
Load texture from file into GPU memory (VRAM)
Kind: global function
Returns: Texture2D
- The resulting Texture2D.
Param | Type |
---|---|
fileName | string |
LoadTextureFromImage(image) ⇒ Texture2D
Load texture from image data
Kind: global function
Returns: Texture2D
- The resulting Texture2D.
Param | Type |
---|---|
image | Image |
LoadTextureCubemap(image, layout) ⇒ TextureCubemap
Load cubemap from image, multiple image cubemap layouts supported
Kind: global function
Returns: TextureCubemap
- The resulting TextureCubemap.
Param | Type |
---|---|
image | Image |
layout | number |
LoadRenderTexture(width, height) ⇒ RenderTexture2D
Load texture for rendering (framebuffer)
Kind: global function
Returns: RenderTexture2D
- The resulting RenderTexture2D.
Param | Type |
---|---|
width | number |
height | number |
IsTextureReady(texture) ⇒ boolean
Check if a texture is ready
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
texture | Texture |
UnloadTexture(texture) ⇒ undefined
Unload texture from GPU memory (VRAM)
Kind: global function
Param | Type |
---|---|
texture | Texture |
IsRenderTextureReady(target) ⇒ boolean
Check if a render texture is ready
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
target | RenderTexture |
UnloadRenderTexture(target) ⇒ undefined
Unload render texture from GPU memory (VRAM)
Kind: global function
Param | Type |
---|---|
target | RenderTexture |
UpdateTexture(texture, pixels) ⇒ undefined
Update GPU texture with new data
Kind: global function
Param | Type |
---|---|
texture | Texture |
pixels | number |
UpdateTextureRec(texture, rec, pixels) ⇒ undefined
Update GPU texture rectangle with new data
Kind: global function
Param | Type |
---|---|
texture | Texture |
rec | Rectangle |
pixels | number |
SetTextureFilter(texture, filter) ⇒ undefined
Set texture scaling filter mode
Kind: global function
Param | Type |
---|---|
texture | Texture |
filter | number |
SetTextureWrap(texture, wrap) ⇒ undefined
Set texture wrapping mode
Kind: global function
Param | Type |
---|---|
texture | Texture |
wrap | number |
DrawTexture(texture, posX, posY, tint) ⇒ undefined
Draw a Texture2D
Kind: global function
Param | Type |
---|---|
texture | Texture |
posX | number |
posY | number |
tint | Color |
DrawTextureV(texture, position, tint) ⇒ undefined
Draw a Texture2D with position defined as Vector2
Kind: global function
Param | Type |
---|---|
texture | Texture |
position | Vector2 |
tint | Color |
DrawTextureEx(texture, position, rotation, scale, tint) ⇒ undefined
Draw a Texture2D with extended parameters
Kind: global function
Param | Type |
---|---|
texture | Texture |
position | Vector2 |
rotation | number |
scale | number |
tint | Color |
DrawTextureRec(texture, source, position, tint) ⇒ undefined
Draw a part of a texture defined by a rectangle
Kind: global function
Param | Type |
---|---|
texture | Texture |
source | Rectangle |
position | Vector2 |
tint | Color |
DrawTexturePro(texture, source, dest, origin, rotation, tint) ⇒ undefined
Draw a part of a texture defined by a rectangle with ‘pro’ parameters
Kind: global function
Param | Type |
---|---|
texture | Texture |
source | Rectangle |
dest | Rectangle |
origin | Vector2 |
rotation | number |
tint | Color |
DrawTextureNPatch(texture, nPatchInfo, dest, origin, rotation, tint) ⇒ undefined
Draws a texture (or part of it) that stretches or shrinks nicely
Kind: global function
Param | Type |
---|---|
texture | Texture |
nPatchInfo | NPatchInfo |
dest | Rectangle |
origin | Vector2 |
rotation | number |
tint | Color |
Fade(color, alpha) ⇒ Color
Get color with alpha applied, alpha goes from 0.0f to 1.0f
Kind: global function
Returns: Color
- The resulting Color.
Param | Type |
---|---|
color | Color |
alpha | number |
ColorToInt(color) ⇒ number
Get hexadecimal value for a Color
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
color | Color |
ColorNormalize(color) ⇒ Vector4
Get Color normalized as float [0..1]
Kind: global function
Returns: Vector4
- The resulting Vector4.
Param | Type |
---|---|
color | Color |
ColorFromNormalized(normalized) ⇒ Color
Get Color from normalized values [0..1]
Kind: global function
Returns: Color
- The resulting Color.
Param | Type |
---|---|
normalized | Vector4 |
ColorToHSV(color) ⇒ Vector3
Get HSV values for a Color, hue [0..360], saturation/value [0..1]
Kind: global function
Returns: Vector3
- The resulting Vector3.
Param | Type |
---|---|
color | Color |
ColorFromHSV(hue, saturation, value) ⇒ Color
Get a Color from HSV values, hue [0..360], saturation/value [0..1]
Kind: global function
Returns: Color
- The resulting Color.
Param | Type |
---|---|
hue | number |
saturation | number |
value | number |
ColorTint(color, tint) ⇒ Color
Get color multiplied with another color
Kind: global function
Returns: Color
- The resulting Color.
Param | Type |
---|---|
color | Color |
tint | Color |
ColorBrightness(color, factor) ⇒ Color
Get color with brightness correction, brightness factor goes from -1.0f to 1.0f
Kind: global function
Returns: Color
- The resulting Color.
Param | Type |
---|---|
color | Color |
factor | number |
ColorContrast(color, contrast) ⇒ Color
Get color with contrast correction, contrast values between -1.0f and 1.0f
Kind: global function
Returns: Color
- The resulting Color.
Param | Type |
---|---|
color | Color |
contrast | number |
ColorAlpha(color, alpha) ⇒ Color
Get color with alpha applied, alpha goes from 0.0f to 1.0f
Kind: global function
Returns: Color
- The resulting Color.
Param | Type |
---|---|
color | Color |
alpha | number |
ColorAlphaBlend(dst, src, tint) ⇒ Color
Get src alpha-blended into dst color with tint
Kind: global function
Returns: Color
- The resulting Color.
Param | Type |
---|---|
dst | Color |
src | Color |
tint | Color |
GetColor(hexValue) ⇒ Color
Get Color structure from hexadecimal value
Kind: global function
Returns: Color
- The resulting Color.
Param | Type |
---|---|
hexValue | number |
GetPixelColor(srcPtr, format) ⇒ Color
Get Color from a source pixel pointer of certain format
Kind: global function
Returns: Color
- The resulting Color.
Param | Type |
---|---|
srcPtr | number |
format | number |
SetPixelColor(dstPtr, color, format) ⇒ undefined
Set color formatted into destination pixel pointer
Kind: global function
Param | Type |
---|---|
dstPtr | number |
color | Color |
format | number |
GetPixelDataSize(width, height, format) ⇒ number
Get pixel data size in bytes for certain format
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
width | number |
height | number |
format | number |
GetFontDefault() ⇒ Font
Get the default Font
Kind: global function
Returns: Font
- The resulting Font.
LoadFont(fileName) ⇒ Font
Load font from file into GPU memory (VRAM)
Kind: global function
Returns: Font
- The resulting Font.
Param | Type |
---|---|
fileName | string |
LoadFontEx(fileName, fontSize, fontChars, glyphCount) ⇒ Font
Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set
Kind: global function
Returns: Font
- The resulting Font.
Param | Type |
---|---|
fileName | string |
fontSize | number |
fontChars | number |
glyphCount | number |
LoadFontFromImage(image, key, firstChar) ⇒ Font
Load font from Image (XNA style)
Kind: global function
Returns: Font
- The resulting Font.
Param | Type |
---|---|
image | Image |
key | Color |
firstChar | number |
LoadFontFromMemory(fileType, fileData, dataSize, fontSize, fontChars, glyphCount) ⇒ Font
Load font from memory buffer, fileType refers to extension: i.e. ‘.ttf’
Kind: global function
Returns: Font
- The resulting Font.
Param | Type |
---|---|
fileType | string |
fileData | Buffer |
dataSize | number |
fontSize | number |
fontChars | number |
glyphCount | number |
IsFontReady(font) ⇒ boolean
Check if a font is ready
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
font | Font |
LoadFontData(fileData, dataSize, fontSize, fontChars, glyphCount, type) ⇒ number
Load font data for further use
Kind: global function
Returns: number
- The resulting GlyphInfo *.
Param | Type |
---|---|
fileData | Buffer |
dataSize | number |
fontSize | number |
fontChars | number |
glyphCount | number |
type | number |
GenImageFontAtlas(chars, recs, glyphCount, fontSize, padding, packMethod) ⇒ Image
Generate image font atlas using chars info
Kind: global function
Returns: Image
- The resulting Image.
Param | Type |
---|---|
chars | number |
recs | number |
glyphCount | number |
fontSize | number |
padding | number |
packMethod | number |
UnloadFontData(chars, glyphCount) ⇒ undefined
Unload font chars info data (RAM)
Kind: global function
Param | Type |
---|---|
chars | number |
glyphCount | number |
UnloadFont(font) ⇒ undefined
Unload font from GPU memory (VRAM)
Kind: global function
Param | Type |
---|---|
font | Font |
ExportFontAsCode(font, fileName) ⇒ boolean
Export font as code file, returns true on success
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
font | Font |
fileName | string |
DrawFPS(posX, posY) ⇒ undefined
Draw current FPS
Kind: global function
Param | Type |
---|---|
posX | number |
posY | number |
DrawText(text, posX, posY, fontSize, color) ⇒ undefined
Draw text (using default font)
Kind: global function
Param | Type |
---|---|
text | string |
posX | number |
posY | number |
fontSize | number |
color | Color |
DrawTextEx(font, text, position, fontSize, spacing, tint) ⇒ undefined
Draw text using font and additional parameters
Kind: global function
Param | Type |
---|---|
font | Font |
text | string |
position | Vector2 |
fontSize | number |
spacing | number |
tint | Color |
DrawTextPro(font, text, position, origin, rotation, fontSize, spacing, tint) ⇒ undefined
Draw text using Font and pro parameters (rotation)
Kind: global function
Param | Type |
---|---|
font | Font |
text | string |
position | Vector2 |
origin | Vector2 |
rotation | number |
fontSize | number |
spacing | number |
tint | Color |
DrawTextCodepoint(font, codepoint, position, fontSize, tint) ⇒ undefined
Draw one character (codepoint)
Kind: global function
Param | Type |
---|---|
font | Font |
codepoint | number |
position | Vector2 |
fontSize | number |
tint | Color |
DrawTextCodepoints(font, codepoints, count, position, fontSize, spacing, tint) ⇒ undefined
Draw multiple character (codepoint)
Kind: global function
Param | Type |
---|---|
font | Font |
codepoints | number |
count | number |
position | Vector2 |
fontSize | number |
spacing | number |
tint | Color |
MeasureText(text, fontSize) ⇒ number
Measure string width for default font
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
text | string |
fontSize | number |
MeasureTextEx(font, text, fontSize, spacing) ⇒ Vector2
Measure string size for Font
Kind: global function
Returns: Vector2
- The resulting Vector2.
Param | Type |
---|---|
font | Font |
text | string |
fontSize | number |
spacing | number |
GetGlyphIndex(font, codepoint) ⇒ number
Get glyph index position in font for a codepoint (unicode character), fallback to ‘?’ if not found
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
font | Font |
codepoint | number |
GetGlyphInfo(font, codepoint) ⇒ GlyphInfo
Get glyph font info data for a codepoint (unicode character), fallback to ‘?’ if not found
Kind: global function
Returns: GlyphInfo
- The resulting GlyphInfo.
Param | Type |
---|---|
font | Font |
codepoint | number |
GetGlyphAtlasRec(font, codepoint) ⇒ Rectangle
Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to ‘?’ if not found
Kind: global function
Returns: Rectangle
- The resulting Rectangle.
Param | Type |
---|---|
font | Font |
codepoint | number |
LoadUTF8(codepoints, length) ⇒ string
Load UTF-8 text encoded from codepoints array
Kind: global function
Returns: string
- The resulting char *.
Param | Type |
---|---|
codepoints | number |
length | number |
UnloadUTF8(text) ⇒ undefined
Unload UTF-8 text encoded from codepoints array
Kind: global function
Param | Type |
---|---|
text | string |
LoadCodepoints(text, count) ⇒ number
Load all codepoints from a UTF-8 text string, codepoints count returned by parameter
Kind: global function
Returns: number
- The resulting int *.
Param | Type |
---|---|
text | string |
count | number |
UnloadCodepoints(codepoints) ⇒ undefined
Unload codepoints data from memory
Kind: global function
Param | Type |
---|---|
codepoints | number |
GetCodepointCount(text) ⇒ number
Get total number of codepoints in a UTF-8 encoded string
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
text | string |
GetCodepoint(text, codepointSize) ⇒ number
Get next codepoint in a UTF-8 encoded string, 0x3f(‘?’) is returned on failure
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
text | string |
codepointSize | number |
GetCodepointNext(text, codepointSize) ⇒ number
Get next codepoint in a UTF-8 encoded string, 0x3f(‘?’) is returned on failure
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
text | string |
codepointSize | number |
GetCodepointPrevious(text, codepointSize) ⇒ number
Get previous codepoint in a UTF-8 encoded string, 0x3f(‘?’) is returned on failure
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
text | string |
codepointSize | number |
CodepointToUTF8(codepoint, utf8Size) ⇒ string
Encode one codepoint into UTF-8 byte array (array length returned as parameter)
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
codepoint | number |
utf8Size | number |
TextCopy(dst, src) ⇒ number
Copy one string to another, returns bytes copied
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
dst | string |
src | string |
TextIsEqual(text1, text2) ⇒ boolean
Check if two text string are equal
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
text1 | string |
text2 | string |
TextLength(text) ⇒ number
Get text length, checks for ‘\0’ ending
Kind: global function
Returns: number
- The resulting unsigned int.
Param | Type |
---|---|
text | string |
TextSubtext(text, position, length) ⇒ string
Get a piece of a text string
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
text | string |
position | number |
length | number |
TextReplace(text, replace, by) ⇒ string
Replace text string (WARNING: memory must be freed!)
Kind: global function
Returns: string
- The resulting char *.
Param | Type |
---|---|
text | string |
replace | string |
by | string |
TextInsert(text, insert, position) ⇒ string
Insert text in a position (WARNING: memory must be freed!)
Kind: global function
Returns: string
- The resulting char *.
Param | Type |
---|---|
text | string |
insert | string |
position | number |
TextJoin(textList, count, delimiter) ⇒ string
Join text strings with delimiter
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
textList | number |
count | number |
delimiter | string |
TextSplit(text, delimiter, count) ⇒ number
Split text into multiple strings
Kind: global function
Returns: number
- The resulting const char **.
Param | Type |
---|---|
text | string |
delimiter | string |
count | number |
TextAppend(text, append, position) ⇒ undefined
Append text at specific position and move cursor!
Kind: global function
Param | Type |
---|---|
text | string |
append | string |
position | number |
TextFindIndex(text, find) ⇒ number
Find first text occurrence within a string
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
text | string |
find | string |
TextToUpper(text) ⇒ string
Get upper case version of provided string
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
text | string |
TextToLower(text) ⇒ string
Get lower case version of provided string
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
text | string |
TextToPascal(text) ⇒ string
Get Pascal case notation version of provided string
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
text | string |
TextToInteger(text) ⇒ number
Get integer value from text (negative values not supported)
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
text | string |
DrawLine3D(startPos, endPos, color) ⇒ undefined
Draw a line in 3D world space
Kind: global function
Param | Type |
---|---|
startPos | Vector3 |
endPos | Vector3 |
color | Color |
DrawPoint3D(position, color) ⇒ undefined
Draw a point in 3D space, actually a small line
Kind: global function
Param | Type |
---|---|
position | Vector3 |
color | Color |
DrawCircle3D(center, radius, rotationAxis, rotationAngle, color) ⇒ undefined
Draw a circle in 3D world space
Kind: global function
Param | Type |
---|---|
center | Vector3 |
radius | number |
rotationAxis | Vector3 |
rotationAngle | number |
color | Color |
DrawTriangle3D(v1, v2, v3, color) ⇒ undefined
Draw a color-filled triangle (vertex in counter-clockwise order!)
Kind: global function
Param | Type |
---|---|
v1 | Vector3 |
v2 | Vector3 |
v3 | Vector3 |
color | Color |
DrawTriangleStrip3D(points, pointCount, color) ⇒ undefined
Draw a triangle strip defined by points
Kind: global function
Param | Type |
---|---|
points | number |
pointCount | number |
color | Color |
DrawCube(position, width, height, length, color) ⇒ undefined
Draw cube
Kind: global function
Param | Type |
---|---|
position | Vector3 |
width | number |
height | number |
length | number |
color | Color |
DrawCubeV(position, size, color) ⇒ undefined
Draw cube (Vector version)
Kind: global function
Param | Type |
---|---|
position | Vector3 |
size | Vector3 |
color | Color |
DrawCubeWires(position, width, height, length, color) ⇒ undefined
Draw cube wires
Kind: global function
Param | Type |
---|---|
position | Vector3 |
width | number |
height | number |
length | number |
color | Color |
DrawCubeWiresV(position, size, color) ⇒ undefined
Draw cube wires (Vector version)
Kind: global function
Param | Type |
---|---|
position | Vector3 |
size | Vector3 |
color | Color |
DrawSphere(centerPos, radius, color) ⇒ undefined
Draw sphere
Kind: global function
Param | Type |
---|---|
centerPos | Vector3 |
radius | number |
color | Color |
DrawSphereEx(centerPos, radius, rings, slices, color) ⇒ undefined
Draw sphere with extended parameters
Kind: global function
Param | Type |
---|---|
centerPos | Vector3 |
radius | number |
rings | number |
slices | number |
color | Color |
DrawSphereWires(centerPos, radius, rings, slices, color) ⇒ undefined
Draw sphere wires
Kind: global function
Param | Type |
---|---|
centerPos | Vector3 |
radius | number |
rings | number |
slices | number |
color | Color |
DrawCylinder(position, radiusTop, radiusBottom, height, slices, color) ⇒ undefined
Draw a cylinder/cone
Kind: global function
Param | Type |
---|---|
position | Vector3 |
radiusTop | number |
radiusBottom | number |
height | number |
slices | number |
color | Color |
DrawCylinderEx(startPos, endPos, startRadius, endRadius, sides, color) ⇒ undefined
Draw a cylinder with base at startPos and top at endPos
Kind: global function
Param | Type |
---|---|
startPos | Vector3 |
endPos | Vector3 |
startRadius | number |
endRadius | number |
sides | number |
color | Color |
DrawCylinderWires(position, radiusTop, radiusBottom, height, slices, color) ⇒ undefined
Draw a cylinder/cone wires
Kind: global function
Param | Type |
---|---|
position | Vector3 |
radiusTop | number |
radiusBottom | number |
height | number |
slices | number |
color | Color |
DrawCylinderWiresEx(startPos, endPos, startRadius, endRadius, sides, color) ⇒ undefined
Draw a cylinder wires with base at startPos and top at endPos
Kind: global function
Param | Type |
---|---|
startPos | Vector3 |
endPos | Vector3 |
startRadius | number |
endRadius | number |
sides | number |
color | Color |
DrawCapsule(startPos, endPos, radius, slices, rings, color) ⇒ undefined
Draw a capsule with the center of its sphere caps at startPos and endPos
Kind: global function
Param | Type |
---|---|
startPos | Vector3 |
endPos | Vector3 |
radius | number |
slices | number |
rings | number |
color | Color |
DrawCapsuleWires(startPos, endPos, radius, slices, rings, color) ⇒ undefined
Draw capsule wireframe with the center of its sphere caps at startPos and endPos
Kind: global function
Param | Type |
---|---|
startPos | Vector3 |
endPos | Vector3 |
radius | number |
slices | number |
rings | number |
color | Color |
DrawPlane(centerPos, size, color) ⇒ undefined
Draw a plane XZ
Kind: global function
Param | Type |
---|---|
centerPos | Vector3 |
size | Vector2 |
color | Color |
DrawRay(ray, color) ⇒ undefined
Draw a ray line
Kind: global function
Param | Type |
---|---|
ray | Ray |
color | Color |
DrawGrid(slices, spacing) ⇒ undefined
Draw a grid (centered at (0, 0, 0))
Kind: global function
Param | Type |
---|---|
slices | number |
spacing | number |
LoadModel(fileName) ⇒ Model
Load model from files (meshes and materials)
Kind: global function
Returns: Model
- The resulting Model.
Param | Type |
---|---|
fileName | string |
LoadModelFromMesh(mesh) ⇒ Model
Load model from generated mesh (default material)
Kind: global function
Returns: Model
- The resulting Model.
Param | Type |
---|---|
mesh | Mesh |
IsModelReady(model) ⇒ boolean
Check if a model is ready
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
model | Model |
UnloadModel(model) ⇒ undefined
Unload model (including meshes) from memory (RAM and/or VRAM)
Kind: global function
Param | Type |
---|---|
model | Model |
GetModelBoundingBox(model) ⇒ BoundingBox
Compute model bounding box limits (considers all meshes)
Kind: global function
Returns: BoundingBox
- The resulting BoundingBox.
Param | Type |
---|---|
model | Model |
DrawModel(model, position, scale, tint) ⇒ undefined
Draw a model (with texture if set)
Kind: global function
Param | Type |
---|---|
model | Model |
position | Vector3 |
scale | number |
tint | Color |
DrawModelEx(model, position, rotationAxis, rotationAngle, scale, tint) ⇒ undefined
Draw a model with extended parameters
Kind: global function
Param | Type |
---|---|
model | Model |
position | Vector3 |
rotationAxis | Vector3 |
rotationAngle | number |
scale | Vector3 |
tint | Color |
DrawModelWires(model, position, scale, tint) ⇒ undefined
Draw a model wires (with texture if set)
Kind: global function
Param | Type |
---|---|
model | Model |
position | Vector3 |
scale | number |
tint | Color |
DrawModelWiresEx(model, position, rotationAxis, rotationAngle, scale, tint) ⇒ undefined
Draw a model wires (with texture if set) with extended parameters
Kind: global function
Param | Type |
---|---|
model | Model |
position | Vector3 |
rotationAxis | Vector3 |
rotationAngle | number |
scale | Vector3 |
tint | Color |
DrawBoundingBox(box, color) ⇒ undefined
Draw bounding box (wires)
Kind: global function
Param | Type |
---|---|
box | BoundingBox |
color | Color |
DrawBillboard(camera, texture, position, size, tint) ⇒ undefined
Draw a billboard texture
Kind: global function
Param | Type |
---|---|
camera | Camera3D |
texture | Texture |
position | Vector3 |
size | number |
tint | Color |
DrawBillboardRec(camera, texture, source, position, size, tint) ⇒ undefined
Draw a billboard texture defined by source
Kind: global function
Param | Type |
---|---|
camera | Camera3D |
texture | Texture |
source | Rectangle |
position | Vector3 |
size | Vector2 |
tint | Color |
DrawBillboardPro(camera, texture, source, position, up, size, origin, rotation, tint) ⇒ undefined
Draw a billboard texture defined by source and rotation
Kind: global function
Param | Type |
---|---|
camera | Camera3D |
texture | Texture |
source | Rectangle |
position | Vector3 |
up | Vector3 |
size | Vector2 |
origin | Vector2 |
rotation | number |
tint | Color |
UpdateMeshBuffer(mesh, index, data, dataSize, offset) ⇒ undefined
Update mesh vertex data in GPU for a specific buffer index
Kind: global function
Param | Type |
---|---|
mesh | Mesh |
index | number |
data | number |
dataSize | number |
offset | number |
UnloadMesh(mesh) ⇒ undefined
Unload mesh data from CPU and GPU
Kind: global function
Param | Type |
---|---|
mesh | Mesh |
ExportMesh(mesh, fileName) ⇒ boolean
Export mesh data to file, returns true on success
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
mesh | Mesh |
fileName | string |
GetMeshBoundingBox(mesh) ⇒ BoundingBox
Compute mesh bounding box limits
Kind: global function
Returns: BoundingBox
- The resulting BoundingBox.
Param | Type |
---|---|
mesh | Mesh |
GenMeshPoly(sides, radius) ⇒ Mesh
Generate polygonal mesh
Kind: global function
Returns: Mesh
- The resulting Mesh.
Param | Type |
---|---|
sides | number |
radius | number |
GenMeshPlane(width, length, resX, resZ) ⇒ Mesh
Generate plane mesh (with subdivisions)
Kind: global function
Returns: Mesh
- The resulting Mesh.
Param | Type |
---|---|
width | number |
length | number |
resX | number |
resZ | number |
GenMeshCube(width, height, length) ⇒ Mesh
Generate cuboid mesh
Kind: global function
Returns: Mesh
- The resulting Mesh.
Param | Type |
---|---|
width | number |
height | number |
length | number |
GenMeshSphere(radius, rings, slices) ⇒ Mesh
Generate sphere mesh (standard sphere)
Kind: global function
Returns: Mesh
- The resulting Mesh.
Param | Type |
---|---|
radius | number |
rings | number |
slices | number |
GenMeshHemiSphere(radius, rings, slices) ⇒ Mesh
Generate half-sphere mesh (no bottom cap)
Kind: global function
Returns: Mesh
- The resulting Mesh.
Param | Type |
---|---|
radius | number |
rings | number |
slices | number |
GenMeshCylinder(radius, height, slices) ⇒ Mesh
Generate cylinder mesh
Kind: global function
Returns: Mesh
- The resulting Mesh.
Param | Type |
---|---|
radius | number |
height | number |
slices | number |
GenMeshCone(radius, height, slices) ⇒ Mesh
Generate cone/pyramid mesh
Kind: global function
Returns: Mesh
- The resulting Mesh.
Param | Type |
---|---|
radius | number |
height | number |
slices | number |
GenMeshTorus(radius, size, radSeg, sides) ⇒ Mesh
Generate torus mesh
Kind: global function
Returns: Mesh
- The resulting Mesh.
Param | Type |
---|---|
radius | number |
size | number |
radSeg | number |
sides | number |
GenMeshKnot(radius, size, radSeg, sides) ⇒ Mesh
Generate trefoil knot mesh
Kind: global function
Returns: Mesh
- The resulting Mesh.
Param | Type |
---|---|
radius | number |
size | number |
radSeg | number |
sides | number |
GenMeshHeightmap(heightmap, size) ⇒ Mesh
Generate heightmap mesh from image data
Kind: global function
Returns: Mesh
- The resulting Mesh.
Param | Type |
---|---|
heightmap | Image |
size | Vector3 |
GenMeshCubicmap(cubicmap, cubeSize) ⇒ Mesh
Generate cubes-based map mesh from image data
Kind: global function
Returns: Mesh
- The resulting Mesh.
Param | Type |
---|---|
cubicmap | Image |
cubeSize | Vector3 |
LoadModelAnimations(fileName, animCount) ⇒ number
Load model animations from file
Kind: global function
Returns: number
- The resulting ModelAnimation *.
Param | Type |
---|---|
fileName | string |
animCount | number |
UpdateModelAnimation(model, anim, frame) ⇒ undefined
Update model animation pose
Kind: global function
Param | Type |
---|---|
model | Model |
anim | ModelAnimation |
frame | number |
UnloadModelAnimation(anim) ⇒ undefined
Unload animation data
Kind: global function
Param | Type |
---|---|
anim | ModelAnimation |
UnloadModelAnimations(animations, count) ⇒ undefined
Unload animation array data
Kind: global function
Param | Type |
---|---|
animations | number |
count | number |
IsModelAnimationValid(model, anim) ⇒ boolean
Check model animation skeleton match
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
model | Model |
anim | ModelAnimation |
CheckCollisionSpheres(center1, radius1, center2, radius2) ⇒ boolean
Check collision between two spheres
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
center1 | Vector3 |
radius1 | number |
center2 | Vector3 |
radius2 | number |
CheckCollisionBoxes(box1, box2) ⇒ boolean
Check collision between two bounding boxes
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
box1 | BoundingBox |
box2 | BoundingBox |
CheckCollisionBoxSphere(box, center, radius) ⇒ boolean
Check collision between box and sphere
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
box | BoundingBox |
center | Vector3 |
radius | number |
GetRayCollisionSphere(ray, center, radius) ⇒ RayCollision
Get collision info between ray and sphere
Kind: global function
Returns: RayCollision
- The resulting RayCollision.
Param | Type |
---|---|
ray | Ray |
center | Vector3 |
radius | number |
GetRayCollisionBox(ray, box) ⇒ RayCollision
Get collision info between ray and box
Kind: global function
Returns: RayCollision
- The resulting RayCollision.
Param | Type |
---|---|
ray | Ray |
box | BoundingBox |
GetRayCollisionMesh(ray, mesh, transform) ⇒ RayCollision
Get collision info between ray and mesh
Kind: global function
Returns: RayCollision
- The resulting RayCollision.
Param | Type |
---|---|
ray | Ray |
mesh | Mesh |
transform | Matrix |
GetRayCollisionTriangle(ray, p1, p2, p3) ⇒ RayCollision
Get collision info between ray and triangle
Kind: global function
Returns: RayCollision
- The resulting RayCollision.
Param | Type |
---|---|
ray | Ray |
p1 | Vector3 |
p2 | Vector3 |
p3 | Vector3 |
GetRayCollisionQuad(ray, p1, p2, p3, p4) ⇒ RayCollision
Get collision info between ray and quad
Kind: global function
Returns: RayCollision
- The resulting RayCollision.
Param | Type |
---|---|
ray | Ray |
p1 | Vector3 |
p2 | Vector3 |
p3 | Vector3 |
p4 | Vector3 |
InitAudioDevice() ⇒ undefined
Initialize audio device and context
CloseAudioDevice() ⇒ undefined
Close the audio device and context
IsAudioDeviceReady() ⇒ boolean
Check if audio device has been initialized successfully
Kind: global function
Returns: boolean
- The resulting bool.
SetMasterVolume(volume) ⇒ undefined
Set master volume (listener)
Kind: global function
Param | Type |
---|---|
volume | number |
LoadWave(fileName) ⇒ Wave
Load wave data from file
Kind: global function
Returns: Wave
- The resulting Wave.
Param | Type |
---|---|
fileName | string |
LoadWaveFromMemory(fileType, fileData, dataSize) ⇒ Wave
Load wave from memory buffer, fileType refers to extension: i.e. ‘.wav’
Kind: global function
Returns: Wave
- The resulting Wave.
Param | Type |
---|---|
fileType | string |
fileData | Buffer |
dataSize | number |
IsWaveReady(wave) ⇒ boolean
Checks if wave data is ready
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
wave | Wave |
LoadSound(fileName) ⇒ Sound
Load sound from file
Kind: global function
Returns: Sound
- The resulting Sound.
Param | Type |
---|---|
fileName | string |
LoadSoundFromWave(wave) ⇒ Sound
Load sound from wave data
Kind: global function
Returns: Sound
- The resulting Sound.
Param | Type |
---|---|
wave | Wave |
IsSoundReady(sound) ⇒ boolean
Checks if a sound is ready
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
sound | Sound |
UpdateSound(sound, data, sampleCount) ⇒ undefined
Update sound buffer with new data
Kind: global function
Param | Type |
---|---|
sound | Sound |
data | number |
sampleCount | number |
UnloadWave(wave) ⇒ undefined
Unload wave data
Kind: global function
Param | Type |
---|---|
wave | Wave |
UnloadSound(sound) ⇒ undefined
Unload sound
Kind: global function
Param | Type |
---|---|
sound | Sound |
ExportWave(wave, fileName) ⇒ boolean
Export wave data to file, returns true on success
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
wave | Wave |
fileName | string |
ExportWaveAsCode(wave, fileName) ⇒ boolean
Export wave sample data to code (.h), returns true on success
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
wave | Wave |
fileName | string |
PlaySound(sound) ⇒ undefined
Play a sound
Kind: global function
Param | Type |
---|---|
sound | Sound |
StopSound(sound) ⇒ undefined
Stop playing a sound
Kind: global function
Param | Type |
---|---|
sound | Sound |
PauseSound(sound) ⇒ undefined
Pause a sound
Kind: global function
Param | Type |
---|---|
sound | Sound |
ResumeSound(sound) ⇒ undefined
Resume a paused sound
Kind: global function
Param | Type |
---|---|
sound | Sound |
IsSoundPlaying(sound) ⇒ boolean
Check if a sound is currently playing
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
sound | Sound |
SetSoundVolume(sound, volume) ⇒ undefined
Set volume for a sound (1.0 is max level)
Kind: global function
Param | Type |
---|---|
sound | Sound |
volume | number |
SetSoundPitch(sound, pitch) ⇒ undefined
Set pitch for a sound (1.0 is base level)
Kind: global function
Param | Type |
---|---|
sound | Sound |
pitch | number |
SetSoundPan(sound, pan) ⇒ undefined
Set pan for a sound (0.5 is center)
Kind: global function
Param | Type |
---|---|
sound | Sound |
pan | number |
WaveCopy(wave) ⇒ Wave
Copy a wave to a new wave
Kind: global function
Returns: Wave
- The resulting Wave.
Param | Type |
---|---|
wave | Wave |
LoadWaveSamples(wave) ⇒ number
Load samples data from wave as a 32bit float data array
Kind: global function
Returns: number
- The resulting float *.
Param | Type |
---|---|
wave | Wave |
UnloadWaveSamples(samples) ⇒ undefined
Unload samples data loaded with LoadWaveSamples()
Kind: global function
Param | Type |
---|---|
samples | number |
LoadMusicStream(fileName) ⇒ Music
Load music stream from file
Kind: global function
Returns: Music
- The resulting Music.
Param | Type |
---|---|
fileName | string |
LoadMusicStreamFromMemory(fileType, data, dataSize) ⇒ Music
Load music stream from data
Kind: global function
Returns: Music
- The resulting Music.
Param | Type |
---|---|
fileType | string |
data | Buffer |
dataSize | number |
IsMusicReady(music) ⇒ boolean
Checks if a music stream is ready
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
music | Music |
UnloadMusicStream(music) ⇒ undefined
Unload music stream
Kind: global function
Param | Type |
---|---|
music | Music |
PlayMusicStream(music) ⇒ undefined
Start music playing
Kind: global function
Param | Type |
---|---|
music | Music |
IsMusicStreamPlaying(music) ⇒ boolean
Check if music is playing
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
music | Music |
UpdateMusicStream(music) ⇒ undefined
Updates buffers for music streaming
Kind: global function
Param | Type |
---|---|
music | Music |
StopMusicStream(music) ⇒ undefined
Stop music playing
Kind: global function
Param | Type |
---|---|
music | Music |
PauseMusicStream(music) ⇒ undefined
Pause music playing
Kind: global function
Param | Type |
---|---|
music | Music |
ResumeMusicStream(music) ⇒ undefined
Resume playing paused music
Kind: global function
Param | Type |
---|---|
music | Music |
SeekMusicStream(music, position) ⇒ undefined
Seek music to a position (in seconds)
Kind: global function
Param | Type |
---|---|
music | Music |
position | number |
SetMusicVolume(music, volume) ⇒ undefined
Set volume for music (1.0 is max level)
Kind: global function
Param | Type |
---|---|
music | Music |
volume | number |
SetMusicPitch(music, pitch) ⇒ undefined
Set pitch for a music (1.0 is base level)
Kind: global function
Param | Type |
---|---|
music | Music |
pitch | number |
SetMusicPan(music, pan) ⇒ undefined
Set pan for a music (0.5 is center)
Kind: global function
Param | Type |
---|---|
music | Music |
pan | number |
GetMusicTimeLength(music) ⇒ number
Get music time length (in seconds)
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
music | Music |
GetMusicTimePlayed(music) ⇒ number
Get current music time played (in seconds)
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
music | Music |
LoadAudioStream(sampleRate, sampleSize, channels) ⇒ AudioStream
Load audio stream (to stream raw audio pcm data)
Kind: global function
Returns: AudioStream
- The resulting AudioStream.
Param | Type |
---|---|
sampleRate | number |
sampleSize | number |
channels | number |
IsAudioStreamReady(stream) ⇒ boolean
Checks if an audio stream is ready
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
stream | AudioStream |
UnloadAudioStream(stream) ⇒ undefined
Unload audio stream and free memory
Kind: global function
Param | Type |
---|---|
stream | AudioStream |
UpdateAudioStream(stream, data, frameCount) ⇒ undefined
Update audio stream buffers with data
Kind: global function
Param | Type |
---|---|
stream | AudioStream |
data | number |
frameCount | number |
IsAudioStreamProcessed(stream) ⇒ boolean
Check if any audio stream buffers requires refill
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
stream | AudioStream |
PlayAudioStream(stream) ⇒ undefined
Play audio stream
Kind: global function
Param | Type |
---|---|
stream | AudioStream |
PauseAudioStream(stream) ⇒ undefined
Pause audio stream
Kind: global function
Param | Type |
---|---|
stream | AudioStream |
ResumeAudioStream(stream) ⇒ undefined
Resume audio stream
Kind: global function
Param | Type |
---|---|
stream | AudioStream |
IsAudioStreamPlaying(stream) ⇒ boolean
Check if audio stream is playing
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
stream | AudioStream |
StopAudioStream(stream) ⇒ undefined
Stop audio stream
Kind: global function
Param | Type |
---|---|
stream | AudioStream |
SetAudioStreamVolume(stream, volume) ⇒ undefined
Set volume for audio stream (1.0 is max level)
Kind: global function
Param | Type |
---|---|
stream | AudioStream |
volume | number |
SetAudioStreamPitch(stream, pitch) ⇒ undefined
Set pitch for audio stream (1.0 is base level)
Kind: global function
Param | Type |
---|---|
stream | AudioStream |
pitch | number |
SetAudioStreamPan(stream, pan) ⇒ undefined
Set pan for audio stream (0.5 is centered)
Kind: global function
Param | Type |
---|---|
stream | AudioStream |
pan | number |
SetAudioStreamBufferSizeDefault(size) ⇒ undefined
Default size for new audio streams
Kind: global function
Param | Type |
---|---|
size | number |
EaseLinearNone(t, b, c, d) ⇒ number
Ease: Linear
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseLinearIn(t, b, c, d) ⇒ number
Ease: Linear In
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseLinearOut(t, b, c, d) ⇒ number
Ease: Linear Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseLinearInOut(t, b, c, d) ⇒ number
Ease: Linear In Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseSineIn(t, b, c, d) ⇒ number
Ease: Sine In
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseSineOut(t, b, c, d) ⇒ number
Ease: Sine Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseSineInOut(t, b, c, d) ⇒ number
Ease: Sine Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseCircIn(t, b, c, d) ⇒ number
Ease: Circular In
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseCircOut(t, b, c, d) ⇒ number
Ease: Circular Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseCircInOut(t, b, c, d) ⇒ number
Ease: Circular In Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseCubicIn(t, b, c, d) ⇒ number
Ease: Cubic In
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseCubicOut(t, b, c, d) ⇒ number
Ease: Cubic Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseCubicInOut(t, b, c, d) ⇒ number
Ease: Cubic In Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseQuadIn(t, b, c, d) ⇒ number
Ease: Quadratic In
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseQuadOut(t, b, c, d) ⇒ number
Ease: Quadratic Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseQuadInOut(t, b, c, d) ⇒ number
Ease: Quadratic In Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseExpoIn(t, b, c, d) ⇒ number
Ease: Exponential In
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseExpoOut(t, b, c, d) ⇒ number
Ease: Exponential Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseExpoInOut(t, b, c, d) ⇒ number
Ease: Exponential In Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseBackIn(t, b, c, d) ⇒ number
Ease: Back In
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseBackOut(t, b, c, d) ⇒ number
Ease: Back Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseBackInOut(t, b, c, d) ⇒ number
Ease: Back In Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseBounceOut(t, b, c, d) ⇒ number
Ease: Bounce Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseBounceIn(t, b, c, d) ⇒ number
Ease: Bounce In
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseBounceInOut(t, b, c, d) ⇒ number
Ease: Bounce In Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseElasticIn(t, b, c, d) ⇒ number
Ease: Elastic In
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseElasticOut(t, b, c, d) ⇒ number
Ease: Elastic Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
EaseElasticInOut(t, b, c, d) ⇒ number
Ease: Elastic In Out
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
t | number |
b | number |
c | number |
d | number |
GuiEnable() ⇒ undefined
Enable gui controls (global state)
GuiDisable() ⇒ undefined
Disable gui controls (global state)
GuiLock() ⇒ undefined
Lock gui controls (global state)
GuiUnlock() ⇒ undefined
Unlock gui controls (global state)
GuiIsLocked() ⇒ boolean
Check if gui is locked (global state)
Kind: global function
Returns: boolean
- The resulting bool.
GuiFade(alpha) ⇒ undefined
Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
Kind: global function
Param | Type |
---|---|
alpha | number |
GuiSetState(state) ⇒ undefined
Set gui state (global state)
Kind: global function
Param | Type |
---|---|
state | number |
GuiGetState() ⇒ number
Get gui state (global state)
Kind: global function
Returns: number
- The resulting int.
GuiSetFont(font) ⇒ undefined
Set gui custom font (global state)
Kind: global function
Param | Type |
---|---|
font | Font |
GuiGetFont() ⇒ Font
Get gui custom font (global state)
Kind: global function
Returns: Font
- The resulting Font.
GuiSetStyle(control, property, value) ⇒ undefined
Set one style property
Kind: global function
Param | Type |
---|---|
control | number |
property | number |
value | number |
GuiGetStyle(control, property) ⇒ number
Get one style property
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
control | number |
property | number |
GuiWindowBox(bounds, title) ⇒ boolean
Window Box control, shows a window that can be closed
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
bounds | Rectangle |
title | string |
GuiGroupBox(bounds, text) ⇒ undefined
Group Box control with text name
Kind: global function
Param | Type |
---|---|
bounds | Rectangle |
text | string |
GuiLine(bounds, text) ⇒ undefined
Line separator control, could contain text
Kind: global function
Param | Type |
---|---|
bounds | Rectangle |
text | string |
GuiPanel(bounds, text) ⇒ undefined
Panel control, useful to group controls
Kind: global function
Param | Type |
---|---|
bounds | Rectangle |
text | string |
GuiTabBar(bounds, text, count, active) ⇒ number
Tab Bar control, returns TAB to be closed or -1
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
bounds | Rectangle |
text | number |
count | number |
active | number |
GuiScrollPanel(bounds, text, content, scroll) ⇒ Rectangle
Scroll Panel control
Kind: global function
Returns: Rectangle
- The resulting Rectangle.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
content | Rectangle |
scroll | number |
GuiLabel(bounds, text) ⇒ undefined
Label control, shows text
Kind: global function
Param | Type |
---|---|
bounds | Rectangle |
text | string |
GuiButton(bounds, text) ⇒ boolean
Button control, returns true when clicked
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
GuiLabelButton(bounds, text) ⇒ boolean
Label button control, show true when clicked
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
GuiToggle(bounds, text, active) ⇒ boolean
Toggle Button control, returns true when active
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
active | boolean |
GuiToggleGroup(bounds, text, active) ⇒ number
Toggle Group control, returns active toggle index
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
active | number |
GuiCheckBox(bounds, text, checked) ⇒ boolean
Check Box control, returns true when active
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
checked | boolean |
GuiComboBox(bounds, text, active) ⇒ number
Combo Box control, returns selected item index
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
active | number |
GuiDropdownBox(bounds, text, active, editMode) ⇒ boolean
Dropdown Box control, returns selected item
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
active | number |
editMode | boolean |
GuiSpinner(bounds, text, value, minValue, maxValue, editMode) ⇒ boolean
Spinner control, returns selected value
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
value | number |
minValue | number |
maxValue | number |
editMode | boolean |
GuiValueBox(bounds, text, value, minValue, maxValue, editMode) ⇒ boolean
Value Box control, updates input text with numbers
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
value | number |
minValue | number |
maxValue | number |
editMode | boolean |
GuiTextBox(bounds, text, textSize, editMode) ⇒ boolean
Text Box control, updates input text
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
textSize | number |
editMode | boolean |
GuiTextBoxMulti(bounds, text, textSize, editMode) ⇒ boolean
Text Box control with multiple lines
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
textSize | number |
editMode | boolean |
GuiSlider(bounds, textLeft, textRight, value, minValue, maxValue) ⇒ number
Slider control, returns selected value
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
bounds | Rectangle |
textLeft | string |
textRight | string |
value | number |
minValue | number |
maxValue | number |
GuiSliderBar(bounds, textLeft, textRight, value, minValue, maxValue) ⇒ number
Slider Bar control, returns selected value
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
bounds | Rectangle |
textLeft | string |
textRight | string |
value | number |
minValue | number |
maxValue | number |
GuiProgressBar(bounds, textLeft, textRight, value, minValue, maxValue) ⇒ number
Progress Bar control, shows current progress value
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
bounds | Rectangle |
textLeft | string |
textRight | string |
value | number |
minValue | number |
maxValue | number |
GuiStatusBar(bounds, text) ⇒ undefined
Status Bar control, shows info text
Kind: global function
Param | Type |
---|---|
bounds | Rectangle |
text | string |
GuiDummyRec(bounds, text) ⇒ undefined
Dummy control for placeholders
Kind: global function
Param | Type |
---|---|
bounds | Rectangle |
text | string |
GuiGrid(bounds, text, spacing, subdivs) ⇒ Vector2
Grid control, returns mouse cell position
Kind: global function
Returns: Vector2
- The resulting Vector2.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
spacing | number |
subdivs | number |
GuiListView(bounds, text, scrollIndex, active) ⇒ number
List View control, returns selected list item index
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
scrollIndex | number |
active | number |
GuiListViewEx(bounds, text, count, focus, scrollIndex, active) ⇒ number
List View with extended parameters
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
bounds | Rectangle |
text | number |
count | number |
focus | number |
scrollIndex | number |
active | number |
GuiMessageBox(bounds, title, message, buttons) ⇒ number
Message Box control, displays a message
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
bounds | Rectangle |
title | string |
message | string |
buttons | string |
GuiTextInputBox(bounds, title, message, buttons, text, textMaxSize, secretViewActive) ⇒ number
Text Input Box control, ask for text, supports secret
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
bounds | Rectangle |
title | string |
message | string |
buttons | string |
text | string |
textMaxSize | number |
secretViewActive | number |
GuiColorPicker(bounds, text, color) ⇒ Color
Color Picker control (multiple color controls)
Kind: global function
Returns: Color
- The resulting Color.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
color | Color |
GuiColorPanel(bounds, text, color) ⇒ Color
Color Panel control
Kind: global function
Returns: Color
- The resulting Color.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
color | Color |
GuiColorBarAlpha(bounds, text, alpha) ⇒ number
Color Bar Alpha control
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
alpha | number |
GuiColorBarHue(bounds, text, value) ⇒ number
Color Bar Hue control
Kind: global function
Returns: number
- The resulting float.
Param | Type |
---|---|
bounds | Rectangle |
text | string |
value | number |
GuiLoadStyle(fileName) ⇒ undefined
Load style file over global style variable (.rgs)
Kind: global function
Param | Type |
---|---|
fileName | string |
GuiLoadStyleDefault() ⇒ undefined
Load style default over global style
GuiEnableTooltip() ⇒ undefined
Enable gui tooltips (global state)
GuiDisableTooltip() ⇒ undefined
Disable gui tooltips (global state)
GuiSetTooltip(tooltip) ⇒ undefined
Set tooltip string
Kind: global function
Param | Type |
---|---|
tooltip | string |
GuiIconText(iconId, text) ⇒ string
Get text with icon id prepended (if supported)
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
iconId | number |
text | string |
GuiGetIcons() ⇒ number
Get raygui icons data pointer
Kind: global function
Returns: number
- The resulting unsigned int *.
GuiLoadIcons(fileName, loadIconsName) ⇒ number
Load raygui icons file (.rgi) into internal icons data
Kind: global function
Returns: number
- The resulting char **.
Param | Type |
---|---|
fileName | string |
loadIconsName | boolean |
GuiSetIconScale(scale) ⇒ undefined
Set icon drawing size
Kind: global function
Param | Type |
---|---|
scale | number |
rlMatrixMode(mode) ⇒ undefined
Choose the current matrix to be transformed
Kind: global function
Param | Type |
---|---|
mode | number |
rlPushMatrix() ⇒ undefined
Push the current matrix to stack
rlPopMatrix() ⇒ undefined
Pop latest inserted matrix from stack
rlLoadIdentity() ⇒ undefined
Reset current matrix to identity matrix
rlTranslatef(x, y, z) ⇒ undefined
Multiply the current matrix by a translation matrix
Kind: global function
Param | Type |
---|---|
x | number |
y | number |
z | number |
rlRotatef(angle, x, y, z) ⇒ undefined
Multiply the current matrix by a rotation matrix
Kind: global function
Param | Type |
---|---|
angle | number |
x | number |
y | number |
z | number |
rlScalef(x, y, z) ⇒ undefined
Multiply the current matrix by a scaling matrix
Kind: global function
Param | Type |
---|---|
x | number |
y | number |
z | number |
rlMultMatrixf(matf) ⇒ undefined
Multiply the current matrix by another matrix
Kind: global function
Param | Type |
---|---|
matf | number |
rlViewport(x, y, width, height) ⇒ undefined
Set the viewport area
Kind: global function
Param | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
rlBegin(mode) ⇒ undefined
Initialize drawing mode (how to organize vertex)
Kind: global function
Param | Type |
---|---|
mode | number |
rlEnd() ⇒ undefined
Finish vertex providing
rlVertex2i(x, y) ⇒ undefined
Define one vertex (position) - 2 int
Kind: global function
Param | Type |
---|---|
x | number |
y | number |
rlVertex2f(x, y) ⇒ undefined
Define one vertex (position) - 2 float
Kind: global function
Param | Type |
---|---|
x | number |
y | number |
rlVertex3f(x, y, z) ⇒ undefined
Define one vertex (position) - 3 float
Kind: global function
Param | Type |
---|---|
x | number |
y | number |
z | number |
rlTexCoord2f(x, y) ⇒ undefined
Define one vertex (texture coordinate) - 2 float
Kind: global function
Param | Type |
---|---|
x | number |
y | number |
rlNormal3f(x, y, z) ⇒ undefined
Define one vertex (normal) - 3 float
Kind: global function
Param | Type |
---|---|
x | number |
y | number |
z | number |
rlColor4ub(r, g, b, a) ⇒ undefined
Define one vertex (color) - 4 byte
Kind: global function
Param | Type |
---|---|
r | number |
g | number |
b | number |
a | number |
rlColor3f(x, y, z) ⇒ undefined
Define one vertex (color) - 3 float
Kind: global function
Param | Type |
---|---|
x | number |
y | number |
z | number |
rlColor4f(x, y, z, w) ⇒ undefined
Define one vertex (color) - 4 float
Kind: global function
Param | Type |
---|---|
x | number |
y | number |
z | number |
w | number |
rlEnableVertexArray(vaoId) ⇒ boolean
Enable vertex array (VAO, if supported)
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
vaoId | number |
rlDisableVertexArray() ⇒ undefined
Disable vertex array (VAO, if supported)
rlEnableVertexBuffer(id) ⇒ undefined
Enable vertex buffer (VBO)
Kind: global function
Param | Type |
---|---|
id | number |
rlDisableVertexBuffer() ⇒ undefined
Disable vertex buffer (VBO)
rlEnableVertexBufferElement(id) ⇒ undefined
Enable vertex buffer element (VBO element)
Kind: global function
Param | Type |
---|---|
id | number |
rlDisableVertexBufferElement() ⇒ undefined
Disable vertex buffer element (VBO element)
rlEnableVertexAttribute(index) ⇒ undefined
Enable vertex attribute index
Kind: global function
Param | Type |
---|---|
index | number |
rlDisableVertexAttribute(index) ⇒ undefined
Disable vertex attribute index
Kind: global function
Param | Type |
---|---|
index | number |
rlActiveTextureSlot(slot) ⇒ undefined
Select and active a texture slot
Kind: global function
Param | Type |
---|---|
slot | number |
rlEnableTexture(id) ⇒ undefined
Enable texture
Kind: global function
Param | Type |
---|---|
id | number |
rlDisableTexture() ⇒ undefined
Disable texture
rlEnableTextureCubemap(id) ⇒ undefined
Enable texture cubemap
Kind: global function
Param | Type |
---|---|
id | number |
rlDisableTextureCubemap() ⇒ undefined
Disable texture cubemap
rlTextureParameters(id, param, value) ⇒ undefined
Set texture parameters (filter, wrap)
Kind: global function
Param | Type |
---|---|
id | number |
param | number |
value | number |
rlCubemapParameters(id, param, value) ⇒ undefined
Set cubemap parameters (filter, wrap)
Kind: global function
Param | Type |
---|---|
id | number |
param | number |
value | number |
rlEnableShader(id) ⇒ undefined
Enable shader program
Kind: global function
Param | Type |
---|---|
id | number |
rlDisableShader() ⇒ undefined
Disable shader program
rlEnableFramebuffer(id) ⇒ undefined
Enable render texture (fbo)
Kind: global function
Param | Type |
---|---|
id | number |
rlDisableFramebuffer() ⇒ undefined
Disable render texture (fbo), return to default framebuffer
rlActiveDrawBuffers(count) ⇒ undefined
Activate multiple draw color buffers
Kind: global function
Param | Type |
---|---|
count | number |
rlEnableColorBlend() ⇒ undefined
Enable color blending
rlDisableColorBlend() ⇒ undefined
Disable color blending
rlEnableDepthTest() ⇒ undefined
Enable depth test
rlDisableDepthTest() ⇒ undefined
Disable depth test
rlEnableDepthMask() ⇒ undefined
Enable depth write
rlDisableDepthMask() ⇒ undefined
Disable depth write
rlEnableBackfaceCulling() ⇒ undefined
Enable backface culling
rlDisableBackfaceCulling() ⇒ undefined
Disable backface culling
rlSetCullFace(mode) ⇒ undefined
Set face culling mode
Kind: global function
Param | Type |
---|---|
mode | number |
rlEnableScissorTest() ⇒ undefined
Enable scissor test
rlDisableScissorTest() ⇒ undefined
Disable scissor test
rlScissor(x, y, width, height) ⇒ undefined
Scissor test
Kind: global function
Param | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
rlEnableWireMode() ⇒ undefined
Enable wire mode
rlDisableWireMode() ⇒ undefined
Disable wire mode
rlSetLineWidth(width) ⇒ undefined
Set the line drawing width
Kind: global function
Param | Type |
---|---|
width | number |
rlGetLineWidth() ⇒ number
Get the line drawing width
Kind: global function
Returns: number
- The resulting float.
rlEnableSmoothLines() ⇒ undefined
Enable line aliasing
rlDisableSmoothLines() ⇒ undefined
Disable line aliasing
rlEnableStereoRender() ⇒ undefined
Enable stereo rendering
rlDisableStereoRender() ⇒ undefined
Disable stereo rendering
rlIsStereoRenderEnabled() ⇒ boolean
Check if stereo render is enabled
Kind: global function
Returns: boolean
- The resulting bool.
rlClearColor(r, g, b, a) ⇒ undefined
Clear color buffer with color
Kind: global function
Param | Type |
---|---|
r | number |
g | number |
b | number |
a | number |
rlClearScreenBuffers() ⇒ undefined
Clear used screen buffers (color and depth)
rlCheckErrors() ⇒ undefined
Check and log OpenGL error codes
rlSetBlendMode(mode) ⇒ undefined
Set blending mode
Kind: global function
Param | Type |
---|---|
mode | number |
rlSetBlendFactors(glSrcFactor, glDstFactor, glEquation) ⇒ undefined
Set blending mode factor and equation (using OpenGL factors)
Kind: global function
Param | Type |
---|---|
glSrcFactor | number |
glDstFactor | number |
glEquation | number |
rlSetBlendFactorsSeparate(glSrcRGB, glDstRGB, glSrcAlpha, glDstAlpha, glEqRGB, glEqAlpha) ⇒ undefined
Set blending mode factors and equations separately (using OpenGL factors)
Kind: global function
Param | Type |
---|---|
glSrcRGB | number |
glDstRGB | number |
glSrcAlpha | number |
glDstAlpha | number |
glEqRGB | number |
glEqAlpha | number |
rlglInit(width, height) ⇒ undefined
Initialize rlgl (buffers, shaders, textures, states)
Kind: global function
Param | Type |
---|---|
width | number |
height | number |
rlglClose() ⇒ undefined
De-initialize rlgl (buffers, shaders, textures)
rlLoadExtensions(loader) ⇒ undefined
Load OpenGL extensions (loader function required)
Kind: global function
Param | Type |
---|---|
loader | number |
rlGetVersion() ⇒ number
Get current OpenGL version
Kind: global function
Returns: number
- The resulting int.
rlSetFramebufferWidth(width) ⇒ undefined
Set current framebuffer width
Kind: global function
Param | Type |
---|---|
width | number |
rlGetFramebufferWidth() ⇒ number
Get default framebuffer width
Kind: global function
Returns: number
- The resulting int.
rlSetFramebufferHeight(height) ⇒ undefined
Set current framebuffer height
Kind: global function
Param | Type |
---|---|
height | number |
rlGetFramebufferHeight() ⇒ number
Get default framebuffer height
Kind: global function
Returns: number
- The resulting int.
rlGetTextureIdDefault() ⇒ number
Get default texture id
Kind: global function
Returns: number
- The resulting unsigned int.
rlGetShaderIdDefault() ⇒ number
Get default shader id
Kind: global function
Returns: number
- The resulting unsigned int.
rlGetShaderLocsDefault() ⇒ number
Get default shader locations
Kind: global function
Returns: number
- The resulting int *.
rlLoadRenderBatch(numBuffers, bufferElements) ⇒ rlRenderBatch
Load a render batch system
Kind: global function
Returns: rlRenderBatch
- The resulting rlRenderBatch.
Param | Type |
---|---|
numBuffers | number |
bufferElements | number |
rlUnloadRenderBatch(batch) ⇒ undefined
Unload render batch system
Kind: global function
Param | Type |
---|---|
batch | rlRenderBatch |
rlDrawRenderBatch(batch) ⇒ undefined
Draw render batch data (Update->Draw->Reset)
Kind: global function
Param | Type |
---|---|
batch | number |
rlSetRenderBatchActive(batch) ⇒ undefined
Set the active render batch for rlgl (NULL for default internal)
Kind: global function
Param | Type |
---|---|
batch | number |
rlDrawRenderBatchActive() ⇒ undefined
Update and draw internal render batch
rlCheckRenderBatchLimit(vCount) ⇒ boolean
Check internal buffer overflow for a given number of vertex
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
vCount | number |
rlSetTexture(id) ⇒ undefined
Set current texture for render batch and check buffers limits
Kind: global function
Param | Type |
---|---|
id | number |
rlLoadVertexArray() ⇒ number
Load vertex array (vao) if supported
Kind: global function
Returns: number
- The resulting unsigned int.
rlLoadVertexBuffer(buffer, size, dynamic) ⇒ number
Load a vertex buffer attribute
Kind: global function
Returns: number
- The resulting unsigned int.
Param | Type |
---|---|
buffer | number |
size | number |
dynamic | boolean |
rlLoadVertexBufferElement(buffer, size, dynamic) ⇒ number
Load a new attributes element buffer
Kind: global function
Returns: number
- The resulting unsigned int.
Param | Type |
---|---|
buffer | number |
size | number |
dynamic | boolean |
rlUpdateVertexBuffer(bufferId, data, dataSize, offset) ⇒ undefined
Update GPU buffer with new data
Kind: global function
Param | Type |
---|---|
bufferId | number |
data | number |
dataSize | number |
offset | number |
rlUpdateVertexBufferElements(id, data, dataSize, offset) ⇒ undefined
Update vertex buffer elements with new data
Kind: global function
Param | Type |
---|---|
id | number |
data | number |
dataSize | number |
offset | number |
rlSetVertexAttributeDefault(locIndex, value, attribType, count) ⇒ undefined
Set vertex attribute default value
Kind: global function
Param | Type |
---|---|
locIndex | number |
value | number |
attribType | number |
count | number |
rlLoadTexture(data, width, height, format, mipmapCount) ⇒ number
Load texture in GPU
Kind: global function
Returns: number
- The resulting unsigned int.
Param | Type |
---|---|
data | number |
width | number |
height | number |
format | number |
mipmapCount | number |
rlLoadTextureDepth(width, height, useRenderBuffer) ⇒ number
Load depth texture/renderbuffer (to be attached to fbo)
Kind: global function
Returns: number
- The resulting unsigned int.
Param | Type |
---|---|
width | number |
height | number |
useRenderBuffer | boolean |
rlLoadTextureCubemap(data, size, format) ⇒ number
Load texture cubemap
Kind: global function
Returns: number
- The resulting unsigned int.
Param | Type |
---|---|
data | number |
size | number |
format | number |
rlUpdateTexture(id, offsetX, offsetY, width, height, format, data) ⇒ undefined
Update GPU texture with new data
Kind: global function
Param | Type |
---|---|
id | number |
offsetX | number |
offsetY | number |
width | number |
height | number |
format | number |
data | number |
rlGetGlTextureFormats(format, glInternalFormat, glFormat, glType) ⇒ undefined
Get OpenGL internal formats
Kind: global function
Param | Type |
---|---|
format | number |
glInternalFormat | number |
glFormat | number |
glType | number |
rlGetPixelFormatName(format) ⇒ string
Get name string for pixel format
Kind: global function
Returns: string
- The resulting const char *.
Param | Type |
---|---|
format | number |
rlUnloadTexture(id) ⇒ undefined
Unload texture from GPU memory
Kind: global function
Param | Type |
---|---|
id | number |
rlGenTextureMipmaps(id, width, height, format, mipmaps) ⇒ undefined
Generate mipmap data for selected texture
Kind: global function
Param | Type |
---|---|
id | number |
width | number |
height | number |
format | number |
mipmaps | number |
rlReadTexturePixels(id, width, height, format) ⇒ number
Read texture pixel data
Kind: global function
Returns: number
- The resulting void *.
Param | Type |
---|---|
id | number |
width | number |
height | number |
format | number |
rlReadScreenPixels(width, height) ⇒ Buffer
Read screen pixel data (color buffer)
Kind: global function
Returns: Buffer
- The resulting unsigned char *.
Param | Type |
---|---|
width | number |
height | number |
rlLoadFramebuffer(width, height) ⇒ number
Load an empty framebuffer
Kind: global function
Returns: number
- The resulting unsigned int.
Param | Type |
---|---|
width | number |
height | number |
rlFramebufferAttach(fboId, texId, attachType, texType, mipLevel) ⇒ undefined
Attach texture/renderbuffer to a framebuffer
Kind: global function
Param | Type |
---|---|
fboId | number |
texId | number |
attachType | number |
texType | number |
mipLevel | number |
rlFramebufferComplete(id) ⇒ boolean
Verify framebuffer is complete
Kind: global function
Returns: boolean
- The resulting bool.
Param | Type |
---|---|
id | number |
rlUnloadFramebuffer(id) ⇒ undefined
Delete framebuffer from GPU
Kind: global function
Param | Type |
---|---|
id | number |
rlLoadShaderCode(vsCode, fsCode) ⇒ number
Load shader from code strings
Kind: global function
Returns: number
- The resulting unsigned int.
Param | Type |
---|---|
vsCode | string |
fsCode | string |
rlCompileShader(shaderCode, type) ⇒ number
Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
Kind: global function
Returns: number
- The resulting unsigned int.
Param | Type |
---|---|
shaderCode | string |
type | number |
rlLoadShaderProgram(vShaderId, fShaderId) ⇒ number
Load custom shader program
Kind: global function
Returns: number
- The resulting unsigned int.
Param | Type |
---|---|
vShaderId | number |
fShaderId | number |
rlUnloadShaderProgram(id) ⇒ undefined
Unload shader program
Kind: global function
Param | Type |
---|---|
id | number |
rlGetLocationUniform(shaderId, uniformName) ⇒ number
Get shader location uniform
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
shaderId | number |
uniformName | string |
rlGetLocationAttrib(shaderId, attribName) ⇒ number
Get shader location attribute
Kind: global function
Returns: number
- The resulting int.
Param | Type |
---|---|
shaderId | number |
attribName | string |
rlSetUniform(locIndex, value, uniformType, count) ⇒ undefined
Set shader value uniform
Kind: global function
Param | Type |
---|---|
locIndex | number |
value | number |
uniformType | number |
count | number |
rlSetUniformMatrix(locIndex, mat) ⇒ undefined
Set shader value matrix
Kind: global function
Param | Type |
---|---|
locIndex | number |
mat | Matrix |
rlSetUniformSampler(locIndex, textureId) ⇒ undefined
Set shader value sampler
Kind: global function
Param | Type |
---|---|
locIndex | number |
textureId | number |
rlSetShader(id, locs) ⇒ undefined
Set shader currently active (id and locations)
Kind: global function
Param | Type |
---|---|
id | number |
locs | number |
rlLoadComputeShaderProgram(shaderId) ⇒ number
Load compute shader program
Kind: global function
Returns: number
- The resulting unsigned int.
Param | Type |
---|---|
shaderId | number |
rlComputeShaderDispatch(groupX, groupY, groupZ) ⇒ undefined
Dispatch compute shader (equivalent to draw for graphics pipeline)
Kind: global function
Param | Type |
---|---|
groupX | number |
groupY | number |
groupZ | number |
rlLoadShaderBuffer(size, data, usageHint) ⇒ number
Load shader storage buffer object (SSBO)
Kind: global function
Returns: number
- The resulting unsigned int.
Param | Type |
---|---|
size | number |
data | number |
usageHint | number |
rlUnloadShaderBuffer(ssboId) ⇒ undefined
Unload shader storage buffer object (SSBO)
Kind: global function
Param | Type |
---|---|
ssboId | number |
rlUpdateShaderBuffer(id, data, dataSize, offset) ⇒ undefined
Update SSBO buffer data
Kind: global function
Param | Type |
---|---|
id | number |
data | number |
dataSize | number |
offset | number |
rlBindShaderBuffer(id, index) ⇒ undefined
Bind SSBO buffer
Kind: global function
Param | Type |
---|---|
id | number |
index | number |
rlReadShaderBuffer(id, dest, count, offset) ⇒ undefined
Read SSBO buffer data (GPU->CPU)
Kind: global function
Param | Type |
---|---|
id | number |
dest | number |
count | number |
offset | number |
rlCopyShaderBuffer(destId, srcId, destOffset, srcOffset, count) ⇒ undefined
Copy SSBO data between buffers
Kind: global function
Param | Type |
---|---|
destId | number |
srcId | number |
destOffset | number |
srcOffset | number |
count | number |
rlGetShaderBufferSize(id) ⇒ number
Get SSBO buffer size
Kind: global function
Returns: number
- The resulting unsigned int.
Param | Type |
---|---|
id | number |
rlBindImageTexture(id, index, format, readonly) ⇒ undefined
Bind image texture
Kind: global function
Param | Type |
---|---|
id | number |
index | number |
format | number |
readonly | boolean |
rlGetMatrixModelview() ⇒ Matrix
Get internal modelview matrix
Kind: global function
Returns: Matrix
- The resulting Matrix.
rlGetMatrixProjection() ⇒ Matrix
Get internal projection matrix
Kind: global function
Returns: Matrix
- The resulting Matrix.
rlGetMatrixTransform() ⇒ Matrix
Get internal accumulated transform matrix
Kind: global function
Returns: Matrix
- The resulting Matrix.
rlGetMatrixProjectionStereo(eye) ⇒ Matrix
Get internal projection matrix for stereo render (selected eye)
Kind: global function
Returns: Matrix
- The resulting Matrix.
Param | Type |
---|---|
eye | number |
rlGetMatrixViewOffsetStereo(eye) ⇒ Matrix
Get internal view offset matrix for stereo render (selected eye)
Kind: global function
Returns: Matrix
- The resulting Matrix.
Param | Type |
---|---|
eye | number |
rlSetMatrixProjection(proj) ⇒ undefined
Set a custom projection matrix (replaces internal projection matrix)
Kind: global function
Param | Type |
---|---|
proj | Matrix |
rlSetMatrixModelview(view) ⇒ undefined
Set a custom modelview matrix (replaces internal modelview matrix)
Kind: global function
Param | Type |
---|---|
view | Matrix |
rlSetMatrixProjectionStereo(right, left) ⇒ undefined
Set eyes projection matrices for stereo rendering
Kind: global function
Param | Type |
---|---|
right | Matrix |
left | Matrix |
rlSetMatrixViewOffsetStereo(right, left) ⇒ undefined
Set eyes view offsets matrices for stereo rendering
Kind: global function
Param | Type |
---|---|
right | Matrix |
left | Matrix |
rlLoadDrawCube() ⇒ undefined
Load and draw a cube
rlLoadDrawQuad() ⇒ undefined
Load and draw a quad
UpdateCamera(camera, mode) ⇒ undefined
Update camera position for selected mode
Kind: global function
Param | Type |
---|---|
camera | Camera3D |
mode | number |
ImageFormat(image, newFormat) ⇒ undefined
Convert image data to desired format
Kind: global function
Param | Type |
---|---|
image | Image |
newFormat | number |
ImageToPOT(image, fill) ⇒ undefined
Convert image to POT (power-of-two)
Kind: global function
Param | Type |
---|---|
image | Image |
fill | Color |
ImageCrop(image, crop) ⇒ undefined
Crop an image to a defined rectangle
Kind: global function
Param | Type |
---|---|
image | Image |
crop | Rectangle |
ImageAlphaCrop(image, threshold) ⇒ undefined
Crop image depending on alpha value
Kind: global function
Param | Type |
---|---|
image | Image |
threshold | number |
ImageAlphaClear(image, color, threshold) ⇒ undefined
Clear alpha channel to desired color
Kind: global function
Param | Type |
---|---|
image | Image |
color | Color |
threshold | number |
ImageAlphaMask(image, alphaMask) ⇒ undefined
Apply alpha mask to image
Kind: global function
Param | Type |
---|---|
image | Image |
alphaMask | Image |
ImageAlphaPremultiply(image) ⇒ undefined
Premultiply alpha channel
Kind: global function
Param | Type |
---|---|
image | Image |
ImageResize(image, newWidth, newHeight) ⇒ undefined
Resize image (Bicubic scaling algorithm)
Kind: global function
Param | Type |
---|---|
image | Image |
newWidth | number |
newHeight | number |
ImageResizeNN(image, newWidth, newHeight) ⇒ undefined
Resize image (Nearest-Neighbor scaling algorithm)
Kind: global function
Param | Type |
---|---|
image | Image |
newWidth | number |
newHeight | number |
ImageResizeCanvas(image, newWidth, newHeight, offsetX, offsetY, fill) ⇒ undefined
Resize canvas and fill with color
Kind: global function
Param | Type |
---|---|
image | Image |
newWidth | number |
newHeight | number |
offsetX | number |
offsetY | number |
fill | Color |
ImageMipmaps(image) ⇒ undefined
Compute all mipmap levels for a provided image
Kind: global function
Param | Type |
---|---|
image | Image |
ImageDither(image, rBpp, gBpp, bBpp, aBpp) ⇒ undefined
Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
Kind: global function
Param | Type |
---|---|
image | Image |
rBpp | number |
gBpp | number |
bBpp | number |
aBpp | number |
ImageFlipVertical(image) ⇒ undefined
Flip image vertically
Kind: global function
Param | Type |
---|---|
image | Image |
ImageFlipHorizontal(image) ⇒ undefined
Flip image horizontally
Kind: global function
Param | Type |
---|---|
image | Image |
ImageRotateCW(image) ⇒ undefined
Rotate image clockwise 90deg
Kind: global function
Param | Type |
---|---|
image | Image |
ImageRotateCCW(image) ⇒ undefined
Rotate image counter-clockwise 90deg
Kind: global function
Param | Type |
---|---|
image | Image |
ImageColorTint(image, color) ⇒ undefined
Modify image color: tint
Kind: global function
Param | Type |
---|---|
image | Image |
color | Color |
ImageColorInvert(image) ⇒ undefined
Modify image color: invert
Kind: global function
Param | Type |
---|---|
image | Image |
ImageColorGrayscale(image) ⇒ undefined
Modify image color: grayscale
Kind: global function
Param | Type |
---|---|
image | Image |
ImageColorContrast(image, contrast) ⇒ undefined
Modify image color: contrast (-100 to 100)
Kind: global function
Param | Type |
---|---|
image | Image |
contrast | number |
ImageColorBrightness(image, brightness) ⇒ undefined
Modify image color: brightness (-255 to 255)
Kind: global function
Param | Type |
---|---|
image | Image |
brightness | number |
ImageColorReplace(image, color, replace) ⇒ undefined
Modify image color: replace color
Kind: global function
Param | Type |
---|---|
image | Image |
color | Color |
replace | Color |
ImageClearBackground(dst, color) ⇒ undefined
Clear image background with given color
Kind: global function
Param | Type |
---|---|
dst | Image |
color | Color |
ImageDrawPixel(dst, posX, posY, color) ⇒ undefined
Draw pixel within an image
Kind: global function
Param | Type |
---|---|
dst | Image |
posX | number |
posY | number |
color | Color |
ImageDrawPixelV(dst, position, color) ⇒ undefined
Draw pixel within an image (Vector version)
Kind: global function
Param | Type |
---|---|
dst | Image |
position | Vector2 |
color | Color |
ImageDrawLine(dst, startPosX, startPosY, endPosX, endPosY, color) ⇒ undefined
Draw line within an image
Kind: global function
Param | Type |
---|---|
dst | Image |
startPosX | number |
startPosY | number |
endPosX | number |
endPosY | number |
color | Color |
ImageDrawLineV(dst, start, end, color) ⇒ undefined
Draw line within an image (Vector version)
Kind: global function
Param | Type |
---|---|
dst | Image |
start | Vector2 |
end | Vector2 |
color | Color |
ImageDrawCircle(dst, centerX, centerY, radius, color) ⇒ undefined
Draw a filled circle within an image
Kind: global function
Param | Type |
---|---|
dst | Image |
centerX | number |
centerY | number |
radius | number |
color | Color |
ImageDrawCircleV(dst, center, radius, color) ⇒ undefined
Draw a filled circle within an image (Vector version)
Kind: global function
Param | Type |
---|---|
dst | Image |
center | Vector2 |
radius | number |
color | Color |
ImageDrawRectangle(dst, posX, posY, width, height, color) ⇒ undefined
Draw rectangle within an image
Kind: global function
Param | Type |
---|---|
dst | Image |
posX | number |
posY | number |
width | number |
height | number |
color | Color |
ImageDrawRectangleV(dst, position, size, color) ⇒ undefined
Draw rectangle within an image (Vector version)
Kind: global function
Param | Type |
---|---|
dst | Image |
position | Vector2 |
size | Vector2 |
color | Color |
ImageDrawRectangleRec(dst, rec, color) ⇒ undefined
Draw rectangle within an image
Kind: global function
Param | Type |
---|---|
dst | Image |
rec | Rectangle |
color | Color |
ImageDrawRectangleLines(dst, rec, thick, color) ⇒ undefined
Draw rectangle lines within an image
Kind: global function
Param | Type |
---|---|
dst | Image |
rec | Rectangle |
thick | number |
color | Color |
ImageDraw(dst, src, srcRec, dstRec, tint) ⇒ undefined
Draw a source image within a destination image (tint applied to source)
Kind: global function
Param | Type |
---|---|
dst | Image |
src | Image |
srcRec | Rectangle |
dstRec | Rectangle |
tint | Color |
ImageDrawText(dst, text, posX, posY, fontSize, color) ⇒ undefined
Draw text (using default font) within an image (destination)
Kind: global function
Param | Type |
---|---|
dst | Image |
text | string |
posX | number |
posY | number |
fontSize | number |
color | Color |
ImageDrawTextEx(dst, font, text, position, fontSize, spacing, tint) ⇒ undefined
Draw text (custom sprite font) within an image (destination)
Kind: global function
Param | Type |
---|---|
dst | Image |
font | Font |
text | string |
position | Vector2 |
fontSize | number |
spacing | number |
tint | Color |
GenTextureMipmaps(texture) ⇒ undefined
Generate GPU mipmaps for a texture
Kind: global function
Param | Type |
---|---|
texture | Texture |
UploadMesh(mesh, dynamic) ⇒ undefined
Upload mesh vertex data in GPU and provide VAO/VBO ids
Kind: global function
Param | Type |
---|---|
mesh | Mesh |
dynamic | boolean |
GenMeshTangents(mesh) ⇒ undefined
Compute mesh tangents
Kind: global function
Param | Type |
---|---|
mesh | Mesh |
SetModelMeshMaterial(model, meshId, materialId) ⇒ undefined
Set material for a mesh
Kind: global function
Param | Type |
---|---|
model | Model |
meshId | number |
materialId | number |
WaveCrop(wave, initSample, finalSample) ⇒ undefined
Crop a wave to defined samples range
Kind: global function
Param | Type |
---|---|
wave | Wave |
initSample | number |
finalSample | number |
WaveFormat(wave, sampleRate, sampleSize, channels) ⇒ undefined
Convert wave data to desired format
Kind: global function
Param | Type |
---|---|
wave | Wave |
sampleRate | number |
sampleSize | number |
channels | number |
Color(r, g, b, a) ⇒ Color
Color, 4 components, R8G8B8A8 (32bit)
Kind: global function
Returns: Color
- The new Color.
Param | Type | Description |
---|---|---|
r | number |
Color red value |
g | number |
Color green value |
b | number |
Color blue value |
a | number |
Color alpha value |
Vector2(x, y) ⇒ Vector2
Vector2, 2 components
Kind: global function
Returns: Vector2
- The new Vector2.
Param | Type | Description |
---|---|---|
x | number |
Vector x component |
y | number |
Vector y component |
Vector3(x, y, z) ⇒ Vector3
Vector3, 3 components
Kind: global function
Returns: Vector3
- The new Vector3.
Param | Type | Description |
---|---|---|
x | number |
Vector x component |
y | number |
Vector y component |
z | number |
Vector z component |
Vector4(x, y, z, w) ⇒ Vector4
Vector4, 4 components
Kind: global function
Returns: Vector4
- The new Vector4.
Param | Type | Description |
---|---|---|
x | number |
Vector x component |
y | number |
Vector y component |
z | number |
Vector z component |
w | number |
Vector w component |
Rectangle(x, y, width, height) ⇒ Rectangle
Rectangle, 4 components
Kind: global function
Returns: Rectangle
- The new Rectangle.
Param | Type | Description |
---|---|---|
x | number |
Rectangle top-left corner position x |
y | number |
Rectangle top-left corner position y |
width | number |
Rectangle width |
height | number |
Rectangle height |
Camera2D(offset, target, rotation, zoom) ⇒ Camera2D
Camera2D, defines position/orientation in 2d space
Kind: global function
Returns: Camera2D
- The new Camera2D.
Param | Type | Description |
---|---|---|
offset | Vector2 |
Camera offset (displacement from target) |
target | Vector2 |
Camera target (rotation and zoom origin) |
rotation | number |
Camera rotation in degrees |
zoom | number |
Camera zoom (scaling), should be 1.0f by default |
Camera3D(position, target, up, fovy, projection) ⇒ Camera3D
Camera, defines position/orientation in 3d space
Kind: global function
Returns: Camera3D
- The new Camera3D.
Param | Type | Description |
---|---|---|
position | Vector3 |
Camera position |
target | Vector3 |
Camera target it looks-at |
up | Vector3 |
Camera up vector (rotation over its axis) |
fovy | number |
Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic |
projection | number |
Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC |
SetShaderFloat(shader, locIndex, value) ⇒ undefined
Set shader uniform value float
Kind: global function
Param | Type |
---|---|
shader | Shader |
locIndex | number |
value | number |
SetShaderInt(shader, locIndex, value) ⇒ undefined
Set shader uniform value float
Kind: global function
Param | Type |
---|---|
shader | Shader |
locIndex | number |
value | number |
SetShaderVec2(shader, locIndex, value) ⇒ undefined
Set shader uniform value vector2
Kind: global function
Param | Type |
---|---|
shader | Shader |
locIndex | number |
value | Vector2 |
SetShaderVec3(shader, locIndex, value) ⇒ undefined
Set shader uniform value vector3
Kind: global function
Param | Type |
---|---|
shader | Shader |
locIndex | number |
value | Vector3 |
SetShaderVec4(shader, locIndex, value) ⇒ undefined
Set shader uniform value vector4
Kind: global function
Param | Type |
---|---|
shader | Shader |
locIndex | number |
value | Vector4 |