pub struct DrawPipe<C> { /* private fields */ }
Expand description
Shared pipeline data
Implementations§
Source§impl<C: CustomPipe> DrawPipe<C>
impl<C: CustomPipe> DrawPipe<C>
Sourcepub fn new<CB: CustomPipeBuilder<Pipe = C>>(
instance: &Instance,
custom: &mut CB,
options: &Options,
surface: Option<&Surface<'_>>,
) -> Result<Self, Error>
pub fn new<CB: CustomPipeBuilder<Pipe = C>>( instance: &Instance, custom: &mut CB, options: &Options, surface: Option<&Surface<'_>>, ) -> Result<Self, Error>
Construct
Sourcepub fn resize(&self, window: &mut DrawWindow<C::Window>, size: Size)
pub fn resize(&self, window: &mut DrawWindow<C::Window>, size: Size)
Process window resize
Sourcepub fn render(
&mut self,
window: &mut DrawWindow<C::Window>,
frame_view: &TextureView,
clear_color: Color,
)
pub fn render( &mut self, window: &mut DrawWindow<C::Window>, frame_view: &TextureView, clear_color: Color, )
Render batched draw instructions via rpass
Trait Implementations§
type Draw = DrawWindow<<C as CustomPipe>::Window>
Source§fn max_texture_dimension_2d(&self) -> u32
fn max_texture_dimension_2d(&self) -> u32
Get the maximum 2D texture size
Source§fn set_raster_config(&mut self, config: &RasterConfig)
fn set_raster_config(&mut self, config: &RasterConfig)
Set font raster config
Source§fn image_alloc(&mut self, size: (u32, u32)) -> Result<ImageId, AllocError>
fn image_alloc(&mut self, size: (u32, u32)) -> Result<ImageId, AllocError>
Allocate an image Read more
Source§fn image_upload(&mut self, id: ImageId, data: &[u8], format: ImageFormat)
fn image_upload(&mut self, id: ImageId, data: &[u8], format: ImageFormat)
Upload an image to the GPU Read more
Source§fn image_free(&mut self, id: ImageId)
fn image_free(&mut self, id: ImageId)
Free an image allocation
Source§fn draw_image(
&self,
draw: &mut Self::Draw,
pass: PassId,
id: ImageId,
rect: Quad,
)
fn draw_image( &self, draw: &mut Self::Draw, pass: PassId, id: ImageId, rect: Quad, )
Draw the image in the given
rect
Auto Trait Implementations§
impl<C> Freeze for DrawPipe<C>where
C: Freeze,
impl<C> !RefUnwindSafe for DrawPipe<C>
impl<C> Send for DrawPipe<C>where
C: Send,
impl<C> Sync for DrawPipe<C>where
C: Sync,
impl<C> Unpin for DrawPipe<C>where
C: Unpin,
impl<C> !UnwindSafe for DrawPipe<C>
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
Source§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
Source§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
Source§fn cast_approx(self) -> T
fn cast_approx(self) -> T
Source§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
Source§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
Source§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
Source§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.