-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Awkward API for TexturesDelta in integrations #1281
Comments
I agree it is not great. It is also a bit weird that Perhaps pub struct Output {
pub backend: BackendOutput,
pub textures_delta: epaint::textures::TexturesDelta,
pub shapes: Vec<ClippedShaped>,
} though it is not exactly clear to me what would go in |
Maybe something like this?: pub struct Output {
pub for_platform: PlatformOutput, // current `Output`
pub for_rendering: RenderingOutput, // shapes, texture delta
pub needs_repaint: bool, // ambiguous items that could go into either category go in top level struct
} |
Take a look: #1292 |
The API for integrations around
TexturesDelta
introduced in #1110 seems a bit awkward to me:egui_winit::State::handle_output
takes ownership ofegui::Output
and returnsegui::TexturesDelta
, suggesting that egui_winit is somehow involved or needed to get theTexturesDelta
, when that's not actually the case.Perhaps
TexturesDelta
could be moved out ofOutput
and into a new struct containing exactly everything needed to render the gui (i.e. theVec<ClippedShape>
that egui returns at the moment).As an alternative, egui_winit could just not take ownership of
Output
and return nothing.The text was updated successfully, but these errors were encountered: