Crate render

Expand description

Original immediate/retained renderer and platform ABI. Game code, input, geometry and scheduling live in Rust; hosts only bind OS events and GPU submission.

Modules§

canvas
Aspect-preserving 2D canvas with one coordinate transform for drawing and input.
demo
Shared native smoke-run support for small interactive examples. Each game supplies its own autoplay inputs and uses the same simulation as a human.
input
Input arrives in logical display pixels on every host.
mesh
Reusable geometry with face normals for lit 3D scenes.
native
Original native platform bridge. Linux uses the system X11/GLX/OpenGL APIs directly. Vertices are homogeneous clip-space XYZW followed by straight RGBA; each batch is triangles. A single streamed GPU vertex buffer and shader program persist for the window lifetime. No third-party Rust crate or windowing implementation is used here.
prelude
retained
Retained low-poly geometry and ordered instanced draw recording.
shaders
Original built-in vertex lighting and distance fog.
telemetry
Opt-in local performance recordings. Durations are CPU wall time, never inferred GPU time.
ui
Quiet, readable overlay helpers shared by the examples.
visibility
Conservative transformed-bound visibility and per-object hysteretic LOD.

Macros§

game

Structs§

Batch
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
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.
ScreenImage
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§

autoplay_enabled
clear_background
draw_circle
draw_circle_lines
draw_cube
draw_ellipse
draw_line
draw_line_3d
draw_lod
draw_mesh
draw_mesh_transformed
draw_poly
draw_rectangle
draw_rectangle_lines
draw_resident
Submit an immutable mesh snapshot. Compatible adjacent draws share one instanced call. Returns false when culled, for invalid transforms or a full frame instance budget.
draw_text
draw_text_ex
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
run
screen_dpi_scale
screen_height
screen_width
set_camera
set_cursor_grab
set_default_camera
set_lighting
set_visibility
show_mouse
simulate_mouse_with_touch
start
touches
vec2
vec3
vec4
visibility_stats
window_conf