Skip to content

abjorck/minpixwin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minpixwin

minimize effort to render a pixel array to screen

very tiny wrapping of the neat pixels, winit crates

example use

add resolver = "2" to your Cargo.toml

draw a red rectangle

use minpixwin::Screen;

Screen::new(100, 100, move |buf| {
    for (index, pixel) in buf.chunks_exact_mut(4).enumerate() {
        let p = [255u8, 0u8, 0u8, 255u8];
        pixel.copy_from_slice(&p);
    };
});

TODO: this may not work on your platform, and assumes the default texture format winit creates is 32bit rgba, etc. ymmv

About

minimize effort to render a pixel array to screen

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages