package raylib
- Ctypes reexports
- Constants
- Types
- 
        
          Functions
        
          
          - Window and Graphics Device Functions (Module: core)
- Input Handling Functions (Module: core)
- Basic Shapes Drawing Functions (Module: shapes)
- Texture Loading and Drawing Functions (Module: textures)
- Font Loading and Text Drawing Functions (Module: text)
- Basic 3d Shapes Drawing Functions (Module: models)
- Shaders System Functions (Module: rlgl)
- Audio Loading and Playing Functions (Module: audio)
 
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=96912086fb0a10de9cc6618b631665885f3d4e4add75fea1b8a284bbcf79b395
    
    
  sha512=77cab807ce4a3841191fb9188acff3e53b6aedf98b89d656b5ea975189009577ed03225521748fdadf11245a615803dc4747a37e0d394a252f5fc3c1b2409915
    
    
  doc/raylib/Raylib/index.html
Module RaylibSource
Ctypes reexports
Basic types and utility functions shared by the following modules
Constants
Types
Functions
Window and Graphics Device Functions (Module: core)
Window-related functions
init_window width heigth title initializes window and OpenGL context
Check if window is currently hidden (only PLATFORM_DESKTOP
Check if window is currently maximized (only PLATFORM_DESKTOP)
val is_window_state : ConfigFlag.t -> boolCheck if one specific window flag is enabled
val set_window_state : ConfigFlag.t list -> unitSet window configuration state using flags
val clear_window_state : ConfigFlag.t list -> unitClear window configuration state flags
val set_window_icon : Image.t -> unitSet icon for window (only PLATFORM_DESKTOP)
set_window_position x y sets window position on screen (only PLATFORM_DESKTOP)
set_window_min_size width height sets window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
val get_window_handle : unit -> unit ptr optionGet native window handle
val get_monitor_position : int -> Vector2.tGet specified monitor position
val get_window_position : unit -> Vector2.tGet window position XY on monitor
val get_window_scale_dpi : unit -> Vector2.tGet window scale DPI factor
Get the human-readable, UTF-8 encoded name of the primary monitor
Cursor-related functions
Check if cursor is not visible
Drawing-related functions
val clear_background : Color.t -> unitSet background color (framebuffer clear color)
val begin_mode_2d : Camera2D.t -> unitInitialize 2D mode with custom camera (2D)
val begin_mode_3d : Camera3D.t -> unitInitializes 3D mode with custom camera (3D)
val begin_texture_mode : RenderTexture.t -> unitInitializes render texture for drawing
begin_scissor_mode x y width height defines screen area for following drawing
Screen-space-related functions
val get_mouse_ray : Vector2.t -> Camera3D.t -> Ray.tReturns a ray trace from mouse position
val get_camera_matrix : Camera3D.t -> Matrix.tReturns camera transform matrix (view matrix)
val get_camera_matrix_2d : Camera2D.t -> Matrix.tReturns camera 2d transform matrix
val get_world_to_screen : Vector3.t -> Camera3D.t -> Vector2.tReturns the screen space position for a 3d world space position
val get_world_to_screen_ex : Vector3.t -> Camera3D.t -> int -> int -> Vector2.tget_world_to_screen_ex position camera width height returns size position for a 3d world space position
val get_world_to_screen_2d : Vector2.t -> Camera2D.t -> Vector2.tReturns the screen space position for a 2d camera world space position
val get_screen_to_world_2d : Vector2.t -> Camera2D.t -> Vector2.tReturns the world space position for a 2d camera screen space position
Timing-related functions
Misc. functions
val set_config_flags : ConfigFlag.t list -> unitSetup init configuration flags (view FLAGS)
val set_trace_log_level : TraceLogType.t -> unitSet the current threshold (minimum) log level
val set_trace_log_exit : TraceLogType.t -> unitSet the exit threshold (minimum) log level
val trace_log : TraceLogType.t -> string -> unitShow trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)
Files management functions
Load file data as byte array (read)
Save data to file from byte array (write)
Load text data from file (read), returns a '' terminated string
save_file_text filename text saves text data to file (write), string must be '\0' terminated
is_file_extension filename ext checks file extension
Get extension for a filename string (including point: ".png")
Get filename string without extension (uses static string)
Get full path for a given fileName with path (uses static string)
Get previous directory path for a given path (uses static string)
Get filenames in a directory path (memory should be freed)
Get dropped files names (memory should be freed)
Compress data (DEFLATE algorithm)
Decompress data (DEFLATE algorithm)
Persistent storage management
save_storage_value position value saves integer value to storage file (to defined position), returns true on success
Input Handling Functions (Module: core)
Input-related functions: keyboard
val is_key_pressed : Key.t -> boolDetect if a key has been pressed once
val is_key_down : Key.t -> boolDetect if a key is being pressed
val is_key_released : Key.t -> boolDetect if a key has been released once
val is_key_up : Key.t -> boolDetect if a key is NOT being pressed
val set_exit_key : Key.t -> unitSet a custom key to exit program (default is ESC)
val get_key_pressed : unit -> Key.tGet key pressed (keycode), call it multiple times for keys queued
Get char pressed (unicode), call it multiple times for chars queued
Input-related functions: gamepads
val is_gamepad_available : GamepadNumber.t -> boolDetect if a gamepad is available
val is_gamepad_name : GamepadNumber.t -> string -> boolCheck gamepad name (if available)
val get_gamepad_name : GamepadNumber.t -> stringReturn gamepad internal name id
val is_gamepad_button_pressed : GamepadNumber.t -> GamepadButton.t -> boolDetect if a gamepad button has been pressed once
val is_gamepad_button_down : GamepadNumber.t -> GamepadButton.t -> boolDetect if a gamepad button is being pressed
val is_gamepad_button_released : GamepadNumber.t -> GamepadButton.t -> boolDetect if a gamepad button has been released once
val is_gamepad_button_up : GamepadNumber.t -> GamepadButton.t -> boolDetect if a gamepad button is NOT being pressed
val get_gamepad_button_pressed : unit -> GamepadButton.tGet the last gamepad button pressed
val get_gamepad_axis_count : GamepadNumber.t -> intReturn gamepad axis count for a gamepad
val get_gamepad_axis_movement : GamepadNumber.t -> GamepadAxis.t -> floatReturn axis movement value for a gamepad axis
Input-related functions: mouse
val is_mouse_button_pressed : MouseButton.t -> boolDetect if a mouse button has been pressed once
val is_mouse_button_down : MouseButton.t -> boolDetect if a mouse button is being pressed
val is_mouse_button_released : MouseButton.t -> boolDetect if a mouse button has been released once
val is_mouse_button_up : MouseButton.t -> boolDetect if a mouse button is NOT being pressed
val get_mouse_position : unit -> Vector2.tReturns mouse position XY
val get_mouse_cursor : unit -> MouseCursor.tReturns mouse cursor if (MouseCursor enum
val set_mouse_cursor : MouseCursor.t -> unitSet mouse cursor
Input-related functions: touch
val get_touch_position : int -> Vector2.tReturns touch position XY for a touch point index (relative to screen size)
Gestures and Touch Handling Functions (Module: gestures)
val get_gesture_drag_vector : unit -> Vector2.tGet gesture drag vector
val get_gesture_pinch_vector : unit -> Vector2.tGet gesture pinch delta
Camera System Functions (Module: camera)
val set_camera_mode : Camera3D.t -> CameraMode.t -> unitSet camera mode (multiple camera modes available)
val update_camera : Camera3D.t ptr -> unitUpdate camera position for selected mode
val set_camera_pan_control : Key.t -> unitSet camera pan key to combine with mouse movement (free camera)
val set_camera_alt_control : Key.t -> unitSet camera alt key to combine with mouse movement (free camera)
val set_camera_smooth_zoom_control : Key.t -> unitSet camera smooth zoom key to combine with mouse (free camera)
set_camera_move_controls front back right left up down sets camera move controls (1st person and 3rd person cameras)
Basic Shapes Drawing Functions (Module: shapes)
Basic shapes drawing functions
val draw_pixel : int -> int -> Color.t -> unitdraw_pixel x y color draws a pixel at x, y
val draw_line : int -> int -> int -> int -> Color.t -> unitdraw_line start_x start_y end_x end_y color draws a line
draw_line_v start end color draws a line (Vector version)
draw_line_v start end thickness color draws a line defining thickness
draw_line_bezier start end thickness color draws a line using cubic-bezier curves in-out
draw_line_strip points pointsCount color draws lines sequence
val draw_circle : int -> int -> float -> Color.t -> unitdraw_circle center_x center_y radius color draws a color-filled circle
draw_circle_sector center radius start_angle end_angle segments color draws a piece of a circle
draw_circle_sector_lines center radius startAngle endAngle segments color draws circle sector outline
draw_circle_gradient centerX centerY radius color1 color2 draws a gradient-filled circle
draw_circle_v center radius color draws a color-filled circle (Vector version)
val draw_circle_lines : int -> int -> float -> Color.t -> unitdraw_circle_lines centerX centerY radius color draws circle outline
val draw_ellipse : int -> int -> float -> float -> Color.t -> unitdraw_ellipse centerX centerY radiusH radiusV color draws ellipse
val draw_ellipse_lines : int -> int -> float -> float -> Color.t -> unitdraw_ellipse_lines centerX centerY radiusH radiusV color draws ellipse outline
draw_ring center innerRadius outerRadius startAngle endAngle segments color draws ring
draw_ring_lines center innerRadius outerRadius startAngle endAngle segments color draws ring outline
val draw_rectangle : int -> int -> int -> int -> Color.t -> unitdraw_rectangle posX posY width height color draws a color-filled rectangle
draw_rectangle_v position size color draws a color-filled rectangle (Vector version)
val draw_rectangle_rec : Rectangle.t -> Color.t -> unitdraw_rectangle_rec position size color draws a color-filled rectangle
val draw_rectangle_pro : Rectangle.t -> Vector2.t -> float -> Color.t -> unitdraw_rectangle_pro rec origin rotation color draws a color-filled rectangle with pro parameters
draw_rectangle_gradient_v posX posY width height color1 color2 draws a vertical-gradient-filled rectangle
draw_rectangle_gradient_h posX posY width height color1 color2 draws a horizontal-gradient-filled rectangle
val draw_rectangle_gradient_ex : 
  Rectangle.t ->
  Color.t ->
  Color.t ->
  Color.t ->
  Color.t ->
  unitdraw_rectangle_gradient_ex rec col1 col2 col3 col4 draws a gradient-filled rectangle with custom vertex colors
val draw_rectangle_lines : int -> int -> int -> int -> Color.t -> unitdraw_rectangle_lines posX posY width height color draws rectangle outline
val draw_rectangle_lines_ex : Rectangle.t -> int -> Color.t -> unitdraw_rectangle_lines_ex rec lineThick color draws rectangle outline with extended parameters
val draw_rectangle_rounded : Rectangle.t -> float -> int -> Color.t -> unitdraw_rectangle_rounded rec roundness segments color draws rectangle with rounded edges
val draw_rectangle_rounded_lines : 
  Rectangle.t ->
  float ->
  int ->
  int ->
  Color.t ->
  unitdraw_rectangle_rounded_lines rec roundness segments lineThick color draws rectangle with rounded edges outline
draw_triangle v1 v2 v3 color draws a color-filled triangle (vertex in counter-clockwise order!)
draw_triangle_lines v1 v2 v3 color draws triangle outline (vertex in counter-clockwise order!)
draw_triangle_fan points pointsCount color draws a triangle fan defined by points (first vertex is the center)
draw_triangle_strip points pointsCount color draws a triangle strip defined by points
draw_poly center sides radius rotation color draws a regular polygon (Vector version)
draw_poly_lines center sides radius rotation color draws a polygon outline of n sides
Basic shapes collision detection functions
val check_collision_recs : Rectangle.t -> Rectangle.t -> boolCheck collision between two rectangles
Check collision between two circles
val check_collision_circle_rec : Vector2.t -> float -> Rectangle.t -> boolCheck collision between circle and rectangle
val check_collision_point_rec : Vector2.t -> Rectangle.t -> boolCheck if point is inside rectangle
check_collision_point_circle point center radius checks if point is inside circle
check_collision_point_triangle point p1 p2 p3 checks if point is inside a triangle
val get_collision_rec : Rectangle.t -> Rectangle.t -> Rectangle.tGet collision rectangle for two rectangles collision
Texture Loading and Drawing Functions (Module: textures)
Image loading functions
val load_image : string -> Image.tLoad image from file into CPU memory (RAM)
val load_image_raw : string -> int -> int -> PixelFormat.t -> int -> Image.tload_image_raw fileName width height format headerSize loads image from RAW file data
val unload_image : Image.t -> unitUnload image from CPU memory (RAM)
val export_image : Image.t -> string -> boolExport image data to file
val export_image_as_code : Image.t -> string -> boolexport_image_as_code image filename exports image as code file defining an array of bytes, returns true on success
Generate image: vertical gradient
Generate image: horizontal gradient
Generate image: radial gradient
Generate image: checked
val gen_image_white_noise : int -> int -> float -> Image.tGenerate image: white noise
val gen_image_perlin_noise : int -> int -> int -> int -> float -> Image.tGenerate image: perlin noise
val gen_image_cellular : int -> int -> int -> Image.tGenerate image: cellular algorithm. Bigger tileSize means bigger cells
Image manipulation functions
val image_from_image : Image.t -> Rectangle.t -> Image.tCreate an image from another image piece
Create an image from text (custom sprite font)
val image_crop : Image.t ptr -> Rectangle.t -> unitCrop an image to a defined rectangle
Resize image (Nearest-Neighbor scaling algorithm)
Resize canvas and fill with color
Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
Modify image color: replace color
val get_image_alpha_border : Image.t -> float -> Rectangle.tGet image alpha border rectangle
Image drawing functions
Draw pixel within an image (Vector version)
Draw line within an image
Draw line within an image (Vector version)
Draw circle within an image
Draw circle within an image (Vector version)
Draw rectangle within an image
Draw rectangle within an image (Vector version)
val image_draw_rectangle_rec : Image.t ptr -> Rectangle.t -> Color.t -> unitDraw rectangle within an image
val image_draw_rectangle_lines : 
  Image.t ptr ->
  Rectangle.t ->
  int ->
  Color.t ->
  unitDraw rectangle lines within an image
val image_draw : 
  Image.t ptr ->
  Image.t ->
  Rectangle.t ->
  Rectangle.t ->
  Color.t ->
  unitDraw a source image within a destination image (tint applied to source)
image_draw_text dst text posX posY fontSize color draws text (using default font) within an image (destination)
val image_draw_text_ex : 
  Image.t ptr ->
  Font.t ->
  string ->
  Vector2.t ->
  float ->
  float ->
  Color.t ->
  unitimage_draw_text_ex dst font text position fontSize spacing tint draws text (custom sprite font) within an image (destination)
Texture loading functions
val load_texture : string -> Texture.tLoad texture from file into GPU memory (VRAM)
Load cubemap from image, multiple image cubemap layouts supported
val load_render_texture : int -> int -> RenderTexture.tLoad texture for rendering (framebuffer)
val unload_texture : Texture.t -> unitUnload texture from GPU memory (VRAM)
val unload_render_texture : RenderTexture.t -> unitUnload render texture from GPU memory (VRAM)
update_texture texture pixels updates GPU texture with new data
val update_texture_rec : Texture.t -> Rectangle.t -> unit ptr -> unitupdate_texture_rec texture rec pixels updates GPU texture rectangle with new data
val get_screen_data : unit -> Image.tGet pixel data from screen buffer and return an Image (screenshot)
Texture configuration functions
val set_texture_filter : Texture.t -> TextureFilterMode.t -> unitSet texture scaling filter mode
val set_texture_wrap : Texture.t -> TextureWrapMode.t -> unitSet texture wrapping mode
Texture drawing functions
draw_texture texture posX posY tint draws a Texture
draw_texture_v texture position tint draws a Texture with position defined as Vector2
draw_texture_ex texture position rotation scale tint draws a Texture with extended parameters
val draw_texture_rec : Texture.t -> Rectangle.t -> Vector2.t -> Color.t -> unitdraw_texture_rec texture source position tint draws a part of a texture defined by a rectangle
val draw_texture_quad : 
  Texture.t ->
  Vector2.t ->
  Vector2.t ->
  Rectangle.t ->
  Color.t ->
  unitdraw_texture_quad texture tiling offset quad tint draws texture quad with tiling and offset parameters
val draw_texture_tiled : 
  Texture.t ->
  Rectangle.t ->
  Rectangle.t ->
  Vector2.t ->
  float ->
  float ->
  Color.t ->
  unitdraw_texture_tiled texture source dest origin rotation scale tint draws part of a texture (defined by a rectangle) with rotation and scale tiled into dest
val draw_texture_pro : 
  Texture.t ->
  Rectangle.t ->
  Rectangle.t ->
  Vector2.t ->
  float ->
  Color.t ->
  unitdraw_texture_pro texture source dest origin rotation tint draws a part of a texture defined by a rectangle with 'pro' parameters
val draw_texture_n_patch : 
  Texture.t ->
  NPatchInfo.t ->
  Rectangle.t ->
  Vector2.t ->
  float ->
  Color.t ->
  unitdraw_texture_n_patch texture nPatchInfo dest origin rotation tint draws a texture (or part of it) that stretches or shrinks nicely
Color/Pixel related functions
val color_to_int : Color.t -> intReturns hexadecimal value for a Color
val color_from_hsv : float -> float -> float -> Color.tcolor_from_hsv hue saturation value returns a Color from HSV values
color_alpha color alpha returns color with alpha applied, alpha goes from 0.0f to 1.0f
color_alpha_blend dst src tint returns src alpha-blended into dst color with tint
val get_color : int -> Color.tReturns a Color struct from hexadecimal value
val get_pixel_color : unit ptr -> PixelFormat.t -> Color.tGet Color from a source pixel pointer of certain format
val set_pixel_color : unit ptr -> Color.t -> PixelFormat.t -> unitSet color formatted into destination pixel pointer
val get_pixel_data_size : int -> int -> PixelFormat.t -> intget_pixel_data_size width height format gets pixel data size in bytes (image or texture)
Font Loading and Text Drawing Functions (Module: text)
Font loading/unloading functions
val get_font_default : unit -> Font.tGet the default Font
val load_font : string -> Font.tLoad font from file into GPU memory (VRAM)
load_font_ex fileName fontSize fontChars charsCount loads font from file with extended parameters
load_font_from_image image kay firstChar loads font from Image (XNA style)
val load_font_data : 
  Unsigned.uchar ptr ->
  int ->
  int ->
  int ptr ->
  int ->
  int ->
  CharInfo.t ptrload_font_data fileData dataSize fontSize fontChars charsCount type loads font data for further use
val unload_font_data : CharInfo.t ptr -> int -> unitunload_font_data chars charsCount Unload font chars info data (RAM)
val unload_font : Font.t -> unitUnload Font from GPU memory (VRAM)
Text drawing functions
val draw_text : string -> int -> int -> int -> Color.t -> unitdraw_text text posX posY fontSize color draws text (using default font)
draw_text_ex font text position fontSize spacing tint draws text using font and additional parameters
val draw_text_rec : 
  Font.t ->
  string ->
  Rectangle.t ->
  float ->
  float ->
  bool ->
  Color.t ->
  unitdraw_text_rec font text rec fontSize spacing wordWrap tint draws text using font inside rectangle limits
val draw_text_rec_ex : 
  Font.t ->
  string ->
  Rectangle.t ->
  float ->
  float ->
  bool ->
  Color.t ->
  int ->
  int ->
  Color.t ->
  Color.t ->
  unitdraw_text_rec_ex font text rec fontSize spacing wordWrap tint selectStart selectLength selectTint selectBackTint draws text using font inside rectangle limits with support for text selection
draw_text_codepoint font codepoint position fontSize tint draws one character (codepoint)
Text misc. functions
val get_glyph_index : Font.t -> int -> intGet index position for a unicode character on font
Text strings management functions (no utf8 strings, only byte chars)
Text formatting with variables (sprintf style)
Insert text in a position (memory must be freed!)
val text_append : string -> string -> int ptr -> unitAppend text at specific position and move cursor!
val text_to_utf8 : int ptr -> int -> stringEncode text codepoint into utf8 text (memory must be freed!)
UTF8 text strings management functions
Get all codepoints in a string, codepoints count returned by parameters
Get total number of characters (codepoints) in a UTF8 encoded string
val get_next_codepoint : string -> int ptr -> intReturns next codepoint in a UTF8 encoded string; 0x3f('?') is returned on failure
val codepoint_to_utf8 : int -> int ptr -> stringEncode codepoint into utf8 text (char array length returned as parameter)
Basic 3d Shapes Drawing Functions (Module: models)
Basic geometric 3D shapes drawing functions
draw_line_3d startPos endPos color draws a line in 3D world space
draw_point_3d position color draws a point in 3D space, actually a small line
draw_circle_3d center radius rotationAxis rotationAngle color draws a circle in 3D world space
draw_triangle_3d v1 v2 v3 color draws a triangle strip defined by points
draw_triangle_strip_3d points pointsCount color draws a triangle strip defined by points
draw_cube position width height length color draws cube
draw_cube_v position size color draws cube (Vector version)
draw_cube_wires position width height length color draws cube wires
draw_cube_wires_v position size color draws cube wires (Vector version)
draw_cube_texture texture position width height length color draws cube textured
draw_sphere centerPos radius color draws sphere
draw_sphere_ex centerPos radius rings slices color draws sphere with extended parameters
draw_sphere_wires centerPos radius rings slices color draws sphere wires
draw_cylinder position radiusTop radiusBottom height slices color draws a cylinder/cone
draw_cylinder_wires position radiusTop radiusBottom height slices color draws a cylinder/cone wires
draw_plane centerPos size color draws a plane XZ
val draw_gizmo : Vector3.t -> unitdraw_gizmo position draws simple gizmo
Model loading/unloading functions
val load_model : string -> Model.tLoad model from files (meshes and materials)
val unload_model : Model.t -> unitUnload model (including meshes) from memory (RAM and/or VRAM)
val unload_model_keep_meshes : Model.t -> unitUnload model (but not meshes) from memory (RAM and/or VRAM)
val unload_mesh : Mesh.t -> unitUnload mesh from memory (RAM and/or VRAM)
val export_mesh : Mesh.t -> string -> unitExport mesh data to file
Material loading/unloading functions
val load_materials : string -> int ptr -> Material.t ptrLoad materials from model file
val load_material_default : unit -> Material.tLoad default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
val unload_material : Material.t -> unitUnload material from GPU memory (VRAM)
val set_material_texture : 
  Material.t ptr ->
  MaterialMapType.t ->
  Texture.t ->
  unitSet texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
Model animations loading/unloading functions
Load model animations from file
val update_model_animation : Model.t -> ModelAnimation.t -> int -> unitUpdate model animation pose
val unload_model_animation : ModelAnimation.t -> unitUnload animation data
val is_model_animation_valid : Model.t -> ModelAnimation.t -> boolCheck model animation skeleton match
Mesh generation functions
val gen_mesh_poly : int -> float -> Mesh.tGenerate polygonal mesh
val gen_mesh_plane : float -> float -> int -> int -> Mesh.tGenerate plane mesh (with subdivisions)
val gen_mesh_cube : float -> float -> float -> Mesh.tGenerate cuboid mesh
val gen_mesh_sphere : float -> int -> int -> Mesh.tGenerate sphere mesh (standard sphere)
val gen_mesh_hemi_sphere : float -> int -> int -> Mesh.tGenerate half-sphere mesh (no bottom cap)
val gen_mesh_cylinder : float -> float -> int -> Mesh.tGenerate cylinder mesh
val gen_mesh_torus : float -> float -> int -> int -> Mesh.tGenerate torus mesh
val gen_mesh_knot : float -> float -> int -> int -> Mesh.tGenerate trefoil knot mesh
Mesh manipulation functions
val mesh_bounding_box : Mesh.t -> BoundingBox.tCompute mesh bounding box limits
Model drawing functions
draw_model model position scale tint draws a model (with texture if set)
draw_model_ex model position rotationAxis rotationAngle scale tint draws a model with extended parameters
draw_model_wires model position scale tint draws a model wires (with texture if set)
val draw_model_wires_ex : 
  Model.t ->
  Vector3.t ->
  Vector3.t ->
  float ->
  Vector3.t ->
  Color.t ->
  unitdraw_model_wires_ex model position rotationAxis rotationAngle scale tint draws a model wires (with texture if set) with extended parameters
val draw_bounding_box : BoundingBox.t -> Color.t -> unitdraw_bounding_box box color draws bounding box (wires)
val draw_billboard : 
  Camera3D.t ->
  Texture.t ->
  Vector3.t ->
  float ->
  Color.t ->
  unitdraw_billboard camera texture center size tint draws a billboard texture
val draw_billboard_rec : 
  Camera3D.t ->
  Texture.t ->
  Rectangle.t ->
  Vector3.t ->
  float ->
  Color.t ->
  unitdraw_billboard_rec camera texture source center size tint draws a billboard texture defined by sourceRec
Collision detection functions
Detect collision between two spheres
val check_collision_boxes : BoundingBox.t -> BoundingBox.t -> boolDetect collision between two bounding boxes
val check_collision_box_sphere : BoundingBox.t -> Vector3.t -> float -> boolDetect collision between box and sphere
Detect collision between ray and sphere
Detect collision between ray and sphere, returns collision point
val check_collision_ray_box : Ray.t -> BoundingBox.t -> boolDetect collision between ray and box
val get_collision_ray_mesh : Ray.t -> Mesh.t -> Matrix.t -> RayHitInfo.tget_collision_ray_mesh ray mesh transform gets collision info between ray and mesh
val get_collision_ray_model : Ray.t -> Model.t -> RayHitInfo.tGet collision info between ray and model
val get_collision_ray_triangle : 
  Ray.t ->
  Vector3.t ->
  Vector3.t ->
  Vector3.t ->
  RayHitInfo.tGet collision info between ray and triangle
val get_collision_ray_ground : Ray.t -> float -> RayHitInfo.tGet collision info between ray and ground plane (Y-normal plane)
Shaders System Functions (Module: rlgl)
Shader loading/unloading functions
val load_shader : string -> string -> Shader.tLoad shader from files and bind default locations
val load_shader_code : string -> string -> Shader.tLoad shader from code strings and bind default locations
val unload_shader : Shader.t -> unitUnload shader from GPU memory (VRAM)
val get_shader_default : unit -> Shader.tGet default shader
val get_texture_default : unit -> Texture.tGet default texture
val get_shapes_texture : unit -> Texture.tGet texture to draw shapes
val get_shapes_texture_rec : unit -> Rectangle.tGet texture rectangle to draw shapes
val set_shapes_texture : Texture.t -> Rectangle.t -> unitDefine default texture used to draw shapes
Shader configuration functions
val get_shader_location : Shader.t -> string -> intGet shader uniform location
val get_shader_location_attrib : Shader.t -> string -> intGet shader attribute location
val set_shader_value : 
  Shader.t ->
  int ->
  unit ptr ->
  ShaderUniformDataType.t ->
  unitSet shader uniform value
val set_shader_value_v : 
  Shader.t ->
  int ->
  unit ptr ->
  ShaderUniformDataType.t ->
  int ->
  unitSet shader uniform value vector
Set shader uniform value (matrix 4x4)
Set shader uniform value for texture
val set_matrix_projection : Matrix.t -> unitSet a custom projection matrix (replaces internal projection matrix)
val set_matrix_modelview : Matrix.t -> unitSet a custom modelview matrix (replaces internal modelview matrix)
val get_matrix_modelview : unit -> Matrix.tGet internal modelview matrix
val get_matrix_projection : unit -> Matrix.tGet internal projection matrix
Texture maps generation (PBR)
val gen_texture_cubemap : 
  Shader.t ->
  Texture.t ->
  int ->
  PixelFormat.t ->
  Texture.tGenerate cubemap texture from 2D texture
Generate irradiance texture using cubemap data
Generate prefilter texture using cubemap data
Shading begin/end functions
val begin_shader_mode : Shader.t -> unitBegin custom shader drawing
val begin_blend_mode : BlendMode.t -> unitBegin blending mode (alpha, additive, multiplied)
VR control functions
val update_vr_tracking : Camera3D.t ptr -> unitUpdate VR tracking (position and orientation) and camera
val set_vr_configuration : VrDeviceInfo.t -> Shader.t -> unitSet stereo rendering configuration parameters
Audio Loading and Playing Functions (Module: audio)
Audio device management functions
Wave/Sound loading/unloading functions
val load_wave : string -> Wave.tLoad wave data from file
Load wave from memory buffer, fileType refers to extension: i.e. "wav"
val load_sound : string -> Sound.tLoad sound from file
val unload_wave : Wave.t -> unitUnload wave data
val unload_sound : Sound.t -> unitUnload sound
val export_wave : Wave.t -> string -> boolExport wave data to file, returns true on success
val export_wave_as_code : Wave.t -> string -> boolExport wave sample data to code (.h), returns true on success
Wave/Sound management functions
val play_sound : Sound.t -> unitPlay a sound
val stop_sound : Sound.t -> unitStop playing a sound
val pause_sound : Sound.t -> unitPause a sound
val resume_sound : Sound.t -> unitResume a paused sound
val play_sound_multi : Sound.t -> unitPlay a sound (using multichannel buffer pool)
val is_sound_playing : Sound.t -> boolCheck if a sound is currently playing
val set_sound_volume : Sound.t -> float -> unitSet volume for a sound (1.0 is max level)
val set_sound_pitch : Sound.t -> float -> unitSet pitch for a sound (1.0 is base level)
val unload_wave_samples : float ptr -> unitUnload samples data loaded with load_wave_data
Music management functions
val load_music_stream : string -> Music.tLoad music stream from file
val unload_music_stream : Music.t -> unitUnload music stream
val play_music_stream : Music.t -> unitStart music playing
val update_music_stream : Music.t -> unitUpdates buffers for music streaming
val stop_music_stream : Music.t -> unitStop music playing
val pause_music_stream : Music.t -> unitPause music playing
val resume_music_stream : Music.t -> unitResume playing paused music
val is_music_playing : Music.t -> boolCheck if music is playing
val set_music_volume : Music.t -> float -> unitSet volume for music (1.0 is max level)
val set_music_pitch : Music.t -> float -> unitSet pitch for a music (1.0 is base level)
val get_music_time_length : Music.t -> floatGet music time length (in seconds)
val get_music_time_played : Music.t -> floatGet current music time played (in seconds)
AudioStream management functions
val init_audio_stream : int -> int -> int -> AudioStream.tInit audio stream (to stream raw audio pcm data)
val update_audio_stream : AudioStream.t -> unit ptr -> int -> unitUpdate audio stream buffers with data
val close_audio_stream : AudioStream.t -> unitClose audio stream and free memory
val is_audio_stream_processed : AudioStream.t -> boolCheck if any audio stream buffers requires refill
val play_audio_stream : AudioStream.t -> unitPlay audio stream
val pause_audio_stream : AudioStream.t -> unitPause audio stream
val resume_audio_stream : AudioStream.t -> unitResume audio stream
val is_audio_stream_playing : AudioStream.t -> boolCheck if audio stream is playing
val stop_audio_stream : AudioStream.t -> unitStop audio stream
val set_audio_stream_volume : AudioStream.t -> float -> unitSet volume for audio stream (1.0 is max level)
val set_audio_stream_pitch : AudioStream.t -> float -> unitSet pitch for audio stream (1.0 is base level)
- Ctypes reexports
- Constants
- Types
- 
        
          Functions
        
          
          - Window and Graphics Device Functions (Module: core)
- Input Handling Functions (Module: core)
- Basic Shapes Drawing Functions (Module: shapes)
- Texture Loading and Drawing Functions (Module: textures)
- Font Loading and Text Drawing Functions (Module: text)
- Basic 3d Shapes Drawing Functions (Module: models)
- Shaders System Functions (Module: rlgl)
- Audio Loading and Playing Functions (Module: audio)