Module prelude

Source

Structs§

Camera2D
Camera3D
Color
Unpremultiplied RGBA floating-point channels. No implicit gamma conversion.
Conf
Font
Mat4
Column-major 4x4 matrix acting on column vectors: translation * rotation * scale.
Mesh
PostFx
Authored post-processing settings. Start from a preset and adjust with the builder methods. Values are sanitized when applied: non-finite numbers use the neutral value and every field is clamped to its documented range.
Quat
Quaternion stored as vector part (x,y,z) followed by scalar part w.
Rect
Axis-aligned 2D rectangle. Width and height should be nonnegative.
TextDimensions
TextParams
Touch
Vec2
Vec3
Vec4
Vertex

Enums§

KeyCode
MouseButton
TouchPhase

Constants§

BLACK
BLUE
DARKGRAY
GRAY
GREEN
LIGHTGRAY
ORANGE
RED
WHITE
YELLOW

Traits§

Camera

Functions§

clear_background
draw_circle
draw_circle_lines
draw_cube
Draws an axis-aligned resident cuboid.
draw_ellipse
Filled ellipse of radii rx/ry rotated by rotation degrees, as a 32-segment fan (96 vertices). The rim directions come from a shared table.
draw_line
draw_line_3d
draw_mesh
draw_mesh_transformed
draw_poly
draw_rectangle
draw_rectangle_lines
draw_text
draw_text_ex
Draws classic 5×7 bitmap text with its baseline at y: one quad per horizontal run of lit font pixels in each glyph row, each exactly one font pixel tall. Coverage is identical to one quad per lit pixel with fewer vertices. Use text::draw_text_styled with text::FontFace::Classic for the same letters with vertically merged geometry, shadows and outlines.
draw_triangle
get_default_font
get_frame_time
get_screen_data
get_time
is_key_down
is_key_pressed
is_mouse_button_down
is_mouse_button_pressed
measure_text
mouse_delta_position
mouse_position
mouse_wheel
next_frame
post_fx_hud_begin
Mark the world/HUD boundary explicitly. Draws after this call go straight to the screen on top of the post-processed world. Returns true when this call recorded the frame’s boundary; false if post-processing is off or a boundary already exists in this frame.
screen_dpi_scale
screen_height
screen_width
set_camera
set_cursor_grab
set_default_camera
Restore the screen-space HUD camera. After a world camera this is also the post-processing HUD boundary; see post.
set_post_fx
Replace the sticky post-processing settings. Takes effect for the current frame’s composite; use PostFx::off() to return to direct rendering.
show_mouse
simulate_mouse_with_touch
touches
vec2
vec3
vec4