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§
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 partw. - Rect
- Axis-aligned 2D rectangle. Width and height should be nonnegative.
- Screen
Image - Text
Dimensions - Text
Params - Touch
- Vec2
- Vec3
- Vec4
- Vertex
Enums§
Constants§
Traits§
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