pub struct Renderer {
    pub paint_callback_resources: TypeMap,
    /* private fields */
}
Expand description

Renderer for a egui based GUI.

Fields§

§paint_callback_resources: TypeMap

Storage for use by [egui::PaintCallback]’s that need to store resources such as render pipelines that must have the lifetime of the renderpass.

Implementations§

Creates a renderer for a egui UI.

output_color_format should preferably be [wgpu::TextureFormat::Rgba8Unorm] or [wgpu::TextureFormat::Bgra8Unorm], i.e. in gamma-space.

Executes the egui renderer onto an existing wgpu renderpass.

Should be called before render().

Get the WGPU texture and bind group associated to a texture that has been allocated by egui.

This could be used by custom paint hooks to render images that have been added through with egui_extras::RetainedImage or egui::Context::load_texture.

Registers a wgpu::Texture with a egui::TextureId.

This enables the application to reference the texture inside an image ui element. This effectively enables off-screen rendering inside the egui UI. Texture must have the texture format TextureFormat::Rgba8UnormSrgb and Texture usage TextureUsage::SAMPLED.

Registers a wgpu::Texture with an existing egui::TextureId.

This enables applications to reuse TextureIds.

Registers a wgpu::Texture with a egui::TextureId while also accepting custom wgpu::SamplerDescriptor options.

This allows applications to specify individual minification/magnification filters as well as custom mipmap and tiling options.

The Texture must have the format TextureFormat::Rgba8UnormSrgb and usage TextureUsage::SAMPLED. Any compare function supplied in the SamplerDescriptor will be ignored.

Registers a wgpu::Texture with an existing egui::TextureId while also accepting custom wgpu::SamplerDescriptor options.

This allows applications to reuse TextureIds created with custom sampler options.

Uploads the uniform, vertex and index data used by the renderer. Should be called before render().

Returns all user-defined command buffers gathered from prepare callbacks.

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