Python API
This is a wrapper around the C API with some syntactic sugar.
The API is still the same as Raylib, so you should still reply on the official Raylib docs, except:
the function names are in snake_case.
Some string and pointer conversions are handled automatically.
There are some helper functions to create structures.
Example program:
import raylib
pr = raylib.PyRay()
pr.init_window(800, 450, "Hello Pyray")
pr.set_target_fps(60)
camera = pr.Camera3D([18.0, 16.0, 18.0], [0.0, 0.0, 0.0], [0.0, 1.0, 0.0], 45.0, 0)
pr.set_camera_mode(camera, pr.CAMERA_ORBITAL)
while not pr.window_should_close():
pr.update_camera(camera)
pr.begin_drawing()
pr.clear_background(pr.RAYWHITE)
pr.begin_mode_3d(camera)
pr.draw_grid(20, 1.0)
pr.end_mode_3d()
pr.draw_text("Hello world", 190, 200, 20, pr.VIOLET)
pr.end_drawing()
pr.close_window()
See also https://github.com/electronstudio/raylib-python-cffi/blob/master/test_pyray.py
API reference
-
class
raylib.pyray.
PyRay
-
class
AudioStream
(buffer, sampleRate, sampleSize, channels) comment
-
BLEND_ADDITIVE
-
BLEND_ADD_COLORS
-
BLEND_ALPHA
-
BLEND_CUSTOM
-
BLEND_MULTIPLIED
-
BLEND_SUBTRACT_COLORS
-
BlendMode
-
class
BoneInfo
(name, parent) comment
-
class
BoundingBox
(min, max) comment
-
CAMERA_CUSTOM
-
CAMERA_FIRST_PERSON
-
CAMERA_FREE
-
CAMERA_ORBITAL
-
CAMERA_ORTHOGRAPHIC
-
CAMERA_PERSPECTIVE
-
CAMERA_THIRD_PERSON
-
CUBEMAP_LAYOUT_AUTO_DETECT
-
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE
-
CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR
-
CUBEMAP_LAYOUT_LINE_HORIZONTAL
-
CUBEMAP_LAYOUT_LINE_VERTICAL
-
CUBEMAP_LAYOUT_PANORAMA
-
class
Camera
(position, target, up, fovy, projection) comment
-
class
Camera2D
(offset, target, rotation, zoom) comment
-
class
Camera3D
(position, target, up, fovy, projection) comment
-
CameraMode
-
CameraProjection
-
class
CharInfo
(value, offsetX, offsetY, advanceX, image) comment
-
class
Color
(r, g, b, a) comment
-
ConfigFlags
-
CubemapLayout
-
FLAG_FULLSCREEN_MODE
-
FLAG_INTERLACED_HINT
-
FLAG_MSAA_4X_HINT
-
FLAG_VSYNC_HINT
-
FLAG_WINDOW_ALWAYS_RUN
-
FLAG_WINDOW_HIDDEN
-
FLAG_WINDOW_HIGHDPI
-
FLAG_WINDOW_MAXIMIZED
-
FLAG_WINDOW_MINIMIZED
-
FLAG_WINDOW_RESIZABLE
-
FLAG_WINDOW_TOPMOST
-
FLAG_WINDOW_TRANSPARENT
-
FLAG_WINDOW_UNDECORATED
-
FLAG_WINDOW_UNFOCUSED
-
FONT_BITMAP
-
FONT_DEFAULT
-
FONT_SDF
-
class
Font
(baseSize, charsCount, charsPadding, texture, recs, chars) comment
-
FontType
-
GAMEPAD_AXIS_LEFT_TRIGGER
-
GAMEPAD_AXIS_LEFT_X
-
GAMEPAD_AXIS_LEFT_Y
-
GAMEPAD_AXIS_RIGHT_TRIGGER
-
GAMEPAD_AXIS_RIGHT_X
-
GAMEPAD_AXIS_RIGHT_Y
-
GAMEPAD_BUTTON_LEFT_FACE_DOWN
-
GAMEPAD_BUTTON_LEFT_FACE_LEFT
-
GAMEPAD_BUTTON_LEFT_FACE_RIGHT
-
GAMEPAD_BUTTON_LEFT_FACE_UP
-
GAMEPAD_BUTTON_LEFT_THUMB
-
GAMEPAD_BUTTON_LEFT_TRIGGER_1
-
GAMEPAD_BUTTON_LEFT_TRIGGER_2
-
GAMEPAD_BUTTON_MIDDLE
-
GAMEPAD_BUTTON_MIDDLE_LEFT
-
GAMEPAD_BUTTON_MIDDLE_RIGHT
-
GAMEPAD_BUTTON_RIGHT_FACE_DOWN
-
GAMEPAD_BUTTON_RIGHT_FACE_LEFT
-
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT
-
GAMEPAD_BUTTON_RIGHT_FACE_UP
-
GAMEPAD_BUTTON_RIGHT_THUMB
-
GAMEPAD_BUTTON_RIGHT_TRIGGER_1
-
GAMEPAD_BUTTON_RIGHT_TRIGGER_2
-
GAMEPAD_BUTTON_UNKNOWN
-
GESTURE_DOUBLETAP
-
GESTURE_DRAG
-
GESTURE_HOLD
-
GESTURE_NONE
-
GESTURE_PINCH_IN
-
GESTURE_PINCH_OUT
-
GESTURE_SWIPE_DOWN
-
GESTURE_SWIPE_LEFT
-
GESTURE_SWIPE_RIGHT
-
GESTURE_SWIPE_UP
-
GESTURE_TAP
-
GamepadAxis
-
GamepadButton
-
Gestures
-
class
Image
(data, width, height, mipmaps, format) comment
-
KEY_A
-
KEY_APOSTROPHE
-
KEY_B
-
KEY_BACK
-
KEY_BACKSLASH
-
KEY_BACKSPACE
-
KEY_C
-
KEY_CAPS_LOCK
-
KEY_COMMA
-
KEY_D
-
KEY_DELETE
-
KEY_DOWN
-
KEY_E
-
KEY_EIGHT
-
KEY_END
-
KEY_ENTER
-
KEY_EQUAL
-
KEY_ESCAPE
-
KEY_F
-
KEY_F1
-
KEY_F10
-
KEY_F11
-
KEY_F12
-
KEY_F2
-
KEY_F3
-
KEY_F4
-
KEY_F5
-
KEY_F6
-
KEY_F7
-
KEY_F8
-
KEY_F9
-
KEY_FIVE
-
KEY_FOUR
-
KEY_G
-
KEY_GRAVE
-
KEY_H
-
KEY_HOME
-
KEY_I
-
KEY_INSERT
-
KEY_J
-
KEY_K
-
KEY_KB_MENU
-
KEY_KP_0
-
KEY_KP_1
-
KEY_KP_2
-
KEY_KP_3
-
KEY_KP_4
-
KEY_KP_5
-
KEY_KP_6
-
KEY_KP_7
-
KEY_KP_8
-
KEY_KP_9
-
KEY_KP_ADD
-
KEY_KP_DECIMAL
-
KEY_KP_DIVIDE
-
KEY_KP_ENTER
-
KEY_KP_EQUAL
-
KEY_KP_MULTIPLY
-
KEY_KP_SUBTRACT
-
KEY_L
-
KEY_LEFT
-
KEY_LEFT_ALT
-
KEY_LEFT_BRACKET
-
KEY_LEFT_CONTROL
-
KEY_LEFT_SHIFT
-
KEY_LEFT_SUPER
-
KEY_M
-
KEY_MENU
-
KEY_MINUS
-
KEY_N
-
KEY_NINE
-
KEY_NULL
-
KEY_NUM_LOCK
-
KEY_O
-
KEY_ONE
-
KEY_P
-
KEY_PAGE_DOWN
-
KEY_PAGE_UP
-
KEY_PAUSE
-
KEY_PERIOD
-
KEY_PRINT_SCREEN
-
KEY_Q
-
KEY_R
-
KEY_RIGHT
-
KEY_RIGHT_ALT
-
KEY_RIGHT_BRACKET
-
KEY_RIGHT_CONTROL
-
KEY_RIGHT_SHIFT
-
KEY_RIGHT_SUPER
-
KEY_S
-
KEY_SCROLL_LOCK
-
KEY_SEMICOLON
-
KEY_SEVEN
-
KEY_SIX
-
KEY_SLASH
-
KEY_SPACE
-
KEY_T
-
KEY_TAB
-
KEY_THREE
-
KEY_TWO
-
KEY_U
-
KEY_UP
-
KEY_V
-
KEY_VOLUME_DOWN
-
KEY_VOLUME_UP
-
KEY_W
-
KEY_X
-
KEY_Y
-
KEY_Z
-
KEY_ZERO
-
KeyboardKey
-
LOG_ALL
-
LOG_DEBUG
-
LOG_ERROR
-
LOG_FATAL
-
LOG_INFO
-
LOG_NONE
-
LOG_TRACE
-
LOG_WARNING
-
MATERIAL_MAP_ALBEDO
-
MATERIAL_MAP_BRDG
-
MATERIAL_MAP_CUBEMAP
-
MATERIAL_MAP_DIFFUSE
-
MATERIAL_MAP_EMISSION
-
MATERIAL_MAP_HEIGHT
-
MATERIAL_MAP_IRRADIANCE
-
MATERIAL_MAP_METALNESS
-
MATERIAL_MAP_NORMAL
-
MATERIAL_MAP_OCCLUSION
-
MATERIAL_MAP_PREFILTER
-
MATERIAL_MAP_ROUGHNESS
-
MATERIAL_MAP_SPECULAR
-
MOUSE_CURSOR_ARROW
-
MOUSE_CURSOR_CROSSHAIR
-
MOUSE_CURSOR_DEFAULT
-
MOUSE_CURSOR_IBEAM
-
MOUSE_CURSOR_NOT_ALLOWED
-
MOUSE_CURSOR_POINTING_HAND
-
MOUSE_CURSOR_RESIZE_ALL
-
MOUSE_CURSOR_RESIZE_EW
-
MOUSE_CURSOR_RESIZE_NESW
-
MOUSE_CURSOR_RESIZE_NS
-
MOUSE_CURSOR_RESIZE_NWSE
-
MOUSE_LEFT_BUTTON
-
MOUSE_MIDDLE_BUTTON
-
MOUSE_RIGHT_BUTTON
-
class
Material
(shader, maps, params) comment
-
class
MaterialMap
(texture, color, value) comment
-
MaterialMapIndex
-
class
Matrix
(m0, m4, m8, m12, m1, m5, m9, m13, m2, m6, m10, m14, m3, m7, m11, m15) comment
-
class
Mesh
(vertexCount, triangleCount, vertices, texcoords, texcoords2, normals, tangents, colors, indices, animVertices, animNormals, boneIds, boneWeights, vaoId, vboId) comment
-
class
Model
(transform, meshCount, materialCount, meshes, materials, meshMaterial, boneCount, bones, bindPose) comment
-
class
ModelAnimation
(boneCount, frameCount, bones, framePoses) comment
-
MouseButton
-
MouseCursor
-
class
Music
(stream, sampleCount, looping, ctxType, ctxData) comment
-
NPATCH_NINE_PATCH
-
NPATCH_THREE_PATCH_HORIZONTAL
-
NPATCH_THREE_PATCH_VERTICAL
-
class
NPatchInfo
(source, left, top, right, bottom, layout) comment
-
NPatchLayout
-
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA
-
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA
-
PIXELFORMAT_COMPRESSED_DXT1_RGB
-
PIXELFORMAT_COMPRESSED_DXT1_RGBA
-
PIXELFORMAT_COMPRESSED_DXT3_RGBA
-
PIXELFORMAT_COMPRESSED_DXT5_RGBA
-
PIXELFORMAT_COMPRESSED_ETC1_RGB
-
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA
-
PIXELFORMAT_COMPRESSED_ETC2_RGB
-
PIXELFORMAT_COMPRESSED_PVRT_RGB
-
PIXELFORMAT_COMPRESSED_PVRT_RGBA
-
PIXELFORMAT_UNCOMPRESSED_GRAYSCALE
-
PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA
-
PIXELFORMAT_UNCOMPRESSED_R32
-
PIXELFORMAT_UNCOMPRESSED_R32G32B32
-
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32
-
PIXELFORMAT_UNCOMPRESSED_R4G4B4A4
-
PIXELFORMAT_UNCOMPRESSED_R5G5B5A1
-
PIXELFORMAT_UNCOMPRESSED_R5G6B5
-
PIXELFORMAT_UNCOMPRESSED_R8G8B8
-
PIXELFORMAT_UNCOMPRESSED_R8G8B8A8
-
PixelFormat
-
class
Quaternion
(x, y, z, w) comment
-
class
Ray
(position, direction) comment
-
class
RayHitInfo
(hit, distance, position, normal) comment
-
class
Rectangle
(x, y, width, height) comment
-
class
RenderTexture
(id, texture, depth) comment
-
class
RenderTexture2D
(id, texture, depth) comment
-
SHADER_LOC_COLOR_AMBIENT
-
SHADER_LOC_COLOR_DIFFUSE
-
SHADER_LOC_COLOR_SPECULAR
-
SHADER_LOC_MAP_ALBEDO
-
SHADER_LOC_MAP_BRDF
-
SHADER_LOC_MAP_CUBEMAP
-
SHADER_LOC_MAP_DIFFUSE
-
SHADER_LOC_MAP_EMISSION
-
SHADER_LOC_MAP_HEIGHT
-
SHADER_LOC_MAP_IRRADIANCE
-
SHADER_LOC_MAP_METALNESS
-
SHADER_LOC_MAP_NORMAL
-
SHADER_LOC_MAP_OCCLUSION
-
SHADER_LOC_MAP_PREFILTER
-
SHADER_LOC_MAP_ROUGHNESS
-
SHADER_LOC_MAP_SPECULAR
-
SHADER_LOC_MATRIX_MODEL
-
SHADER_LOC_MATRIX_MVP
-
SHADER_LOC_MATRIX_NORMAL
-
SHADER_LOC_MATRIX_PROJECTION
-
SHADER_LOC_MATRIX_VIEW
-
SHADER_LOC_VECTOR_VIEW
-
SHADER_LOC_VERTEX_COLOR
-
SHADER_LOC_VERTEX_NORMAL
-
SHADER_LOC_VERTEX_POSITION
-
SHADER_LOC_VERTEX_TANGENT
-
SHADER_LOC_VERTEX_TEXCOORD01
-
SHADER_LOC_VERTEX_TEXCOORD02
-
SHADER_UNIFORM_FLOAT
-
SHADER_UNIFORM_INT
-
SHADER_UNIFORM_IVEC2
-
SHADER_UNIFORM_IVEC3
-
SHADER_UNIFORM_IVEC4
-
SHADER_UNIFORM_SAMPLER2D
-
SHADER_UNIFORM_VEC2
-
SHADER_UNIFORM_VEC3
-
SHADER_UNIFORM_VEC4
-
class
Shader
(id, locs) comment
-
ShaderLocationIndex
-
ShaderUniformDataType
-
class
Sound
(stream, sampleCount) comment
-
TEXTURE_FILTER_ANISOTROPIC_16X
-
TEXTURE_FILTER_ANISOTROPIC_4X
-
TEXTURE_FILTER_ANISOTROPIC_8X
-
TEXTURE_FILTER_BILINEAR
-
TEXTURE_FILTER_POINT
-
TEXTURE_FILTER_TRILINEAR
-
TEXTURE_WRAP_CLAMP
-
TEXTURE_WRAP_MIRROR_CLAMP
-
TEXTURE_WRAP_MIRROR_REPEAT
-
TEXTURE_WRAP_REPEAT
-
class
Texture
(id, width, height, mipmaps, format) comment
-
class
Texture2D
(id, width, height, mipmaps, format) comment
-
class
TextureCubemap
(id, width, height, mipmaps, format) comment
-
TextureFilter
-
TextureWrap
-
TraceLogLevel
-
class
Transform
(translation, rotation, scale) comment
-
class
Vector2
(x, y) comment
-
class
Vector3
(x, y, z) comment
-
class
Vector4
(x, y, z, w) comment
-
class
VrDeviceInfo
(hResolution, vResolution, hScreenSize, vScreenSize, vScreenCenter, eyeToScreenDistance, lensSeparationDistance, interpupillaryDistance, lensDistortionValues, chromaAbCorrection) comment
-
class
VrStereoConfig
(projection, viewOffset, leftLensCenter, rightLensCenter, leftScreenCenter, rightScreenCenter, scale, scaleIn) comment
-
class
Wave
(sampleCount, sampleRate, sampleSize, channels, data) comment
-
begin_blend_mode
(self, mode: int) Begin blending mode (alpha, additive, multiplied, subtract, custom)
-
begin_drawing
(self) Setup canvas (framebuffer) to start drawing
-
begin_scissor_mode
(self, x: int, y: int, width: int, height: int) Begin scissor mode (define screen area for following drawing)
-
begin_texture_mode
(self, target: RenderTexture) Begin drawing to render texture
-
begin_vr_stereo_mode
(self, config: VrStereoConfig) Begin stereo rendering (requires VR simulator)
-
change_directory
(self, dir: str) Change working directory, return true on success
-
check_collision_box_sphere
(self, box: BoundingBox, center: Vector3, radius: float) Check collision between box and sphere
-
check_collision_boxes
(self, box1: BoundingBox, box2: BoundingBox) Check collision between two bounding boxes
-
check_collision_circle_rec
(self, center: Vector2, radius: float, rec: Rectangle) Check collision between circle and rectangle
-
check_collision_circles
(self, center1: Vector2, radius1: float, center2: Vector2, radius2: float) Check collision between two circles
-
check_collision_lines
(self, startPos1: Vector2, endPos1: Vector2, startPos2: Vector2, endPos2: Vector2, collisionPoint: Any) Check the collision between two lines defined by two points each, returns collision point by reference
-
check_collision_point_circle
(self, point: Vector2, center: Vector2, radius: float) Check if point is inside circle
-
check_collision_point_triangle
(self, point: Vector2, p1: Vector2, p2: Vector2, p3: Vector2) Check if point is inside a triangle
-
check_collision_ray_box
(self, Ray_0: Ray, BoundingBox_1: BoundingBox) _Bool CheckCollisionRayBox(struct Ray, struct BoundingBox);
CFFI C function from raylib._raylib_cffi.lib
-
check_collision_ray_sphere
(self, Ray_0: Ray, Vector3_1: Vector3, float_2: float) _Bool CheckCollisionRaySphere(struct Ray, struct Vector3, float);
CFFI C function from raylib._raylib_cffi.lib
-
check_collision_ray_sphere_ex
(self, Ray_0: Ray, Vector3_1: Vector3, float_2: float, Vector3_pointer_3: Any) _Bool CheckCollisionRaySphereEx(struct Ray, struct Vector3, float, struct Vector3 *);
CFFI C function from raylib._raylib_cffi.lib
-
check_collision_recs
(self, rec1: Rectangle, rec2: Rectangle) Check collision between two rectangles
-
check_collision_spheres
(self, center1: Vector3, radius1: float, center2: Vector3, radius2: float) Check collision between two spheres
-
clear_directory_files
(self) Clear directory files paths buffers (free memory)
-
clear_dropped_files
(self) Clear dropped files paths buffer (free memory)
-
clear_window_state
(self, flags: int) Clear window configuration state flags
-
close_audio_device
(self) Close the audio device and context
-
close_audio_stream
(self, AudioStream_0: AudioStream) void CloseAudioStream(struct AudioStream);
CFFI C function from raylib._raylib_cffi.lib
-
close_window
(self) Close window and unload OpenGL context
-
codepoint_to_utf8
(self, codepoint: int, byteLength: Any) Encode codepoint into utf8 text (char array length returned as parameter)
-
color_alpha
(self, color: Color, alpha: float) Get color with alpha applied, alpha goes from 0.0f to 1.0f
-
color_alpha_blend
(self, dst: Color, src: Color, tint: Color) Get src alpha-blended into dst color with tint
-
color_from_hsv
(self, hue: float, saturation: float, value: float) Get a Color from HSV values, hue [0..360], saturation/value [0..1]
-
compress_data
(self, data: str, dataLength: int, compDataLength: Any) Compress data (DEFLATE algorithm)
-
decompress_data
(self, compData: str, compDataLength: int, dataLength: Any) Decompress data (DEFLATE algorithm)
-
directory_exists
(self, dirPath: str) Check if a directory path exists
-
disable_cursor
(self) Disables cursor (lock cursor)
-
draw_billboard
(self, camera: Camera3D, texture: Texture, position: Vector3, size: float, tint: Color) Draw a billboard texture
-
draw_billboard_rec
(self, camera: Camera3D, texture: Texture, source: Rectangle, position: Vector3, size: float, tint: Color) Draw a billboard texture defined by source
-
draw_bounding_box
(self, box: BoundingBox, color: Color) Draw bounding box (wires)
-
draw_circle
(self, centerX: int, centerY: int, radius: float, color: Color) Draw a color-filled circle
-
draw_circle_3d
(self, center: Vector3, radius: float, rotationAxis: Vector3, rotationAngle: float, color: Color) Draw a circle in 3D world space
-
draw_circle_gradient
(self, centerX: int, centerY: int, radius: float, color1: Color, color2: Color) Draw a gradient-filled circle
-
draw_circle_lines
(self, centerX: int, centerY: int, radius: float, color: Color) Draw circle outline
-
draw_circle_sector
(self, center: Vector2, radius: float, startAngle: float, endAngle: float, segments: int, color: Color) Draw a piece of a circle
-
draw_circle_sector_lines
(self, center: Vector2, radius: float, startAngle: float, endAngle: float, segments: int, color: Color) Draw circle sector outline
-
draw_circle_v
(self, center: Vector2, radius: float, color: Color) Draw a color-filled circle (Vector version)
-
draw_cube
(self, position: Vector3, width: float, height: float, length: float, color: Color) Draw cube
-
draw_cube_texture
(self, texture: Texture, position: Vector3, width: float, height: float, length: float, color: Color) Draw cube textured
-
draw_cube_wires
(self, position: Vector3, width: float, height: float, length: float, color: Color) Draw cube wires
-
draw_cube_wires_v
(self, position: Vector3, size: Vector3, color: Color) Draw cube wires (Vector version)
-
draw_cylinder
(self, position: Vector3, radiusTop: float, radiusBottom: float, height: float, slices: int, color: Color) Draw a cylinder/cone
-
draw_cylinder_wires
(self, position: Vector3, radiusTop: float, radiusBottom: float, height: float, slices: int, color: Color) Draw a cylinder/cone wires
-
draw_ellipse
(self, centerX: int, centerY: int, radiusH: float, radiusV: float, color: Color) Draw ellipse
-
draw_ellipse_lines
(self, centerX: int, centerY: int, radiusH: float, radiusV: float, color: Color) Draw ellipse outline
-
draw_fps
(self, posX: int, posY: int) Draw current FPS
-
draw_grid
(self, slices: int, spacing: float) Draw a grid (centered at (0, 0, 0))
-
draw_line
(self, startPosX: int, startPosY: int, endPosX: int, endPosY: int, color: Color) Draw a line
-
draw_line_bezier
(self, startPos: Vector2, endPos: Vector2, thick: float, color: Color) Draw a line using cubic-bezier curves in-out
-
draw_line_bezier_quad
(self, startPos: Vector2, endPos: Vector2, controlPos: Vector2, thick: float, color: Color) raw line using quadratic bezier curves with a control point
-
draw_line_ex
(self, startPos: Vector2, endPos: Vector2, thick: float, color: Color) Draw a line defining thickness
-
draw_mesh
(self, mesh: Mesh, material: Material, transform: Matrix) Draw a 3d mesh with material and transform
-
draw_mesh_instanced
(self, mesh: Mesh, material: Material, transforms: Any, instances: int) Draw multiple mesh instances with material and different transforms
-
draw_model
(self, model: Model, position: Vector3, scale: float, tint: Color) Draw a model (with texture if set)
-
draw_model_ex
(self, model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: float, scale: Vector3, tint: Color) Draw a model with extended parameters
-
draw_model_wires
(self, model: Model, position: Vector3, scale: float, tint: Color) Draw a model wires (with texture if set)
-
draw_model_wires_ex
(self, model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: float, scale: Vector3, tint: Color) Draw a model wires (with texture if set) with extended parameters
-
draw_point_3d
(self, position: Vector3, color: Color) Draw a point in 3D space, actually a small line
-
draw_poly
(self, center: Vector2, sides: int, radius: float, rotation: float, color: Color) Draw a regular polygon (Vector version)
-
draw_poly_lines
(self, center: Vector2, sides: int, radius: float, rotation: float, color: Color) Draw a polygon outline of n sides
-
draw_rectangle
(self, posX: int, posY: int, width: int, height: int, color: Color) Draw a color-filled rectangle
-
draw_rectangle_gradient_ex
(self, rec: Rectangle, col1: Color, col2: Color, col3: Color, col4: Color) Draw a gradient-filled rectangle with custom vertex colors
-
draw_rectangle_gradient_h
(self, posX: int, posY: int, width: int, height: int, color1: Color, color2: Color) Draw a horizontal-gradient-filled rectangle
-
draw_rectangle_gradient_v
(self, posX: int, posY: int, width: int, height: int, color1: Color, color2: Color) Draw a vertical-gradient-filled rectangle
-
draw_rectangle_lines
(self, posX: int, posY: int, width: int, height: int, color: Color) Draw rectangle outline
-
draw_rectangle_lines_ex
(self, rec: Rectangle, lineThick: int, color: Color) Draw rectangle outline with extended parameters
-
draw_rectangle_pro
(self, rec: Rectangle, origin: Vector2, rotation: float, color: Color) Draw a color-filled rectangle with pro parameters
-
draw_rectangle_rounded
(self, rec: Rectangle, roundness: float, segments: int, color: Color) Draw rectangle with rounded edges
-
draw_rectangle_rounded_lines
(self, rec: Rectangle, roundness: float, segments: int, lineThick: int, color: Color) Draw rectangle with rounded edges outline
-
draw_rectangle_v
(self, position: Vector2, size: Vector2, color: Color) Draw a color-filled rectangle (Vector version)
-
draw_ring
(self, center: Vector2, innerRadius: float, outerRadius: float, startAngle: float, endAngle: float, segments: int, color: Color) Draw ring
-
draw_ring_lines
(self, center: Vector2, innerRadius: float, outerRadius: float, startAngle: float, endAngle: float, segments: int, color: Color) Draw ring outline
-
draw_sphere_ex
(self, centerPos: Vector3, radius: float, rings: int, slices: int, color: Color) Draw sphere with extended parameters
-
draw_sphere_wires
(self, centerPos: Vector3, radius: float, rings: int, slices: int, color: Color) Draw sphere wires
-
draw_text
(self, text: str, posX: int, posY: int, fontSize: int, color: Color) Draw text (using default font)
-
draw_text_codepoint
(self, font: Font, codepoint: int, position: Vector2, fontSize: float, tint: Color) Draw one character (codepoint)
-
draw_text_ex
(self, font: Font, text: str, position: Vector2, fontSize: float, spacing: float, tint: Color) Draw text using font and additional parameters
-
draw_text_rec
(self, font: Font, text: str, rec: Rectangle, fontSize: float, spacing: float, wordWrap: bool, tint: Color) Draw text using font inside rectangle limits
-
draw_text_rec_ex
(self, font: Font, text: str, rec: Rectangle, fontSize: float, spacing: float, wordWrap: bool, tint: Color, selectStart: int, selectLength: int, selectTint: Color, selectBackTint: Color) Draw text using font inside rectangle limits with support for text selection
-
draw_texture_ex
(self, texture: Texture, position: Vector2, rotation: float, scale: float, tint: Color) Draw a Texture2D with extended parameters
-
draw_texture_n_patch
(self, texture: Texture, nPatchInfo: NPatchInfo, dest: Rectangle, origin: Vector2, rotation: float, tint: Color) Draws a texture (or part of it) that stretches or shrinks nicely
-
draw_texture_poly
(self, texture: Texture, center: Vector2, points: Any, texcoords: Any, pointsCount: int, tint: Color) Draw a textured polygon
-
draw_texture_pro
(self, texture: Texture, source: Rectangle, dest: Rectangle, origin: Vector2, rotation: float, tint: Color) Draw a part of a texture defined by a rectangle with ‘pro’ parameters
-
draw_texture_quad
(self, texture: Texture, tiling: Vector2, offset: Vector2, quad: Rectangle, tint: Color) Draw texture quad with tiling and offset parameters
-
draw_texture_rec
(self, texture: Texture, source: Rectangle, position: Vector2, tint: Color) Draw a part of a texture defined by a rectangle
-
draw_texture_tiled
(self, texture: Texture, source: Rectangle, dest: Rectangle, origin: Vector2, rotation: float, scale: float, tint: Color) Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.
-
draw_texture_v
(self, texture: Texture, position: Vector2, tint: Color) Draw a Texture2D with position defined as Vector2
-
draw_triangle
(self, v1: Vector2, v2: Vector2, v3: Vector2, color: Color) Draw a color-filled triangle (vertex in counter-clockwise order!)
-
draw_triangle_3d
(self, v1: Vector3, v2: Vector3, v3: Vector3, color: Color) Draw a color-filled triangle (vertex in counter-clockwise order!)
-
draw_triangle_fan
(self, points: Any, pointsCount: int, color: Color) Draw a triangle fan defined by points (first vertex is the center)
-
draw_triangle_lines
(self, v1: Vector2, v2: Vector2, v3: Vector2, color: Color) Draw triangle outline (vertex in counter-clockwise order!)
-
draw_triangle_strip
(self, points: Any, pointsCount: int, color: Color) Draw a triangle strip defined by points
-
draw_triangle_strip_3d
(self, points: Any, pointsCount: int, color: Color) Draw a triangle strip defined by points
-
enable_cursor
(self) Enables cursor (unlock cursor)
-
end_blend_mode
(self) End blending mode (reset to default: alpha blending)
-
end_drawing
(self) End canvas drawing and swap buffers (double buffering)
-
end_mode_2d
(self) Ends 2D mode with custom camera
-
end_mode_3d
(self) Ends 3D mode and returns to default 2D orthographic mode
-
end_scissor_mode
(self) End scissor mode
-
end_shader_mode
(self) End custom shader drawing (use default shader)
-
end_texture_mode
(self) Ends drawing to render texture
-
end_vr_stereo_mode
(self) End stereo rendering (requires VR simulator)
-
export_image_as_code
(self, image: Image, fileName: str) Export image as code file defining an array of bytes, returns true on success
-
export_wave_as_code
(self, wave: Wave, fileName: str) Export wave sample data to code (.h), returns true on success
-
file_exists
(self, fileName: str) Check if file exists
-
gen_image_cellular
(self, width: int, height: int, tileSize: int) Generate image: cellular algorithm. Bigger tileSize means bigger cells
-
gen_image_checked
(self, width: int, height: int, checksX: int, checksY: int, col1: Color, col2: Color) Generate image: checked
-
gen_image_font_atlas
(self, chars: Any, recs: Any, charsCount: int, fontSize: int, padding: int, packMethod: int) Generate image font atlas using chars info
-
gen_image_gradient_h
(self, width: int, height: int, left: Color, right: Color) Generate image: horizontal gradient
-
gen_image_gradient_radial
(self, width: int, height: int, density: float, inner: Color, outer: Color) Generate image: radial gradient
-
gen_image_gradient_v
(self, width: int, height: int, top: Color, bottom: Color) Generate image: vertical gradient
-
gen_image_perlin_noise
(self, width: int, height: int, offsetX: int, offsetY: int, scale: float) Generate image: perlin noise
-
gen_image_white_noise
(self, width: int, height: int, factor: float) Generate image: white noise
-
gen_mesh_cube
(self, width: float, height: float, length: float) Generate cuboid mesh
-
gen_mesh_cubicmap
(self, cubicmap: Image, cubeSize: Vector3) Generate cubes-based map mesh from image data
-
gen_mesh_cylinder
(self, radius: float, height: float, slices: int) Generate cylinder mesh
-
gen_mesh_hemi_sphere
(self, radius: float, rings: int, slices: int) Generate half-sphere mesh (no bottom cap)
-
gen_mesh_knot
(self, radius: float, size: float, radSeg: int, sides: int) Generate trefoil knot mesh
-
gen_mesh_plane
(self, width: float, length: float, resX: int, resZ: int) Generate plane mesh (with subdivisions)
-
gen_mesh_poly
(self, sides: int, radius: float) Generate polygonal mesh
-
gen_mesh_sphere
(self, radius: float, rings: int, slices: int) Generate sphere mesh (standard sphere)
-
gen_mesh_torus
(self, radius: float, size: float, radSeg: int, sides: int) Generate torus mesh
-
gen_texture_mipmaps
(self, texture: Any) Generate GPU mipmaps for a texture
-
get_char_pressed
(self) Get char pressed (unicode), call it multiple times for chars queued
-
get_clipboard_text
(self) Get clipboard text content
-
get_codepoints
(self, text: str, count: Any) Get all codepoints in a string, codepoints count returned by parameters
-
get_codepoints_count
(self, text: str) Get total number of characters (codepoints) in a UTF8 encoded string
-
get_collision_ray_ground
(self, Ray_0: Ray, float_1: float) struct RayHitInfo GetCollisionRayGround(struct Ray, float);
CFFI C function from raylib._raylib_cffi.lib
-
get_collision_ray_mesh
(self, Ray_0: Ray, Mesh_1: Mesh, Matrix_2: Matrix) struct RayHitInfo GetCollisionRayMesh(struct Ray, struct Mesh, struct Matrix);
CFFI C function from raylib._raylib_cffi.lib
-
get_collision_ray_model
(self, Ray_0: Ray, Model_1: Model) struct RayHitInfo GetCollisionRayModel(struct Ray, struct Model);
CFFI C function from raylib._raylib_cffi.lib
-
get_collision_ray_triangle
(self, Ray_0: Ray, Vector3_1: Vector3, Vector3_2: Vector3, Vector3_3: Vector3) struct RayHitInfo GetCollisionRayTriangle(struct Ray, struct Vector3, struct Vector3, struct Vector3);
CFFI C function from raylib._raylib_cffi.lib
-
get_collision_rec
(self, rec1: Rectangle, rec2: Rectangle) Get collision rectangle for two rectangles collision
-
get_color
(self, hexValue: int) Get Color structure from hexadecimal value
-
get_current_monitor
(self) Get current connected monitor
-
get_directory_files
(self, dirPath: str, count: Any) Get filenames in a directory path (memory should be freed)
-
get_directory_path
(self, filePath: str) Get full path for a given fileName with path (uses static string)
-
get_dropped_files
(self, count: Any) Get dropped files names (memory should be freed)
-
get_file_extension
(self, fileName: str) Get pointer to extension for a filename string (includes dot: ‘.png’)
-
get_file_mod_time
(self, fileName: str) Get file modification time (last write time)
-
get_file_name
(self, filePath: str) Get pointer to filename for a path string
-
get_file_name_without_ext
(self, filePath: str) Get filename string without extension (uses static string)
-
get_font_default
(self) Get the default Font
-
get_fps
(self) Get current FPS
-
get_frame_time
(self) Get time in seconds for last frame drawn (delta time)
-
get_gamepad_axis_count
(self, gamepad: int) Get gamepad axis count for a gamepad
-
get_gamepad_axis_movement
(self, gamepad: int, axis: int) Get axis movement value for a gamepad axis
Get the last gamepad button pressed
-
get_gamepad_name
(self, gamepad: int) Get gamepad internal name id
-
get_gesture_detected
(self) Get latest detected gesture
-
get_gesture_drag_angle
(self) Get gesture drag angle
-
get_gesture_drag_vector
(self) Get gesture drag vector
-
get_gesture_hold_duration
(self) Get gesture hold time in milliseconds
-
get_gesture_pinch_angle
(self) Get gesture pinch angle
-
get_gesture_pinch_vector
(self) Get gesture pinch delta
-
get_glyph_index
(self, font: Font, codepoint: int) Get index position for a unicode character on font
-
get_key_pressed
(self) Get key pressed (keycode), call it multiple times for keys queued
-
get_monitor_count
(self) Get number of connected monitors
-
get_monitor_height
(self, monitor: int) Get specified monitor height (max available by monitor)
-
get_monitor_name
(self, monitor: int) Get the human-readable, UTF-8 encoded name of the primary monitor
-
get_monitor_physical_height
(self, monitor: int) Get specified monitor physical height in millimetres
-
get_monitor_physical_width
(self, monitor: int) Get specified monitor physical width in millimetres
-
get_monitor_position
(self, monitor: int) Get specified monitor position
-
get_monitor_refresh_rate
(self, monitor: int) Get specified monitor refresh rate
-
get_monitor_width
(self, monitor: int) Get specified monitor width (max available by monitor)
-
get_mouse_position
(self) Get mouse position XY
-
get_mouse_wheel_move
(self) Get mouse wheel movement Y
-
get_mouse_x
(self) Get mouse position X
-
get_mouse_y
(self) Get mouse position Y
-
get_next_codepoint
(self, text: str, bytesProcessed: Any) Get next codepoint in a UTF8 encoded string; 0x3f(‘?’) is returned on failure
-
get_pixel_color
(self, srcPtr: Any, format: int) Get Color from a source pixel pointer of certain format
-
get_pixel_data_size
(self, width: int, height: int, format: int) Get pixel data size in bytes for certain format
-
get_prev_directory_path
(self, dirPath: str) Get previous directory path for a given path (uses static string)
-
get_random_value
(self, min: int, max: int) Get a random value between min and max (both included)
-
get_screen_data
(self) Get pixel data from screen buffer and return an Image (screenshot)
-
get_screen_height
(self) Get current screen height
-
get_screen_to_world_2d
(self, position: Vector2, camera: Camera2D) Get the world space position for a 2d camera screen space position
-
get_screen_width
(self) Get current screen width
-
get_sounds_playing
(self) Get number of sounds playing in the multichannel
-
get_time
(self) Get elapsed time in seconds since InitWindow()
-
get_touch_points_count
(self) Get touch points count
-
get_touch_position
(self, index: int) Get touch position XY for a touch point index (relative to screen size)
-
get_touch_x
(self) Get touch position X for touch point 0 (relative to screen size)
-
get_touch_y
(self) Get touch position Y for touch point 0 (relative to screen size)
-
get_window_handle
(self) Get native window handle
-
get_window_position
(self) Get window position XY on monitor
-
get_window_scale_dpi
(self) Get window scale DPI factor
-
get_working_directory
(self) Get current working directory (uses static string)
-
get_world_to_screen
(self, position: Vector3, camera: Camera3D) Get the screen space position for a 3d world space position
-
get_world_to_screen_2d
(self, position: Vector2, camera: Camera2D) Get the screen space position for a 2d camera world space position
-
get_world_to_screen_ex
(self, position: Vector3, camera: Camera3D, width: int, height: int) Get size position for a 3d world space position
-
hide_cursor
(self) Hides cursor
-
image_alpha_clear
(self, image: Any, color: Color, threshold: float) Clear alpha channel to desired color
-
image_alpha_crop
(self, image: Any, threshold: float) Crop image depending on alpha value
-
image_alpha_premultiply
(self, image: Any) Premultiply alpha channel
-
image_color_brightness
(self, image: Any, brightness: int) Modify image color: brightness (-255 to 255)
-
image_color_contrast
(self, image: Any, contrast: float) Modify image color: contrast (-100 to 100)
-
image_color_grayscale
(self, image: Any) Modify image color: grayscale
-
image_color_invert
(self, image: Any) Modify image color: invert
-
image_color_replace
(self, image: Any, color: Color, replace: Color) Modify image color: replace color
-
image_dither
(self, image: Any, rBpp: int, gBpp: int, bBpp: int, aBpp: int) Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
-
image_draw
(self, dst: Any, src: Image, srcRec: Rectangle, dstRec: Rectangle, tint: Color) Draw a source image within a destination image (tint applied to source)
-
image_draw_circle
(self, dst: Any, centerX: int, centerY: int, radius: int, color: Color) Draw circle within an image
-
image_draw_circle_v
(self, dst: Any, center: Vector2, radius: int, color: Color) Draw circle within an image (Vector version)
-
image_draw_line
(self, dst: Any, startPosX: int, startPosY: int, endPosX: int, endPosY: int, color: Color) Draw line within an image
-
image_draw_line_v
(self, dst: Any, start: Vector2, end: Vector2, color: Color) Draw line within an image (Vector version)
-
image_draw_pixel_v
(self, dst: Any, position: Vector2, color: Color) Draw pixel within an image (Vector version)
-
image_draw_rectangle
(self, dst: Any, posX: int, posY: int, width: int, height: int, color: Color) Draw rectangle within an image
-
image_draw_rectangle_lines
(self, dst: Any, rec: Rectangle, thick: int, color: Color) Draw rectangle lines within an image
-
image_draw_rectangle_rec
(self, dst: Any, rec: Rectangle, color: Color) Draw rectangle within an image
-
image_draw_rectangle_v
(self, dst: Any, position: Vector2, size: Vector2, color: Color) Draw rectangle within an image (Vector version)
-
image_draw_text
(self, dst: Any, text: str, posX: int, posY: int, fontSize: int, color: Color) Draw text (using default font) within an image (destination)
-
image_draw_text_ex
(self, dst: Any, font: Font, text: str, position: Vector2, fontSize: float, spacing: float, tint: Color) Draw text (custom sprite font) within an image (destination)
-
image_flip_horizontal
(self, image: Any) Flip image horizontally
-
image_flip_vertical
(self, image: Any) Flip image vertically
-
image_format
(self, image: Any, newFormat: int) Convert image data to desired format
-
image_mipmaps
(self, image: Any) Compute all mipmap levels for a provided image
-
image_resize
(self, image: Any, newWidth: int, newHeight: int) Resize image (Bicubic scaling algorithm)
-
image_resize_canvas
(self, image: Any, newWidth: int, newHeight: int, offsetX: int, offsetY: int, fill: Color) Resize canvas and fill with color
-
image_resize_nn
(self, image: Any, newWidth: int, newHeight: int) Resize image (Nearest-Neighbor scaling algorithm)
-
image_rotate_ccw
(self, image: Any) Rotate image counter-clockwise 90deg
-
image_rotate_cw
(self, image: Any) Rotate image clockwise 90deg
-
image_text_ex
(self, font: Font, text: str, fontSize: float, spacing: float, tint: Color) Create an image from text (custom sprite font)
-
init_audio_device
(self) Initialize audio device and context
-
init_audio_stream
(self, unsignedint_0: int, unsignedint_1: int, unsignedint_2: int) struct AudioStream InitAudioStream(unsigned int, unsigned int, unsigned int);
CFFI C function from raylib._raylib_cffi.lib
-
init_window
(self, width: int, height: int, title: str) Initialize window and OpenGL context
-
is_audio_device_ready
(self) Check if audio device has been initialized successfully
-
is_audio_stream_playing
(self, stream: AudioStream) Check if audio stream is playing
-
is_audio_stream_processed
(self, stream: AudioStream) Check if any audio stream buffers requires refill
Check if cursor is not visible
-
is_cursor_on_screen
(self) Check if cursor is on the screen
-
is_file_dropped
(self) Check if a file has been dropped into window
-
is_file_extension
(self, fileName: str, ext: str) Check file extension (including point: .png, .wav)
-
is_gamepad_available
(self, gamepad: int) Check if a gamepad is available
Check if a gamepad button is being pressed
Check if a gamepad button has been pressed once
Check if a gamepad button has been released once
Check if a gamepad button is NOT being pressed
-
is_gamepad_name
(self, gamepad: int, name: str) Check gamepad name (if available)
-
is_gesture_detected
(self, gesture: int) Check if a gesture have been detected
-
is_key_down
(self, key: int) Check if a key is being pressed
-
is_key_pressed
(self, key: int) Check if a key has been pressed once
-
is_key_released
(self, key: int) Check if a key has been released once
-
is_key_up
(self, key: int) Check if a key is NOT being pressed
-
is_model_animation_valid
(self, model: Model, anim: ModelAnimation) Check model animation skeleton match
Check if a mouse button is being pressed
Check if a mouse button has been pressed once
Check if a mouse button has been released once
Check if a mouse button is NOT being pressed
-
is_music_playing
(self, Music_0: Music) _Bool IsMusicPlaying(struct Music);
CFFI C function from raylib._raylib_cffi.lib
-
is_window_focused
(self) Check if window is currently focused (only PLATFORM_DESKTOP)
-
is_window_fullscreen
(self) Check if window is currently fullscreen
Check if window is currently hidden (only PLATFORM_DESKTOP)
-
is_window_maximized
(self) Check if window is currently maximized (only PLATFORM_DESKTOP)
-
is_window_minimized
(self) Check if window is currently minimized (only PLATFORM_DESKTOP)
-
is_window_ready
(self) Check if window has been initialized successfully
-
is_window_resized
(self) Check if window has been resized last frame
-
is_window_state
(self, flag: int) Check if one specific window flag is enabled
-
load_file_data
(self, fileName: str, bytesRead: Any) Load file data as byte array (read)
-
load_file_text
(self, fileName: str) Load text data from file (read), returns a ‘ 0’ terminated string
-
load_font
(self, fileName: str) Load font from file into GPU memory (VRAM)
-
load_font_data
(self, fileData: str, dataSize: int, fontSize: int, fontChars: Any, charsCount: int, type: int) Load font data for further use
-
load_font_ex
(self, fileName: str, fontSize: int, fontChars: Any, charsCount: int) Load font from file with extended parameters
-
load_font_from_image
(self, image: Image, key: Color, firstChar: int) Load font from Image (XNA style)
-
load_font_from_memory
(self, fileType: str, fileData: str, dataSize: int, fontSize: int, fontChars: Any, charsCount: int) Load font from memory buffer, fileType refers to extension: i.e. ‘.ttf’
-
load_image
(self, fileName: str) Load image from file into CPU memory (RAM)
-
load_image_anim
(self, fileName: str, frames: Any) Load image sequence from file (frames appended to image.data)
-
load_image_from_memory
(self, fileType: str, fileData: str, dataSize: int) Load image from memory buffer, fileType refers to extension: i.e. ‘.png’
-
load_image_palette
(self, image: Image, maxPaletteSize: int, colorsCount: Any) Load colors palette from image as a Color array (RGBA - 32bit)
-
load_image_raw
(self, fileName: str, width: int, height: int, format: int, headerSize: int) Load image from RAW file data
-
load_material_default
(self) Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
-
load_materials
(self, fileName: str, materialCount: Any) Load materials from model file
-
load_model
(self, fileName: str) Load model from files (meshes and materials)
-
load_model_animations
(self, fileName: str, animsCount: Any) Load model animations from file
-
load_music_stream
(self, fileName: str) Load music stream from file
-
load_music_stream_from_memory
(self, fileType: str, data: str, dataSize: int) Load music stream from data
-
load_render_texture
(self, width: int, height: int) Load texture for rendering (framebuffer)
-
load_shader
(self, vsFileName: str, fsFileName: str) Load shader from files and bind default locations
-
load_shader_from_memory
(self, vsCode: str, fsCode: str) Load shader from code strings and bind default locations
-
load_sound
(self, fileName: str) Load sound from file
-
load_storage_value
(self, position: int) Load integer value from storage file (from defined position)
-
load_texture
(self, fileName: str) Load texture from file into GPU memory (VRAM)
-
load_texture_cubemap
(self, image: Image, layout: int) Load cubemap from image, multiple image cubemap layouts supported
-
load_vr_stereo_config
(self, device: VrDeviceInfo) Load VR stereo config for VR simulator device parameters
-
load_wave
(self, fileName: str) Load wave data from file
-
load_wave_from_memory
(self, fileType: str, fileData: str, dataSize: int) Load wave from memory buffer, fileType refers to extension: i.e. ‘.wav’
-
maximize_window
(self) Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
-
measure_text
(self, text: str, fontSize: int) Measure string width for default font
-
measure_text_ex
(self, font: Font, text: str, fontSize: float, spacing: float) Measure string size for Font
-
mem_alloc
(self, size: int) Internal memory allocator
-
mem_free
(self, ptr: Any) Internal memory free
-
mem_realloc
(self, ptr: Any, size: int) Internal memory reallocator
-
mesh_binormals
(self, mesh: Any) Compute mesh binormals
-
mesh_bounding_box
(self, Mesh_0: Mesh) struct BoundingBox MeshBoundingBox(struct Mesh);
CFFI C function from raylib._raylib_cffi.lib
-
mesh_tangents
(self, mesh: Any) Compute mesh tangents
-
minimize_window
(self) Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
-
open_url
(self, url: str) Open URL with default system browser (if available)
-
pause_audio_stream
(self, stream: AudioStream) Pause audio stream
-
play_audio_stream
(self, stream: AudioStream) Play audio stream
-
pointer
(self, struct)
-
restore_window
(self) Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
-
resume_audio_stream
(self, stream: AudioStream) Resume audio stream
-
save_file_data
(self, fileName: str, data: Any, bytesToWrite: int) Save data to file from byte array (write), returns true on success
-
save_file_text
(self, fileName: str, text: str) Save text data to file (write), string must be ‘ 0’ terminated, returns true on success
-
save_storage_value
(self, position: int, value: int) Save integer value to storage file (to defined position), returns true on success
-
set_audio_stream_buffer_size_default
(self, size: int) Default size for new audio streams
-
set_audio_stream_pitch
(self, stream: AudioStream, pitch: float) Set pitch for audio stream (1.0 is base level)
-
set_audio_stream_volume
(self, stream: AudioStream, volume: float) Set volume for audio stream (1.0 is max level)
-
set_camera_alt_control
(self, keyAlt: int) Set camera alt key to combine with mouse movement (free camera)
-
set_camera_mode
(self, camera: Camera3D, mode: int) Set camera mode (multiple camera modes available)
-
set_camera_move_controls
(self, keyFront: int, keyBack: int, keyRight: int, keyLeft: int, keyUp: int, keyDown: int) Set camera move controls (1st person and 3rd person cameras)
-
set_camera_pan_control
(self, keyPan: int) Set camera pan key to combine with mouse movement (free camera)
-
set_camera_smooth_zoom_control
(self, keySmoothZoom: int) Set camera smooth zoom key to combine with mouse (free camera)
-
set_clipboard_text
(self, text: str) Set clipboard text content
-
set_config_flags
(self, flags: int) Setup init configuration flags (view FLAGS)
-
set_exit_key
(self, key: int) Set a custom key to exit program (default is ESC)
-
set_gamepad_mappings
(self, mappings: str) Set internal gamepad mappings (SDL_GameControllerDB)
-
set_gestures_enabled
(self, flags: int) Enable a set of gestures using flags
-
set_master_volume
(self, volume: float) Set master volume (listener)
-
set_material_texture
(self, material: Any, mapType: int, texture: Texture) Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR…)
-
set_model_mesh_material
(self, model: Any, meshId: int, materialId: int) Set material for a mesh
-
set_mouse_cursor
(self, cursor: int) Set mouse cursor
-
set_mouse_offset
(self, offsetX: int, offsetY: int) Set mouse offset
-
set_mouse_position
(self, x: int, y: int) Set mouse position XY
-
set_mouse_scale
(self, scaleX: float, scaleY: float) Set mouse scaling
-
set_pixel_color
(self, dstPtr: Any, color: Color, format: int) Set color formatted into destination pixel pointer
-
set_shader_value
(self, shader: Shader, locIndex: int, value: Any, uniformType: int) Set shader uniform value
-
set_shader_value_matrix
(self, shader: Shader, locIndex: int, mat: Matrix) Set shader uniform value (matrix 4x4)
-
set_shader_value_texture
(self, shader: Shader, locIndex: int, texture: Texture) Set shader uniform value for texture (sampler2d)
-
set_shader_value_v
(self, shader: Shader, locIndex: int, value: Any, uniformType: int, count: int) Set shader uniform value vector
-
set_shapes_texture
(self, texture: Texture, source: Rectangle) Set texture and rectangle to be used on shapes drawing
-
set_target_fps
(self, fps: int) Set target FPS (maximum)
-
set_trace_log_level
(self, logLevel: int) Set the current threshold (minimum) log level
-
set_window_min_size
(self, width: int, height: int) Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
-
set_window_monitor
(self, monitor: int) Set monitor for the current window (fullscreen mode)
-
set_window_position
(self, x: int, y: int) Set window position on screen (only PLATFORM_DESKTOP)
-
set_window_size
(self, width: int, height: int) Set window dimensions
-
set_window_state
(self, flags: int) Set window configuration state using flags
-
set_window_title
(self, title: str) Set title for window (only PLATFORM_DESKTOP)
-
show_cursor
(self) Shows cursor
-
stop_audio_stream
(self, stream: AudioStream) Stop audio stream
-
stop_sound_multi
(self) Stop any sound playing (using multichannel buffer pool)
-
take_screenshot
(self, fileName: str) Takes a screenshot of current screen (filename extension defines format)
-
text_append
(self, text: str, append: str, position: Any) Append text at specific position and move cursor!
-
text_copy
(self, dst: str, src: str) Copy one string to another, returns bytes copied
-
text_find_index
(self, text: str, find: str) Find first text occurrence within a string
-
text_format
(self, *args) VARARG FUNCTION - MAY NOT BE SUPPORTED BY CFFI
-
text_insert
(self, text: str, insert: str, position: int) Insert text in a position (memory must be freed!)
-
text_is_equal
(self, text1: str, text2: str) Check if two text string are equal
-
text_join
(self, textList: str, count: int, delimiter: str) Join text strings with delimiter
-
text_length
(self, text: str) Get text length, checks for ‘ 0’ ending
-
text_replace
(self, text: str, replace: str, by: str) Replace text string (memory must be freed!)
-
text_split
(self, text: str, delimiter: str, count: Any) Split text into multiple strings
-
text_subtext
(self, text: str, position: int, length: int) Get a piece of a text string
-
text_to_integer
(self, text: str) Get integer value from text (negative values not supported)
-
text_to_lower
(self, text: str) Get lower case version of provided string
-
text_to_pascal
(self, text: str) Get Pascal case notation version of provided string
-
text_to_upper
(self, text: str) Get upper case version of provided string
-
text_to_utf8
(self, codepoints: Any, length: int) Encode text codepoint into utf8 text (memory must be freed!)
-
toggle_fullscreen
(self) Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
-
trace_log
(self, *args) VARARG FUNCTION - MAY NOT BE SUPPORTED BY CFFI
-
unload_file_data
(self, data: str) Unload file data allocated by LoadFileData()
-
unload_file_text
(self, text: str) Unload file text data allocated by LoadFileText()
-
unload_font_data
(self, chars: Any, charsCount: int) Unload font chars info data (RAM)
-
unload_image_colors
(self, colors: Any) Unload color data loaded with LoadImageColors()
-
unload_image_palette
(self, colors: Any) Unload colors palette loaded with LoadImagePalette()
-
unload_model_animation
(self, anim: ModelAnimation) Unload animation data
-
unload_model_animations
(self, animations: Any, count: int) Unload animation array data
-
unload_model_keep_meshes
(self, model: Model) Unload model (but not meshes) from memory (RAM and/or VRAM)
-
unload_render_texture
(self, target: RenderTexture) Unload render texture from GPU memory (VRAM)
-
unload_vr_stereo_config
(self, config: VrStereoConfig) Unload VR stereo config
-
unload_wave_samples
(self, samples: Any) Unload samples data loaded with LoadWaveSamples()
-
update_audio_stream
(self, stream: AudioStream, data: Any, samplesCount: int) Update audio stream buffers with data
-
update_camera
(self, camera: Any) Update camera position for selected mode
-
update_mesh_buffer
(self, mesh: Mesh, index: int, data: Any, dataSize: int, offset: int) Update mesh vertex data in GPU for a specific buffer index
-
update_model_animation
(self, model: Model, anim: ModelAnimation, frame: int) Update model animation pose
-
update_texture_rec
(self, texture: Texture, rec: Rectangle, pixels: Any) Update GPU texture rectangle with new data
-
upload_mesh
(self, mesh: Any, dynamic: bool) Upload mesh vertex data in GPU and provide VAO/VBO ids
-
wave_crop
(self, wave: Any, initSample: int, finalSample: int) Crop a wave to defined samples range
-
wave_format
(self, wave: Any, sampleRate: int, sampleSize: int, channels: int) Convert wave data to desired format
-
window_should_close
(self) Check if KEY_ESCAPE pressed or Close icon pressed
-
class