Skip to main content

optic_render/asset/
mod.rs

1//! Asset loading, caching, and GPU upload.
2//!
3//! Each asset type provides a `from_disk(path)` constructor that in debug
4//! builds loads the source file and overwrites the binary cache, and in
5//! release builds loads the cache for faster startup.
6//!
7//! # Types
8//!
9//! | Type | File extension | Cache extension |
10//! |------|----------------|-----------------|
11//! | [`TextureFile`] | `.png`, `.jpg`, ... | `.otxtr` |
12//! | [`Mesh3DFile`] | `.obj`, `.stl` | `.omesh` |
13//! | [`ShaderFile`] | `.glsl` | `.oshdr` |
14//!
15//! Also provides the [`attr`] sub-module for vertex and instance attribute
16//! descriptors used by meshes and instance buffers.
17
18pub mod attr;
19mod img;
20mod msh;
21mod shdr;
22
23pub use img::*;
24pub use msh::*;
25pub use shdr::*;