lucasmerlin / egui_skia

Render egui with skia!
MIT License
55 stars 13 forks source link

Windows don't render with rasterizer #11

Closed TheZoq2 closed 11 months ago

TheZoq2 commented 11 months ago

I was expecting cargo run --example rasterizer --features cpu_fix to render a few windows but it does not. It only renders the sidebar, the menu, and a transparent area in between

output

lucasmerlin commented 11 months ago

The problem is that egui doesn't render windows on the first frame, I think because it doesn't know their sizes yet.

I've released egui_skia 0.4.0 adding an option to rasterize to set how many frames should be rendered before the screenshot is taken, and made the default 2 so windows are always visible. Does this fix your problem as well?

TheZoq2 commented 11 months ago

That did the trick, thanks for the quick fix!