Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

piet_common with winit #545

Open
DasLixou opened this issue Jan 2, 2023 · 3 comments
Open

piet_common with winit #545

DasLixou opened this issue Jan 2, 2023 · 3 comments
Labels
question Further information is requested

Comments

@DasLixou
Copy link

DasLixou commented Jan 2, 2023

Hello!
I wonder if there is an easy way to make piet_common work with winit.
Thanks :D

@xStrom
Copy link
Member

xStrom commented Jan 10, 2023

Not easily, no. It may become easier in the future, because I imagine the work needed to make it easier is similar that would be needed to use Piet with glazier. That work is not scheduled currently though. We need someone to step up and make it happen.

@xStrom xStrom added the question Further information is requested label Jan 10, 2023
@bitec0de
Copy link

bitec0de commented May 1, 2023

@DasLixou I tried getting this to work using the pixels crate, but it seems very inefficient, around 25ms per full screen frame in release mode with the Druid custom widget example graphics (I couldn't work out how to avoid creating a new BitmapTarget for every frame due to lifetime issues with Winit's 'static event_loop.run closure). Here's the attempt.

@xStrom How much work would be needed getting Piet to work with Glazier again? Would there be guidance? I'd like it to happen too, Vello doesn't work on my machine.

Edit: this seems to be the commit where Glazier removed all references to Piet, so I guess the process would be to go through that and copy all the platform specific code about presenting to a window into Piet?

@notgull
Copy link
Contributor

notgull commented May 1, 2023

Apologies for the shameless plug, but I'm currently working on a Piet implementation called theo that should be able to be integrated with winit in a fairly straightforwards way. The only thing that really needs to be done before release are minor fixes to text rendering; contributions are welcome.

Ideally, piet-common would just expose an API that takes a HasRawWindowHandle or otherwise. Not sure how difficult this would be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants