Skip to main content

Crate vzglyd_slide

Crate vzglyd_slide 

Source
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§

CameraKeyframe
Camera pose at a specific point along an animated path.
CameraPath
Ordered keyframes that define camera motion for a world-space slide.
DirectionalLight
Directional light configuration for world-space slides.
DrawSpec
Draw call descriptor for one mesh slice.
DynamicMesh
Dynamic mesh where vertices are rewritten every frame but index order is fixed.
FontAtlas
Runtime font atlas used by text-capable slides.
GlyphInfo
UV mapping data for one glyph in a FontAtlas.
Limits
Resource and geometry limits a slide is allowed to consume.
MeshAsset
Standalone mesh asset containing geometry buffers.
MeshAssetVertex
Vertex data extracted from an imported mesh asset.
RuntimeMesh
Runtime-updated mesh payload for a specific dynamic mesh slot.
RuntimeMeshSet
Batch of dynamic mesh updates produced at runtime.
RuntimeOverlay
Overlay geometry uploaded separately from the main mesh set.
SceneAnchor
Named anchor extracted from an imported scene asset.
SceneAnchorSet
Set of anchors extracted from a named scene asset.
ScreenVertex
Canonical vertex for screen-space (2-D) slides.
ShaderSources
Optional custom shader source overrides supplied by the slide package.
SlideSpec
Complete scene description returned by a slide.
StaticMesh
Static mesh payload fully provided by the slide.
TextureDesc
Texture payload embedded in the slide package.
WorldLighting
Lighting parameters for world-space slides.
WorldVertex
Canonical vertex for world-space (3-D) slides.

Enums§

DrawSource
Mesh source referenced by a draw call.
FilterMode
Sampler filtering mode.
PipelineKind
Fixed render pipeline selection for a draw call.
SceneAnchorLookupError
Error returned when looking up a missing scene anchor.
SceneSpace
Coordinate system and renderer contract for the slide.
SpecError
Validation error produced when a SlideSpec breaks the engine contract.
TextureFormat
Texture formats accepted by the engine.
WrapMode
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.