6 releases
Uses old Rust 2015
0.3.2 | Jul 29, 2018 |
---|---|
0.3.1 | Jun 22, 2018 |
0.2.1 | May 20, 2018 |
0.1.0 | May 9, 2018 |
#752 in Images
Used in dwarf-term
93KB
1.5K
SLoC
retro-pixel
A crate for working with retro-style pixel stuff.
cargo run --example glutin_indexmap
cargo run --example glutin_gba
cargo run --example glutin_bitmap
lib.rs
:
This is a library for pushing pixels on the CPU.
It uses SIMD where possible, so it's pretty fast. Run the benchmarks to decide if it's fast enough for your use-case. The intent is more for smaller resolution situations like a retro console would have, but you can do 1080p if you want. Even without SIMD the indexed color mode at least can run at basically any resolution you want.
Note that this library will not put your pixels on the screen itself. You
still have to use a GPU library of some sort to get stuff displayed.
Examples are provided of how you might do that with glutin
and gl
, but
you're free to use anything else if you want.
All of the real work is done via traits, and you can create image slices to
wrap around your existing image data. This allows you to quickly connect the
library onto your existing image types if you need to. If you don't have
existing image types, there is a VecImage
type provided. There's also an
example of an array-backed type, allowing you to use the library in a
no_std
situation (requires nightly). In the future, it's hoped that this
library will include feature flags to automatically support other crates,
but not yet.