Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 1.15 KB

using-kajiya.md

File metadata and controls

27 lines (16 loc) · 1.15 KB

Using kajiya as a crate

Please note that the project is experimental. Shipping games/apps is not one of its current goals, and is not actively supported.

kajiya is not currently published on crates.io, and doesn't have an asset packaging system. For those reasons, using it as a crate is a bit fiddly. It's possible though.

Documentation is currently scarce, meaning that it's best to follow examples (see crates/bin/hello).

VFS

The renderer has a basic virtual file system used for loading assets (models, textures, shaders). That makes it possible to work on a game/app while pointing it at the assets in a separately synced kajiya repository.

// Point `kajiya` to standard assets and shaders in the parent directory
set_standard_vfs_mount_points("../kajiya");

// Game-specific assets in the current directory
set_vfs_mount_point("/cache", "./cache");

Cargo patches

For a standalone project to compile, please copy the [patch.crates-io] section from the top-level Cargo.toml

Larger examples