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
impl GuiPainter
sourcepub fn new(output_format: TextureFormat, context: &Context) -> Self
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.
sourcepub fn update_textures(
&mut self,
command_encoder: &mut CommandEncoder,
textures_delta: &TexturesDelta,
context: &Context
)
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.
sourcepub fn paint(
&mut self,
pass: &mut RenderCommandEncoder<'_>,
paint_jobs: &[ClippedPrimitive],
sd: &ScreenDescriptor,
context: &Context
)
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.
sourcepub fn after_submit(&mut self, sync_point: &SyncPoint)
pub fn after_submit(&mut self, sync_point: &SyncPoint)
Call this after submitting work at the given sync_point.
Auto Trait Implementations§
impl RefUnwindSafe for GuiPainter
impl Send for GuiPainter
impl Sync for GuiPainter
impl Unpin for GuiPainter
impl UnwindSafe for GuiPainter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more