1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 14:20:04 -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

@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
* You can control the initial size of the native window with `App::initial_window_size`.
* You can control the maximum egui web canvas size with `App::max_size_points`.
* `Frame::tex_allocator()` no longer returns an `Option` (there is always a texture allocator).
## 0.9.0 - 2021-02-07

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>,