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.

Tell eframe to close the desktop window.

The window will not close immediately, but at the end of the this frame.

Calling this will likely result in the app quitting, unless you have more code after the call to crate::run_native.

👎 Deprecated:

Renamed close

Tell eframe to close the desktop window.

Set the desired inner size of the window (in egui points).

Set the desired title of the window.

Set whether to show window decorations (i.e. a frame around you app).

If false it will be difficult to move and resize the app.

Turn borderless fullscreen on/off (native only).

set the position of the outer window.

When called, the native window will follow the movement of the cursor while the primary mouse button is down.

Does not work on the web.

Set the visibility of the window.

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