Struct eframe::CreationContext
source · pub struct CreationContext<'s> {
pub egui_ctx: Context,
pub integration_info: IntegrationInfo,
pub storage: Option<&'s dyn Storage>,
pub gl: Option<Arc<Context>>,
pub wgpu_render_state: Option<RenderState>,
/* private fields */
}
Expand description
Data that is passed to AppCreator
that can be used to setup and initialize your app.
Fields§
§egui_ctx: Context
The egui Context.
You can use this to customize the look of egui, e.g to call egui::Context::set_fonts
,
egui::Context::set_visuals
etc.
integration_info: IntegrationInfo
Information about the surrounding environment.
storage: Option<&'s dyn Storage>
You can use the storage to restore app state(requires the “persistence” feature).
gl: Option<Arc<Context>>
The glow::Context
allows you to initialize OpenGL resources (e.g. shaders) that
you might want to use later from a [egui::PaintCallback
].
Only available when compiling with the glow
feature and using Renderer::Glow
.
wgpu_render_state: Option<RenderState>
The underlying WGPU render state.
Only available when compiling with the wgpu
feature and using Renderer::Wgpu
.
Can be used to manage GPU resources for custom rendering with WGPU using [egui::PaintCallback
]s.
Trait Implementations§
source§impl HasRawDisplayHandle for CreationContext<'_>
impl HasRawDisplayHandle for CreationContext<'_>
fn raw_display_handle(&self) -> RawDisplayHandle
source§impl HasRawWindowHandle for CreationContext<'_>
impl HasRawWindowHandle for CreationContext<'_>
fn raw_window_handle(&self) -> RawWindowHandle
Auto Trait Implementations§
impl<'s> !RefUnwindSafe for CreationContext<'s>
impl<'s> !Send for CreationContext<'s>
impl<'s> !Sync for CreationContext<'s>
impl<'s> Unpin for CreationContext<'s>
impl<'s> !UnwindSafe for CreationContext<'s>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.