Expand description
§vzglyd_slide
ABI contract and shared data types for VZGLYD slides.
A VZGLYD slide is a wasm32-wasip1 module that exports vzglyd_abi_version() and
vzglyd_update(dt: f32) -> i32. The engine loads the slide, deserializes its
SlideSpec, validates it against device limits, and renders it with the engine’s
fixed pipeline contract.
§Quick Start
Add the crate to your slide:
[dependencies]
vzglyd_slide = "0.1"Export the required ABI surface:
use vzglyd_slide::ABI_VERSION;
#[unsafe(no_mangle)]
pub extern "C" fn vzglyd_abi_version() -> u32 {
ABI_VERSION
}
#[unsafe(no_mangle)]
pub extern "C" fn vzglyd_update(_dt: f32) -> i32 {
0
}dt is the elapsed time since the previous frame, expressed in seconds. Returning 0
tells the engine that geometry is unchanged and can be reused. Returning 1 tells the
engine to fetch updated geometry and upload fresh buffers for the next frame.
See the crate README for a packaging overview, and ABI_POLICY.md for
the versioning and compatibility contract.
Macros§
- params_
buf - Declare a parameter buffer that the host can populate before
vzglyd_init.
Structs§
- Camera
Keyframe - Camera pose at a specific point along an animated path.
- Camera
Path - Ordered keyframes that define camera motion for a world-space slide.
- Directional
Light - Directional light configuration for world-space slides.
- Draw
Spec - Draw call descriptor for one mesh slice.
- Dynamic
Mesh - Dynamic mesh where vertices are rewritten every frame but index order is fixed.
- Font
Atlas - Runtime font atlas used by text-capable slides.
- Glyph
Info - UV mapping data for one glyph in a
FontAtlas. - Limits
- Resource and geometry limits a slide is allowed to consume.
- Mesh
Asset - Standalone mesh asset containing geometry buffers.
- Mesh
Asset Vertex - Vertex data extracted from an imported mesh asset.
- Runtime
Mesh - Runtime-updated mesh payload for a specific dynamic mesh slot.
- Runtime
Mesh Set - Batch of dynamic mesh updates produced at runtime.
- Runtime
Overlay - Overlay geometry uploaded separately from the main mesh set.
- Scene
Anchor - Named anchor extracted from an imported scene asset.
- Scene
Anchor Set - Set of anchors extracted from a named scene asset.
- Screen
Vertex - Canonical vertex for screen-space (2-D) slides.
- Shader
Sources - Optional custom shader source overrides supplied by the slide package.
- Slide
Spec - Complete scene description returned by a slide.
- Static
Mesh - Static mesh payload fully provided by the slide.
- Texture
Desc - Texture payload embedded in the slide package.
- World
Lighting - Lighting parameters for world-space slides.
- World
Vertex - Canonical vertex for world-space (3-D) slides.
Enums§
- Draw
Source - Mesh source referenced by a draw call.
- Filter
Mode - Sampler filtering mode.
- Pipeline
Kind - Fixed render pipeline selection for a draw call.
- Scene
Anchor Lookup Error - Error returned when looking up a missing scene anchor.
- Scene
Space - Coordinate system and renderer contract for the slide.
- Spec
Error - Validation error produced when a
SlideSpecbreaks the engine contract. - Texture
Format - Texture formats accepted by the engine.
- Wrap
Mode - Sampler address mode.
Constants§
- ABI_
VERSION - Current slide ABI version understood by this crate and the engine.
- FONT_
CHAR_ ORDER - The character order used by the 5×7 bitmap font atlas.
Functions§
- make_
font_ atlas - Generates the built-in 5×7 bitmap font atlas used by world-space slides.