raylib
library
Classes
-
BoneInfo
-
Bone, skeletal animation bone.
-
BoundingBox
-
BoundingBox.
-
Camera2D
-
Camera2D, defines position/orientation in 2d space.
-
Camera3D
-
Camera, defines position/orientation in 3d space.
-
Color
-
Color, 4 components, R8G8B8A8 (32bit).
-
ConfigFlags
-
System/Window config flags.
-
Font
-
Font, font texture and GlyphInfo array data.
-
Gesture
-
Gesture.
-
GlyphInfo
-
GlyphInfo, font characters glyphs info.
-
Image
-
Image, pixel data stored in CPU memory (RAM).
-
Material
-
Material, includes shader and maps.
-
MaterialMap
-
MaterialMap.
-
Matrix
-
Matrix, 4x4 components, column major, OpenGL style, right handed.
-
Mesh
-
Mesh, vertex data and vao/vbo.
-
Model
-
Model, meshes, materials and animation data.
-
ModelAnimation
-
ModelAnimation.
-
NPatchInfo
-
NPatchInfo, n-patch layout info.
-
Ray
-
Ray, ray for raycasting.
-
RayCollision
-
RayCollision, ray hit information.
-
Rectangle
-
Rectangle, 4 components.
-
RenderTexture
-
RenderTexture, fbo for texture rendering.
-
Shader
-
Material, includes shader and maps.
-
Texture
-
Texture, tex data stored in GPU memory (VRAM).
-
Transform
-
Bone, skeletal animation bone.
-
Vector2
-
Vector2, 2 components.
-
Vector3
-
Vector3, 3 components.
-
Vector4
-
Vector4, 4 components.
Extensions
-
BoneInfoList
on PointerList<BoneInfo>
-
Adds extension for lists of BoneInfo.
-
FloatList
on PointerList<Float>
-
Adds extension for lists of doubles.
-
GlyphInfoList
on PointerList<GlyphInfo>
-
Adds extension for lists of GlyphInfo.
-
ListOfTransformPointers
on PointerList<Pointer<Transform>>
-
Adds extension for a list of list of Transforms.
-
MaterialList
on PointerList<Material>
-
Adds extension for lists of Material.
-
MaterialMapList
on PointerList<MaterialMap>
-
Adds extension for lists of MaterialMap.
-
MeshList
on PointerList<Mesh>
-
Adds extension for lists of GlyphInfo.
-
RectangleList
on PointerList<Rectangle>
-
Adds extension for lists of Rectangles.
-
TransformList
on PointerList<Transform>
-
Adds extension for lists of Transform.
-
Uint16List
on PointerList<Uint16>
-
Adds extension for lists of uint16.
-
Uint32List
on PointerList<Uint32>
-
Adds extension for lists of uint32.
-
Uint8List
on PointerList<Uint8>
-
Adds extension for lists of uint8.
Functions
-
beginBlendMode(BlendMode mode)
→ void
-
Begin blending mode (alpha, additive, multiplied, subtract, custom).
-
beginDrawing()
→ void
-
Setup canvas (framebuffer) to start drawing.
-
beginMode2D(Camera2D camera)
→ void
-
Begin 2D mode with custom camera (2D).
-
beginMode3D(Camera3D camera)
→ void
-
Begin 3D mode with custom camera (3D).
-
beginScissorMode(int x, int y, int width, int height)
→ void
-
Begin scissor mode (define screen area for following drawing).
-
beginShaderMode(Shader shader)
→ void
-
Begin custom shader drawing.
-
beginTextureMode(RenderTexture2D target)
→ void
-
Begin drawing to render texture.
-
checkCollisionBoxes(BoundingBox box1, BoundingBox box2)
→ bool
-
Check collision between two bounding boxes.
-
checkCollisionBoxSphere(BoundingBox box, Vector3 center, double radius)
→ bool
-
Check collision between box and sphere.
-
checkCollisionCircleRec(Vector2 center, double radius, Rectangle rec)
→ bool
-
Check collision between circle and rectangle.
-
checkCollisionCircles(Vector2 center1, double radius1, Vector2 center2, double radius2)
→ bool
-
Check collision between two circles.
-
checkCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 collisionPoint)
→ bool
-
Check the collision between two lines defined by two points each, returns
collision point by reference.
-
checkCollisionPointCircle(Vector2 point, Vector2 center, double radius)
→ bool
-
Check if point is inside circle.
-
checkCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold)
→ bool
-
Check if point belongs to line created between two points
p1
and p2
with defined margin in pixels threshold
.
-
checkCollisionPointRec(Vector2 point, Rectangle rec)
→ bool
-
Check if point is inside rectangle.
-
checkCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3)
→ bool
-
Check if point is inside a triangle.
-
checkCollisionRecs(Rectangle rec1, Rectangle rec2)
→ bool
-
Check collision between two rectangles.
-
checkCollisionSpheres(Vector3 center1, double radius1, Vector3 center2, double radius2)
→ bool
-
Check collision between two spheres.
-
clearBackground(Color color)
→ void
-
Set background color (framebuffer clear color).
-
clearWindowState(int flags)
→ void
-
Clear window configuration state flags.
-
closeWindow()
→ void
-
Close window and unload OpenGL context.
-
colorAlpha(Color color, double alpha)
→ Color
-
Returns color with alpha applied, alpha goes from 0.0 to 1.0.
-
colorAlphaBlend(Color dst, Color src, Color tint)
→ Color
-
Returns src alpha-blended into dst color with tint.
-
colorFromHSV(double hue, double saturation, double value)
→ Color
-
Returns a Color from HSV values, hue (0..360), saturation/value (0..1).
-
colorFromNormalized(Vector4 normalized)
→ Color
-
Returns Color from normalized values (0..1).
-
colorNormalize(Color color)
→ Vector4
-
Returns Color normalized as double (0..1).
-
colorToHSV(Color color)
→ Vector3
-
Returns HSV values for a Color, hue (0..360), saturation/value (0..1).
-
colorToInt(Color color)
→ int
-
Returns hexadecimal value for a Color.
-
disableCursor()
→ void
-
Disables cursor (lock cursor).
-
drawBillboard(Camera camera, Texture2D texture, Vector3 position, double size, Color tint)
→ void
-
Draw a billboard texture.
-
drawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, double rotation, Color tint)
→ void
-
Draw a billboard texture defined by source and rotation.
-
drawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint)
→ void
-
Draw a billboard texture defined by source.
-
drawBoundingBox(BoundingBox box, Color color)
→ void
-
Draw bounding box (wires).
-
drawCircle(int centerX, int centerY, double radius, Color color)
→ void
-
Draw a color-filled circle.
-
drawCircle3D(Vector3 center, double radius, Vector3 rotationAxis, double rotationAngle, Color color)
→ void
-
Draw a circle in 3D world space.
-
drawCircleGradient(int centerX, int centerY, double radius, Color color1, Color color2)
→ void
-
Draw a gradient-filled circle.
-
drawCircleLines(int centerX, int centerY, double radius, Color color)
→ void
-
Draw circle outline.
-
drawCircleSector(Vector2 center, double radius, double startAngle, double endAngle, int segments, Color color)
→ void
-
Draw a piece of a circle.
-
drawCircleSectorLines(Vector2 center, double radius, double startAngle, double endAngle, int segments, Color color)
→ void
-
Draw circle sector outline.
-
drawCircleV(Vector2 center, double radius, Color color)
→ void
-
Draw a color-filled circle (Vector version).
-
drawCube(Vector3 position, double width, double height, double length, Color color)
→ void
-
Draw cube.
-
drawCubeTexture(Texture2D texture, Vector3 position, double width, double height, double length, Color color)
→ void
-
Draw cube textured.
-
drawCubeTextureRec(Texture2D texture, Rectangle source, Vector3 position, double width, double height, double length, Color color)
→ void
-
Draw cube with a region of a texture.
-
drawCubeV(Vector3 position, Vector3 size, Color color)
→ void
-
Draw cube (Vector version).
-
drawCubeWires(Vector3 position, double width, double height, double length, Color color)
→ void
-
Draw cube wires.
-
drawCubeWiresV(Vector3 position, Vector3 size, Color color)
→ void
-
Draw cube wires (Vector version).
-
drawCylinder(Vector3 position, double radiusTop, double radiusBottom, double height, int slices, Color color)
→ void
-
Draw a cylinder/cone.
-
drawCylinderEx(Vector3 startPos, Vector3 endPos, double startRadius, double endRadius, int sides, Color color)
→ void
-
Draw a cylinder with base at startPos and top at endPos.
-
drawCylinderWires(Vector3 position, double radiusTop, double radiusBottom, double height, int slices, Color color)
→ void
-
Draw a cylinder/cone wires.
-
drawCylinderWiresEx(Vector3 startPos, Vector3 endPos, double startRadius, double endRadius, int sides, Color color)
→ void
-
Draw a cylinder wires with base at startPos and top at endPos.
-
drawEllipse(int centerX, int centerY, double radiusH, double radiusV, Color color)
→ void
-
Draw ellipse.
-
drawEllipseLines(int centerX, int centerY, double radiusH, double radiusV, Color color)
→ void
-
Draw ellipse outline.
-
drawFPS(int posX, int posY)
→ void
-
Draw current FPS
-
drawGrid(int slices, double spacing)
→ void
-
Draw a grid (centered at (0, 0, 0)).
-
drawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color)
→ void
-
Draw a line.
-
drawLine3D(Vector3 startPos, Vector3 endPos, Color color)
→ void
-
Draw a line in 3D world space.
-
drawLineBezier(Vector2 startPos, Vector2 endPos, double thick, Color color)
→ void
-
Draw a line using cubic-bezier curves in-out.
-
drawLineBezierCubic(Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, double thick, Color color)
→ void
-
Draw line using cubic bezier curves with 2 control points.
-
drawLineBezierQuad(Vector2 startPos, Vector2 endPos, Vector2 controlPos, double thick, Color color)
→ void
-
Draw line using quadratic bezier curves with a control point.
-
drawLineEx(Vector2 startPos, Vector2 endPos, double thick, Color color)
→ void
-
Draw a line defining thickness.
-
drawLineStrip(List<Vector2> points, Color color)
→ void
-
Draw lines sequence.
-
drawLineV(Vector2 startPos, Vector2 endPos, Color color)
→ void
-
Draw a line (Vector version).
-
drawMesh(Mesh mesh, Material material, Matrix transform)
→ void
-
Draw a 3d mesh with material and transform.
-
drawMeshInstanced(Mesh mesh, Material material, List<Matrix> transforms, int instances)
→ void
-
Draw multiple mesh instances with material and different transforms.
-
drawModel(Model model, Vector3 position, double scale, Color tint)
→ void
-
Draw a model (with texture if set).
-
drawModelEx(Model model, Vector3 position, Vector3 rotationAxis, double rotationAngle, Vector3 scale, Color tint)
→ void
-
Draw a model with extended parameters.
-
drawModelWires(Model model, Vector3 position, double scale, Color tint)
→ void
-
Draw a model wires (with texture if set).
-
drawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, double rotationAngle, Vector3 scale, Color tint)
→ void
-
Draw a model wires (with texture if set) with extended parameters.
-
drawPixel(int posX, int posY, Color color)
→ void
-
Draw a pixel.
-
drawPixelV(Vector2 position, Color color)
→ void
-
Draw a pixel (Vector version).
-
drawPlane(Vector3 centerPos, Vector2 size, Color color)
→ void
-
Draw a plane XZ.
-
drawPoint3D(Vector3 position, Color color)
→ void
-
Draw a point in 3D space, actually a small line.
-
drawPoly(Vector2 center, int sides, double radius, double rotation, Color color)
→ void
-
Draw a regular polygon (Vector version).
-
drawPolyLines(Vector2 center, int sides, double radius, double rotation, Color color)
→ void
-
Draw a polygon outline of n sides.
-
drawPolyLinesEx(Vector2 center, int sides, double radius, double rotation, double lineThick, Color color)
→ void
-
Draw a polygon outline of n sides with extended parameters.
-
drawRay(Ray ray, Color color)
→ void
-
Draw a ray line.
-
drawRectangle(int posX, int posY, int width, int height, Color color)
→ void
-
Draw a color-filled rectangle.
-
drawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4)
→ void
-
Draw a gradient-filled rectangle with custom vertex colors.
-
drawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2)
→ void
-
Draw a horizontal-gradient-filled rectangle.
-
drawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2)
→ void
-
Draw a vertical-gradient-filled rectangle.
-
drawRectangleLines(int posX, int posY, int width, int height, Color color)
→ void
-
Draw rectangle outline.
-
drawRectangleLinesEx(Rectangle rec, double lineThick, Color color)
→ void
-
Draw rectangle outline with extended parameters.
-
drawRectanglePro(Rectangle rec, Vector2 origin, double rotation, Color color)
→ void
-
Draw a color-filled rectangle with pro parameters.
-
drawRectangleRec(Rectangle rec, Color color)
→ void
-
Draw a color-filled rectangle.
-
drawRectangleRounded(Rectangle rec, double roundness, int segments, Color color)
→ void
-
Draw rectangle with rounded edges.
-
drawRectangleRoundedLines(Rectangle rec, double roundness, int segments, double lineThick, Color color)
→ void
-
Draw rectangle with rounded edges outline.
-
drawRectangleV(Vector2 position, Vector2 size, Color color)
→ void
-
Draw a color-filled rectangle (Vector version).
-
drawRing(Vector2 center, double innerRadius, double outerRadius, double startAngle, double endAngle, int segments, Color color)
→ void
-
Draw ring.
-
drawRingLines(Vector2 center, double innerRadius, double outerRadius, double startAngle, double endAngle, int segments, Color color)
→ void
-
Draw ring outline.
-
drawSphere(Vector3 centerPos, double radius, Color color)
→ void
-
Draw sphere.
-
drawSphereEx(Vector3 centerPos, double radius, int rings, int slices, Color color)
→ void
-
Draw sphere with extended parameters.
-
drawSphereWires(Vector3 centerPos, double radius, int rings, int slices, Color color)
→ void
-
Draw sphere wires.
-
drawText(String text, int posX, int posY, int fontSize, Color color)
→ void
-
Draw text (using default font)
-
drawTextCodepoint(Font font, int codepoint, Vector2 position, double fontSize, Color tint)
→ void
-
Draw one character (codepoint).
-
drawTextEx(Font font, String text, Vector2 position, double fontSize, double spacing, Color tint)
→ void
-
Draw text using font and additional parameters.
-
drawTextPro(Font font, String text, Vector2 position, Vector2 origin, double rotation, double fontSize, double spacing, Color tint)
→ void
-
Draw text using Font and pro parameters (rotation).
-
drawTexture(Texture2D texture, int posX, int posY, Color tint)
→ void
-
Draw a Texture2D.
-
drawTextureEx(Texture2D texture, Vector2 position, double rotation, double scale, Color tint)
→ void
-
Draw a Texture2D with extended parameters.
-
drawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, double rotation, Color tint)
→ void
-
Draws a texture (or part of it) that stretches or shrinks nicely.
-
drawTexturePoly(Texture2D texture, Vector2 center, List<Vector2> points, List<Vector2> texcoords, int pointsCount, Color tint)
→ void
-
Draw a textured polygon.
-
drawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, double rotation, Color tint)
→ void
-
Draw a part of a texture defined by a rectangle with 'pro' parameters.
-
drawTextureQuad(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint)
→ void
-
Draw texture quad with tiling and offset parameters.
-
drawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint)
→ void
-
Draw a part of a texture defined by a rectangle.
-
drawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, double rotation, double scale, Color tint)
→ void
-
Draw part of a texture (defined by a rectangle) with rotation and scale
tiled into dest..
-
drawTextureV(Texture2D texture, Vector2 position, Color tint)
→ void
-
Draw a Texture2D with position defined as Vector2.
-
drawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color)
→ void
-
Draw a color-filled triangle (vertex in counter-clockwise order!).
-
drawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color)
→ void
-
Draw a color-filled triangle (vertex in counter-clockwise order!).
-
drawTriangleFan(List<Vector2> points, Color color)
→ void
-
Draw a triangle fan defined by points (first vertex is the center).
-
drawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color)
→ void
-
Draw triangle outline (vertex in counter-clockwise order!).
-
drawTriangleStrip(List<Vector2> points, Color color)
→ void
-
Draw a triangle strip defined by points.
-
drawTriangleStrip3D(List<Vector3> points, int pointsCount, Color color)
→ void
-
Draw a triangle strip defined by points.
-
enableCursor()
→ void
-
Enables cursor (unlock cursor).
-
endBlendMode()
→ void
-
End blending mode (reset to default: alpha blending).
-
endDrawing()
→ void
-
End canvas drawing and swap buffers (double buffering).
-
endMode2D()
→ void
-
Ends 2D mode with custom camera.
-
endMode3D()
→ void
-
Ends 3D mode and returns to default 2D orthographic mode.
-
endScissorMode()
→ void
-
End scissor mode.
-
endShaderMode()
→ void
-
End custom shader drawing (use default shader).
-
endTextureMode()
→ void
-
Ends drawing to render texture.
-
exportImage(Image image, String fileName)
→ bool
-
Export image data to file, returns true on success.
-
exportImageAsCode(Image image, String fileName)
→ bool
-
Export image as code file defining an array of bytes,
returns true on success.
-
exportMesh(Mesh mesh, String fileName)
→ bool
-
Export mesh data to file, returns true on success.
-
fade(Color color, double alpha)
→ Color
-
Returns color with alpha applied, alpha goes from 0.0 to 1.0.
-
genImageCellular(int width, int height, int tileSize)
→ Image
-
Generate image: cellular algorithm. Bigger tileSize means bigger cells.
-
genImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2)
→ Image
-
Generate image: checked.
-
genImageColor(int width, int height, Color color)
→ Image
-
Generate image: plain color.
-
genImageGradientH(int width, int height, Color left, Color right)
→ Image
-
Generate image: horizontal gradient.
-
genImageGradientRadial(int width, int height, double density, Color inner, Color outer)
→ Image
-
Generate image: radial gradient.
-
genImageGradientV(int width, int height, Color top, Color bottom)
→ Image
-
Generate image: vertical gradient.
-
genImageWhiteNoise(int width, int height, double factor)
→ Image
-
Generate image: white noise.
-
genMeshBinormals(Mesh mesh)
→ void
-
Compute mesh binormals.
-
genMeshCone(double radius, double height, int slices)
→ Mesh
-
Generate cone/pyramid mesh.
-
genMeshCube(double width, double height, double length)
→ Mesh
-
Generate cuboid mesh.
-
genMeshCubicmap(Image cubicmap, Vector3 cubeSize)
→ Mesh
-
Generate cubes-based map mesh from image data.
-
genMeshCylinder(double radius, double height, int slices)
→ Mesh
-
Generate cylinder mesh.
-
genMeshHeightmap(Image heightmap, Vector3 size)
→ Mesh
-
Generate heightmap mesh from image data.
-
genMeshHemiSphere(double radius, int rings, int slices)
→ Mesh
-
Generate half-sphere mesh (no bottom cap).
-
genMeshKnot(double radius, double size, int radSeg, int sides)
→ Mesh
-
Generate trefoil knot mesh.
-
genMeshPlane(double width, double length, int resX, int resZ)
→ Mesh
-
Generate plane mesh (with subdivisions).
-
genMeshPoly(int sides, double radius)
→ Mesh
-
Generate polygonal mesh.
-
genMeshSphere(double radius, int rings, int slices)
→ Mesh
-
Generate sphere mesh (standard sphere).
-
genMeshTangents(Mesh mesh)
→ void
-
Compute mesh tangents.
-
genMeshTorus(double radius, double size, int radSeg, int sides)
→ Mesh
-
Generate torus mesh.
-
getCameraMatrix(Camera3D camera)
→ Matrix
-
Get camera transform matrix (view matrix).
-
getCameraMatrix2D(Camera2D camera)
→ Matrix
-
Get camera 2d transform matrix.
-
getCharPressed()
→ int
-
Get char pressed (unicode), call it multiple times for chars queued,
returns 0 when the queue is empty.
-
getClipboardText()
→ String
-
Get clipboard text content.
-
getCollisionRec(Rectangle rec1, Rectangle rec2)
→ Rectangle
-
Get collision rectangle for two rectangles collision.
-
getColor(int hexValue)
→ Color
-
Get Color structure from hexadecimal value.
-
getCurrentMonitor()
→ int
-
Get current connected monitor.
-
getFPS()
→ int
-
Get current FPS.
-
getFrameTime()
→ double
-
Get time in seconds for last frame drawn (delta time).
-
getGamepadAxisCount(int gamepad)
→ int
-
Get gamepad axis count for a gamepad.
-
getGamepadAxisMovement(int gamepad, GamepadAxis axis)
→ double
-
Get axis movement value for a gamepad axis.
-
getGamepadButtonPressed()
→ GamepadButton
-
Get the last gamepad button pressed.
-
getGamepadName(int gamepad)
→ String
-
Get gamepad internal name id.
-
getGestureDetected()
→ int
-
Get latest detected gesture.
-
getGestureDragAngle()
→ double
-
Get gesture drag angle.
-
getGestureDragVector()
→ Vector2
-
Get gesture drag vector.
-
getGestureHoldDuration()
→ double
-
Get gesture hold time in milliseconds.
-
getGesturePinchAngle()
→ double
-
Get gesture pinch angle.
-
getGesturePinchVector()
→ Vector2
-
Get gesture pinch delta.
-
getGlyphAtlasRec(Font font, int codepoint)
→ Rectangle
-
Get glyph rectangle in font atlas for a codepoint (unicode character),
fallback to '?' if not found.
-
getGlyphIndex(Font font, int codepoint)
→ int
-
Get glyph index position in font for a codepoint (unicode character),
fallback to '?' if not found.
-
getGlyphInfo(Font font, int codepoint)
→ GlyphInfo
-
Get glyph font info data for a codepoint (unicode character),
fallback to '?' if not found.
-
getImageAlphaBorder(Image image, double threshold)
→ Rectangle
-
Get image alpha border rectangle.
-
getImageColor(Image image, int x, int y)
→ Color
-
Get image pixel color at (x, y) position.
-
getKeyPressed()
→ KeyboardKey
-
Get key pressed (keycode), call it multiple times for keys queued,
returns 0 when the queue is empty.
-
getMeshBoundingBox(Mesh mesh)
→ BoundingBox
-
Compute mesh bounding box limits.
-
getModelBoundingBox(Model model)
→ BoundingBox
-
Compute model bounding box limits (considers all meshes).
-
getMonitorCount()
→ int
-
Get number of connected monitors.
-
getMonitorHeight(int monitor)
→ int
-
Get specified monitor height (max available by monitor).
-
getMonitorName(int monitor)
→ String
-
Get the human-readable, UTF-8 encoded name of the primary monitor.
-
getMonitorPhysicalHeight(int monitor)
→ int
-
Get specified monitor physical height in millimetres.
-
getMonitorPhysicalWidth(int monitor)
→ int
-
Get specified monitor physical width in millimetres.
-
getMonitorPosition(int monitor)
→ Vector2
-
Get specified monitor position.
-
getMonitorRefreshRate(int monitor)
→ int
-
Get specified monitor refresh rate
-
getMonitorWidth(int monitor)
→ int
-
Get specified monitor width (max available by monitor).
-
getMouseDelta()
→ Vector2
-
Get mouse delta between frames.
-
getMousePosition()
→ Vector2
-
Get mouse position XY.
-
getMouseRay(Vector2 mousePosition, Camera3D camera)
→ Ray
-
Get a ray trace from mouse position.
-
getMouseWheelMove()
→ double
-
Get mouse wheel movement Y.
-
getMouseX()
→ int
-
Get mouse position X.
-
getMouseY()
→ int
-
Get mouse position Y.
-
getPixelColor(PixelFormat format)
→ Color
-
Get Color from a source pixel pointer of certain format.
-
getPixelDataSize(int width, int height, PixelFormat format)
→ int
-
Get pixel data size in bytes for certain format.
-
getRayCollisionBox(Ray ray, BoundingBox box)
→ RayCollision
-
Get collision info between ray and box.
-
getRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform)
→ RayCollision
-
Get collision info between ray and mesh.
-
getRayCollisionModel(Ray ray, Model model)
→ RayCollision
-
Get collision info between ray and model.
-
getRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4)
→ RayCollision
-
Get collision info between ray and quad.
-
getRayCollisionSphere(Ray ray, Vector3 center, double radius)
→ RayCollision
-
Get collision info between ray and sphere.
-
getRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3)
→ RayCollision
-
Get collision info between ray and triangle.
-
getScreenHeight()
→ int
-
Get current screen height.
-
getScreenToWorld2D(Vector2 position, Camera2D camera)
→ Vector2
-
Get the world space position for a 2d camera screen space position.
-
getScreenWidth()
→ int
-
Get native window handle.
Get current screen width.
-
getShaderLocation(Shader shader, String uniformName)
→ int
-
Get shader uniform location.
-
getShaderLocationAttrib(Shader shader, String attribName)
→ int
-
Get shader attribute location.
-
getTime()
→ double
-
Get elapsed time in seconds since initWindow().
-
getTouchPointCount()
→ int
-
Get number of touch points.
-
getTouchPointId(int index)
→ int
-
Get touch point identifier for given index.
-
getTouchPosition(int index)
→ Vector2
-
Get touch position XY for a touch point index (relative to screen size).
-
getTouchX()
→ int
-
Get touch position X for touch point 0 (relative to screen size).
-
getTouchY()
→ int
-
Get touch position Y for touch point 0 (relative to screen size).
-
getWindowPosition()
→ Vector2
-
Get window position XY on monitor.
-
getWindowScaleDPI()
→ Vector2
-
Get window scale DPI factor.
-
getWorldToScreen(Vector3 position, Camera3D camera)
→ Vector2
-
Get the screen space position for a 3d world space position.
-
getWorldToScreen2D(Vector2 position, Camera2D camera)
→ Vector2
-
Get the screen space position for a 2d camera world space position.
-
getWorldToScreenEx(Vector3 position, Camera3D camera, int width, int height)
→ Vector2
-
Get size position for a 3d world space position.
-
hideCursor()
→ void
-
Hides cursor.
-
imageAlphaClear(Image image, Color color, double threshold)
→ void
-
Clear alpha channel to desired color.
-
imageAlphaCrop(Image image, double threshold)
→ void
-
Crop image depending on alpha value.
-
imageAlphaMask(Image image, Image alphaMask)
→ void
-
Apply alpha mask to image.
-
imageAlphaPremultiply(Image image)
→ void
-
Premultiply alpha channel.
-
imageClearBackground(Image dst, Color color)
→ void
-
Clear image background with given color.
-
imageColorBrightness(Image image, int brightness)
→ void
-
Modify image color: brightness (-255 to 255).
-
imageColorContrast(Image image, double contrast)
→ void
-
Modify image color: contrast (-100 to 100).
-
imageColorGrayscale(Image image)
→ void
-
Modify image color: grayscale.
-
imageColorInvert(Image image)
→ void
-
Modify image color: invert.
-
imageColorReplace(Image image, Color color, Color replace)
→ void
-
Modify image color: replace color.
-
imageColorTint(Image image, Color color)
→ void
-
Modify image color: tint.
-
imageCopy(Image image)
→ Image
-
Create an image duplicate (useful for transformations).
-
imageCrop(Image image, Rectangle crop)
→ void
-
Crop an image to a defined rectangle.
-
imageDither(Image image, int rBpp, int gBpp, int bBpp, int aBpp)
→ void
-
Dither image data to 16bpp or lower (Floyd-Steinberg dithering).
-
imageDraw(Image dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint)
→ void
-
Draw a source image within a destination image (tint applied to source).
-
imageDrawCircle(Image dst, int centerX, int centerY, int radius, Color color)
→ void
-
Draw circle within an image.
-
imageDrawCircleV(Image dst, Vector2 center, int radius, Color color)
→ void
-
Draw circle within an image (Vector version).
-
imageDrawLine(Image dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color)
→ void
-
Draw line within an image.
-
imageDrawLineV(Image dst, Vector2 start, Vector2 end, Color color)
→ void
-
Draw line within an image (Vector version).
-
imageDrawPixel(Image dst, int posX, int posY, Color color)
→ void
-
Draw pixel within an image.
-
imageDrawPixelV(Image dst, Vector2 position, Color color)
→ void
-
Draw pixel within an image (Vector version).
-
imageDrawRectangle(Image dst, int posX, int posY, int width, int height, Color color)
→ void
-
Draw rectangle within an image.
-
imageDrawRectangleLines(Image dst, Rectangle rec, int thick, Color color)
→ void
-
Draw rectangle lines within an image.
-
imageDrawRectangleRec(Image dst, Rectangle rec, Color color)
→ void
-
Draw rectangle within an image.
-
imageDrawRectangleV(Image dst, Vector2 position, Vector2 size, Color color)
→ void
-
Draw rectangle within an image (Vector version).
-
imageDrawText(Image dst, String text, int posX, int posY, int fontSize, Color color)
→ void
-
Draw text (using default font) within an image (destination).
-
imageDrawTextEx(Image dst, Font font, String text, Vector2 position, double fontSize, double spacing, Color tint)
→ void
-
Draw text (custom sprite font) within an image (destination).
-
imageFlipHorizontal(Image image)
→ void
-
Flip image horizontally.
-
imageFlipVertical(Image image)
→ void
-
Flip image vertically.
-
imageFormat(Image image, PixelFormat newFormat)
→ void
-
Convert image data to desired format.
-
imageFromImage(Image image, Rectangle rec)
→ Image
-
Create an image from another image piece.
-
imageMipmaps(Image image)
→ void
-
Generate all mipmap levels for a provided image.
-
imageResize(Image image, int newWidth, int newHeight)
→ void
-
Resize image (Bicubic scaling algorithm).
-
imageResizeCanvas(Image image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill)
→ void
-
Resize canvas and fill with color.
-
imageResizeNN(Image image, int newWidth, int newHeight)
→ void
-
Resize image (Nearest-Neighbor scaling algorithm).
-
imageRotateCCW(Image image)
→ void
-
Rotate image counter-clockwise 90deg.
-
imageRotateCW(Image image)
→ void
-
Rotate image clockwise 90deg.
-
imageText(String text, int fontSize, Color color)
→ Image
-
Create an image from text (default font).
-
imageTextEx(Font font, String text, double fontSize, double spacing, Color tint)
→ Image
-
Create an image from text (custom sprite font).
-
imageToPOT(Image image, Color fill)
→ void
-
Convert image to POT (power-of-two).
-
initLibrary({String? linux, String? windows})
→ void
-
Initialize the raylib library by passing the path to the library for each
supported platform.
-
initWindow(int screenWidth, int screenHeight, String title)
→ void
-
Initialize window and OpenGL context.
-
isCursorHidden()
→ bool
-
Check if cursor is not visible.
-
isCursorOnScreen()
→ bool
-
Check if cursor is on the screen.
-
isGamepadAvailable(int gamepad)
→ bool
-
Check if a gamepad is available.
-
isGamepadButtonDown(int gamepad, GamepadButton button)
→ bool
-
Check if a gamepad button is being pressed.
-
isGamepadButtonPressed(int gamepad, GamepadButton button)
→ bool
-
Check if a gamepad button has been pressed once.
-
isGamepadButtonReleased(int gamepad, GamepadButton button)
→ bool
-
Check if a gamepad button has been released once.
-
isGamepadButtonUp(int gamepad, GamepadButton button)
→ bool
-
Check if a gamepad button is NOT being pressed.
-
isGestureDetected(int gesture)
→ bool
-
Check if a gesture have been detected.
-
isKeyDown(KeyboardKey key)
→ bool
-
Check if a key is being pressed.
-
isKeyPressed(KeyboardKey key)
→ bool
-
Check if a key has been pressed once.
-
isKeyReleased(KeyboardKey key)
→ bool
-
Check if a key has been released once.
-
isKeyUp(KeyboardKey key)
→ bool
-
Check if a key is NOT being pressed.
-
isModelAnimationValid(Model model, ModelAnimation anim)
→ bool
-
Check model animation skeleton match.
-
isMouseButtonDown(MouseButton button)
→ bool
-
Check if a mouse button is being pressed.
-
isMouseButtonPressed(MouseButton button)
→ bool
-
Check if a mouse button has been pressed once.
-
isMouseButtonReleased(MouseButton button)
→ bool
-
Check if a mouse button has been released once.
-
isMouseButtonUp(MouseButton button)
→ bool
-
Check if a mouse button is NOT being pressed.
-
isWindowFocused()
→ bool
-
Check if window is currently focused (only PLATFORM_DESKTOP).
-
isWindowFullscreen()
→ bool
-
Check if window is currently fullscreen.
-
isWindowHidden()
→ bool
-
Check if window is currently hidden (only PLATFORM_DESKTOP).
-
isWindowMaximized()
→ bool
-
Check if window is currently maximized (only PLATFORM_DESKTOP).
-
isWindowMinimized()
→ bool
-
Check if window is currently minimized (only PLATFORM_DESKTOP).
-
isWindowReady()
→ bool
-
Check if window has been initialized successfully.
-
isWindowResized()
→ bool
-
Check if window has been resized last frame.
-
isWindowState(int flag)
→ bool
-
Check if one specific window flag is enabled.
-
loadImage(String fileName)
→ Image
-
Load image from file into CPU memory (RAM).
-
loadImageAnim(String fileName)
→ Image
-
Load image sequence from file (frames appended to image.data).
-
loadImageColors(Image image)
→ List<Color>
-
Load color data from image as a Color array (RGBA - 32bit).
-
loadImageFromMemory(String fileType, String fileData, int dataSize)
→ Image
-
Load image from memory buffer.
-
loadImageFromScreen()
→ Image
-
Load image from screen buffer and (screenshot).
-
loadImageFromTexture(Texture2D texture)
→ Image
-
Load image from GPU texture data.
-
loadImagePalette(Image image, int maxPaletteSize)
→ List<Color>
-
Load colors palette from image as a Color array (RGBA - 32bit).
-
loadImageRaw(String fileName, int width, int height, PixelFormat format, )
→ Image
-
Load image from RAW file data.
-
loadMaterialDefault()
→ Material
-
Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps).
-
loadMaterials(String fileName)
→ List<Material>
-
Load materials from model file.
-
loadModel(String fileName)
→ Model
-
Load model from files (meshes and materials).
-
loadModelAnimations(String fileName)
→ List<ModelAnimation>
-
Load materials from model file.
-
loadModelFromMesh(Mesh mesh)
→ Model
-
Load model from generated mesh (default material).
-
loadRenderTexture(int width, int height)
→ RenderTexture2D
-
Load texture for rendering (framebuffer).
-
loadShader(String vsFileName, String fsFileName)
→ Shader
-
Load shader from files and bind default locations.
-
loadShaderFromMemory(String vsCode, String fsCode)
→ Shader
-
Load shader from code strings and bind default locations.
-
loadTexture(String fileName)
→ Texture2D
-
Load texture from file into GPU memory (VRAM).
-
loadTextureCubemap(Image image, CubemapLayout layout)
→ TextureCubemap
-
Load cubemap from image, multiple image cubemap layouts supported.
-
loadTextureFromImage(Image image)
→ Texture2D
-
Load texture from image data.
-
maximizeWindow()
→ void
-
Set window state: maximized, if resizable (only PLATFORM_DESKTOP).
-
measureText(String text, int fontSize)
→ int
-
Measure string width for default font.
-
measureTextEx(Font font, String text, double fontSize, double spacing)
→ Vector2
-
Measure string size for Font.
-
minimizeWindow()
→ void
-
Set window state: minimized, if resizable (only PLATFORM_DESKTOP).
-
restoreWindow()
→ void
-
Set window state: not minimized/maximized (only PLATFORM_DESKTOP).
-
setCameraAltControl(int keyAlt)
→ void
-
Set camera alt key to combine with mouse movement (free camera).
-
setCameraMode(Camera3D camera, CameraMode mode)
→ void
-
Set camera mode (multiple camera modes available).
-
setCameraMoveControls(int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown)
→ void
-
Set camera move controls (1st person and 3rd person cameras).
-
setCameraPanControl(int keyPan)
→ void
-
Set camera pan key to combine with mouse movement (free camera).
-
setCameraSmoothZoomControl(int keySmoothZoom)
→ void
-
Set camera smooth zoom key to combine with mouse (free camera).
-
setClipboardText(String text)
→ void
-
Set clipboard text content.
-
setExitKey(KeyboardKey key)
→ void
-
Set a custom key to exit program (default is KeyboardKey.escape).
-
setGamepadMappings(String mappings)
→ int
-
Set internal gamepad mappings (SDL_GameControllerDB).
-
setGesturesEnabled(int flags)
→ void
-
Enable a set of gestures using flags.
-
setMouseCursor(MouseCursor cursor)
→ void
-
Set mouse cursor.
-
setMouseOffset(int offsetX, int offsetY)
→ void
-
Set mouse offset.
-
setMousePosition(int x, int y)
→ void
-
Set mouse position XY.
-
setMouseScale(double scaleX, double scaleY)
→ void
-
Set mouse scaling.
-
setShaderValueMatrix(Shader shader, int locIndex, Matrix mat)
→ void
-
Set shader uniform value (matrix 4x4).
-
setShaderValueTexture(Shader shader, int locIndex, Texture2D texture)
→ void
-
Set shader uniform value for texture (sampler2d).
-
setShapesTexture(Texture2D texture, Rectangle source)
→ void
-
Set texture and rectangle to be used on shapes drawing.
-
setTargetFPS(int fps)
→ void
-
Set target FPS (maximum).
-
setTextureFilter(Texture texture, TextureFilter filter)
→ void
-
Set texture scaling filter mode.
-
setTextureWrap(Texture texture, TextureWrap wrap)
→ void
-
Set texture wrapping mode.
-
setWindowIcon(Image image)
→ void
-
Set icon for window (only PLATFORM_DESKTOP).
-
setWindowMinSize(int width, int height)
→ void
-
Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE).
-
setWindowMonitor(int monitor)
→ void
-
Set monitor for the current window (fullscreen mode).
-
setWindowPosition(int x, int y)
→ void
-
Set window position on screen (only PLATFORM_DESKTOP).
-
setWindowSize(int width, int height)
→ void
-
Set window dimensions.
-
setWindowState(int flags)
→ void
-
Set window configuration state using flags.
-
setWindowTitle(String title)
→ void
-
Set title for window (only PLATFORM_DESKTOP).
-
showCursor()
→ void
-
Shows cursor.
-
toggleFullscreen()
→ void
-
Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP).
-
unloadImage(Image image)
→ void
-
Unload image from CPU memory (RAM).
-
unloadMaterial(Material material)
→ void
-
Unload material from GPU memory (VRAM).
-
unloadMesh(Mesh mesh)
→ void
-
Unload mesh data from CPU and GPU.
-
unloadModel(Model model)
→ void
-
Unload model (including meshes) from memory (RAM and/or VRAM).
-
unloadModelAnimation(ModelAnimation modelAnimation)
→ void
-
Unload animation data.
-
unloadModelAnimations(List<ModelAnimation> animations, {int? amount})
→ void
-
Unload animation array data.
-
unloadModelKeepMeshes(Model model)
→ void
-
Unload model (but not meshes) from memory (RAM and/or VRAM).
-
unloadRenderTexture(RenderTexture2D target)
→ void
-
Unload render texture from GPU memory (VRAM).
-
unloadShader(Shader shader)
→ void
-
Unload shader from GPU memory (VRAM).
-
unloadTexture(Texture2D texture)
→ void
-
Unload texture from GPU memory (VRAM).
-
updateCamera(Camera3D camera)
→ void
-
Update camera position for selected mode.
-
updateMeshBuffer(Mesh mesh, int index, Pointer<Void> data, int dataSize, int offset)
→ void
-
Update mesh vertex data in GPU for a specific buffer index.
-
updateModelAnimation(Model model, ModelAnimation anim, int frame)
→ void
-
Update model animation pose.
-
uploadMesh(Mesh mesh, {bool isDynamic = false})
→ void
-
Upload mesh vertex data in GPU and provide VAO/VBO ids
-
windowShouldClose()
→ bool
-
Check if KEY_ESCAPE pressed or Close icon pressed.