Skip to content

An attempt at using Piet (cross-platform 2D graphics abstraction) to draw in a Winit window

Notifications You must be signed in to change notification settings

bitec0de/piet-winit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

piet-winit

An attempt at using Piet with winit, as somebody asked.

This is very inefficient, as I don't understand lifetimes enough to avoid creating and dropping a new Piet bitmap canvas with every frame -- the Winit event_loop.run method takes a 'static move closure, and it complains borrowed value does not live long enough / argument requires that 'device' is borrowed for 'static if I try creating a bitmap to reuse outside the event loop. Help would be appreciated, if this can be fixed.

Based on the pixels crate raqote-winit example.

Running

cargo run --release

About

An attempt at using Piet (cross-platform 2D graphics abstraction) to draw in a Winit window

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages