pixels/examples/minimal-winit
Jay Oster 210b373882
Add resolver = "2" to all examples (#192)
- These are ignored, but it should prevent copy-pasta errors from users
2021-09-01 21:48:51 -07:00
..
src Rename resize to resize_surface (#149) 2021-03-09 04:15:24 -08:00
Cargo.toml Add resolver = "2" to all examples (#192) 2021-09-01 21:48:51 -07:00
README.md Fix dependency bloat (#67) 2020-04-13 10:12:18 -07:00

Hello Pixels

Hello Pixels

Minimal example with winit.

Running

cargo run --release --package minimal-winit

About

This example demonstrates the absolute minimum for creating a winit window and pixel buffer. It animates a purple box moving on a blue background, just for something interesting to display.

It uses winit_input_helper to provide a slightly better code presentation, but it doesn't greatly reduce the number of lines in the example.