Struct egui_wgpu::renderer::RenderPass
source · [−]pub struct RenderPass { /* private fields */ }Expand description
Render pass to render a egui based GUI.
Implementations
sourceimpl RenderPass
impl RenderPass
sourcepub fn new(
device: &Device,
output_format: TextureFormat,
msaa_samples: u32
) -> Self
pub fn new(
device: &Device,
output_format: TextureFormat,
msaa_samples: u32
) -> Self
Creates a new render pass to render a egui UI.
If the format passed is not a *Srgb format, the shader will automatically convert to sRGB colors in the shader.
sourcepub fn execute(
&self,
encoder: &mut CommandEncoder,
color_attachment: &TextureView,
paint_jobs: &[ClippedPrimitive],
screen_descriptor: &ScreenDescriptor,
clear_color: Option<Color>
)
pub fn execute(
&self,
encoder: &mut CommandEncoder,
color_attachment: &TextureView,
paint_jobs: &[ClippedPrimitive],
screen_descriptor: &ScreenDescriptor,
clear_color: Option<Color>
)
Executes the egui render pass.
sourcepub fn execute_with_renderpass<'rpass>(
&'rpass self,
rpass: &mut RenderPass<'rpass>,
paint_jobs: &[ClippedPrimitive],
screen_descriptor: &ScreenDescriptor
)
pub fn execute_with_renderpass<'rpass>(
&'rpass self,
rpass: &mut RenderPass<'rpass>,
paint_jobs: &[ClippedPrimitive],
screen_descriptor: &ScreenDescriptor
)
Executes the egui render pass onto an existing wgpu renderpass.
sourcepub fn update_texture(
&mut self,
device: &Device,
queue: &Queue,
id: TextureId,
image_delta: &ImageDelta
)
pub fn update_texture(
&mut self,
device: &Device,
queue: &Queue,
id: TextureId,
image_delta: &ImageDelta
)
Should be called before execute().
sourcepub fn free_texture(&mut self, id: &TextureId)
pub fn free_texture(&mut self, id: &TextureId)
Should be called before execute().
sourcepub fn update_buffers(
&mut self,
device: &Device,
queue: &Queue,
paint_jobs: &[ClippedPrimitive],
screen_descriptor: &ScreenDescriptor
)
pub fn update_buffers(
&mut self,
device: &Device,
queue: &Queue,
paint_jobs: &[ClippedPrimitive],
screen_descriptor: &ScreenDescriptor
)
Uploads the uniform, vertex and index data used by the render pass.
Should be called before execute().
Auto Trait Implementations
impl !RefUnwindSafe for RenderPass
impl Send for RenderPass
impl Sync for RenderPass
impl Unpin for RenderPass
impl !UnwindSafe for RenderPass
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more