1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

eframe: always provide a texture allocator

This commit is contained in:
Emil Ernerfeldt
2021-02-28 19:09:48 +01:00
parent fdb1aa6bec
commit 84cc227f11
6 changed files with 15 additions and 12 deletions

View File

@@ -156,9 +156,9 @@ impl<'a> Frame<'a> {
&self.0.info
}
/// A way to allocate textures (on integrations that support it).
pub fn tex_allocator(&mut self) -> &mut Option<&'a mut dyn TextureAllocator> {
&mut self.0.tex_allocator
/// A way to allocate textures.
pub fn tex_allocator(&mut self) -> &mut dyn TextureAllocator {
self.0.tex_allocator
}
/// Signal the app to stop/exit/quit the app (only works for native apps, not web apps).
@@ -368,7 +368,7 @@ pub mod backend {
/// Information about the integration.
pub info: IntegrationInfo,
/// A way to allocate textures (on integrations that support it).
pub tex_allocator: Option<&'a mut dyn TextureAllocator>,
pub tex_allocator: &'a mut dyn TextureAllocator,
/// Do http requests.
#[cfg(feature = "http")]
pub http: std::sync::Arc<dyn backend::Http>,