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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more