Struct blade_egui::GuiPainter

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

GUI painter based on egui.

It can render egui primitives into a render pass.

Implementations§

source§

impl GuiPainter

source

pub fn destroy(&mut self, context: &Context)

Destroy the contents of the painter.

source

pub fn new(output_format: TextureFormat, context: &Context) -> Self

Create a new painter with a given GPU context.

It supports renderpasses with only a color attachment, and this attachment format must be The output_format.

source

pub fn update_textures( &mut self, command_encoder: &mut CommandEncoder, textures_delta: &TexturesDelta, context: &Context )

Updates the texture used by egui for the fonts etc. New textures should be added before the call to execute(), and old textures should be removed after.

source

pub fn paint( &mut self, pass: &mut RenderCommandEncoder<'_>, paint_jobs: &[ClippedPrimitive], sd: &ScreenDescriptor, context: &Context )

Render the set of clipped primitives into a render pass. The sd must contain dimensions of the render target.

source

pub fn after_submit(&mut self, sync_point: &SyncPoint)

Call this after submitting work at the given sync_point.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.