pub struct EguiIntegration {
pub context: Context,
pub state: State,
pub renderer: Renderer,
/* private fields */
}Expand description
Manages egui state and rendering.
Fields§
§context: Context§state: State§renderer: RendererImplementations§
Source§impl EguiIntegration
impl EguiIntegration
Sourcepub fn new(
device: &Device,
output_format: TextureFormat,
window: &Window,
) -> Self
pub fn new( device: &Device, output_format: TextureFormat, window: &Window, ) -> Self
Creates a new egui integration.
Sourcepub fn handle_event(&mut self, window: &Window, event: &WindowEvent) -> bool
pub fn handle_event(&mut self, window: &Window, event: &WindowEvent) -> bool
Handles a winit window event. Returns true if egui consumed the event.
Sourcepub fn begin_frame(&mut self, window: &Window)
pub fn begin_frame(&mut self, window: &Window)
Begins a new frame by collecting input events and starting the egui pass.
Sourcepub fn begin_rerun_pass(&mut self)
pub fn begin_rerun_pass(&mut self)
Begins a re-run pass for multi-pass layout.
egui’s Grid widget makes itself invisible on the first frame it appears
(a sizing pass) and calls ctx.request_discard() expecting a second pass.
This method starts that second pass using take() on the stored raw input,
which preserves time/screen_rect/modifiers but clears events — matching
the approach used by Context::run().
Sourcepub fn end_pass(&mut self) -> FullOutput
pub fn end_pass(&mut self) -> FullOutput
Ends the current egui pass and returns the output without handling platform events.
Use this in a multi-pass loop. Call Self::handle_platform_output once
after the final pass.
Sourcepub fn handle_platform_output(
&mut self,
window: &Window,
output: &PlatformOutput,
)
pub fn handle_platform_output( &mut self, window: &Window, output: &PlatformOutput, )
Handles platform output (clipboard, cursor, IME, etc.).
Sourcepub fn end_frame(&mut self, window: &Window) -> FullOutput
pub fn end_frame(&mut self, window: &Window) -> FullOutput
Ends the frame and returns paint jobs (convenience for single-pass usage).
Sourcepub fn render(
&mut self,
device: &Device,
queue: &Queue,
encoder: &mut CommandEncoder,
view: &TextureView,
screen_descriptor: &ScreenDescriptor,
output: FullOutput,
)
pub fn render( &mut self, device: &Device, queue: &Queue, encoder: &mut CommandEncoder, view: &TextureView, screen_descriptor: &ScreenDescriptor, output: FullOutput, )
Renders egui to the given render pass.
Auto Trait Implementations§
impl Freeze for EguiIntegration
impl !RefUnwindSafe for EguiIntegration
impl Send for EguiIntegration
impl Sync for EguiIntegration
impl Unpin for EguiIntegration
impl UnsafeUnpin for EguiIntegration
impl !UnwindSafe for EguiIntegration
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more