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<Rc<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<Rc<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.