ktx-async
Asynchronous reader for KTX texture format
Features:
- Asynchronous IO API
- Works with tokio
- Supports KTX 1.1
TODO:
- Custom buffer allocation (ex: OpenGL Pixel Buffer Object)
- Add
std::io::Read
support (?) - KTX 2.0 (?) spec
Example:
use ktx_async as ktx;
use File;
use StreamExt as _;
// In async code
// Open AsyncRead
let file = open.await.unwrap;
// Start decoding KTX
let decoder = new;
let = decoder.read_async.await.unwrap;
// create and bind a texture object ...
// Get all the frames from the stream
while let Some = stream.next.await.map
Development
Build:
cargo build
Run Test:
cargo test
Run Example:
cargo run --example basic
License
This project is licensed under the MIT License