Struct eframe::Frame

source ·
pub struct Frame { /* private fields */ }
Expand description

Represents the surroundings of your app.

It provides methods to inspect the surroundings (are we on the web?), allocate textures, and change settings (e.g. window size).

Implementations§

True if you are in a web environment.

Equivalent to cfg!(target_arch = "wasm32")

Information about the integration.

A place where you can store custom data in a way that persists when you restart the app.

A place where you can store custom data in a way that persists when you restart the app.

A reference to the underlying glow (OpenGL) context.

This can be used, for instance, to:

  • Render things to offscreen buffers.
  • Read the pixel buffer from the previous frame (glow::Context::read_pixels).
  • Render things behind the egui windows.

Note that all egui painting is deferred to after the call to App::update (egui only collects [egui::Shape]s and then eframe paints them all in one go later on).

To get a glow context you need to compile with the glow feature flag, and run eframe using Renderer::Glow.

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