Skip to main content

Crate lactea_host

Crate lactea_host 

Source
Expand description

Host-side helpers shared by the lactea binaries, the C API and Rust hosts embedding the engine. The engine crates never touch the filesystem or open a GPU; the hosts do, and they all need the same pieces: a directory-backed lactea::TextureProvider, image decoding, headless GPU setup, frame read-back (readback), running on the host’s own Vulkan or Metal device (vulkan, metal) and a WAV reader.

Re-exports§

pub use presets::PlaylistFs;
pub use presets::is_preset_file;
pub use presets::scan_preset_files;
pub use presets::scan_presets;
pub use readback::FrameReader;
pub use textures::DirTextures;
pub use textures::TEXTURE_EXTENSIONS;
pub use textures::decode_file;
pub use textures::decode_image;
pub use textures::decode_media;

Modules§

gpu
Headless wgpu setup.
presets
Finding preset files on disk and feeding them to a lactea::Playlist (projectm_playlist_add_path / projectm_playlist_insert_path). The playlist itself is pure data; the directory walk lives here.
readback
RGBA8 read-back of rendered frames without stalling on the GPU.
textures
Directory-backed TextureProvider. Scanning mirrors projectM’s FileScanner + TextureManager: recursive (depth 8), keyed by lowercase base name, files of one directory in path order, earlier directories first. The random pool is sorted by name.
vulkan
Vulkan interop: run lactea on the host’s own VkDevice and render into host VkImages.
wav
Minimal WAV reader (float32 / int16 PCM, mono duplicated to stereo): same rules as the oracle’s refrender.