Struct egui_vulkano::Painter
source · [−]pub struct Painter {
pub pipeline: Arc<GraphicsPipeline>,
pub sampler: Arc<Sampler>,
/* private fields */
}
Expand description
Contains everything needed to render the gui.
Fields
pipeline: Arc<GraphicsPipeline>
Graphics pipeline used to render the gui.
sampler: Arc<Sampler>
Texture sampler used to render the gui.
Implementations
sourceimpl Painter
impl Painter
sourcepub fn new(
device: Arc<Device>,
queue: Arc<Queue>,
subpass: Subpass
) -> Result<Self, PainterCreationError>
pub fn new(
device: Arc<Device>,
queue: Arc<Queue>,
subpass: Subpass
) -> Result<Self, PainterCreationError>
sourcepub fn update_textures<P>(
&mut self,
textures_delta: TexturesDelta,
builder: &mut AutoCommandBufferBuilder<PrimaryAutoCommandBuffer<P::Alloc>, P>
) -> Result<UpdateTexturesResult, UpdateTexturesError> where
P: CommandPoolBuilderAlloc,
pub fn update_textures<P>(
&mut self,
textures_delta: TexturesDelta,
builder: &mut AutoCommandBufferBuilder<PrimaryAutoCommandBuffer<P::Alloc>, P>
) -> Result<UpdateTexturesResult, UpdateTexturesError> where
P: CommandPoolBuilderAlloc,
Uploads all newly created and modified textures to the GPU.
Has to be called before entering the first render pass.
If the return value is UpdateTexturesResult::Changed
,
a texture will be changed in this frame and you need to wait for the last frame to finish
before submitting the command buffer for this frame.
sourcepub fn draw<P>(
&mut self,
builder: &mut AutoCommandBufferBuilder<PrimaryAutoCommandBuffer<P::Alloc>, P>,
window_size_points: [f32; 2],
egui_ctx: &Context,
clipped_shapes: Vec<ClippedShape>
) -> Result<(), DrawError> where
P: CommandPoolBuilderAlloc,
pub fn draw<P>(
&mut self,
builder: &mut AutoCommandBufferBuilder<PrimaryAutoCommandBuffer<P::Alloc>, P>,
window_size_points: [f32; 2],
egui_ctx: &Context,
clipped_shapes: Vec<ClippedShape>
) -> Result<(), DrawError> where
P: CommandPoolBuilderAlloc,
Advances to the next rendering subpass and uses the [ClippedShape
]s from egui::FullOutput
to draw the gui.
Auto Trait Implementations
impl !RefUnwindSafe for Painter
impl Send for Painter
impl Sync for Painter
impl Unpin for Painter
impl !UnwindSafe for Painter
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