pub struct Render { /* private fields */ }Implementations§
Source§impl Render
impl Render
pub fn new( device: Arc<Device>, queue: Arc<Queue>, surface_texture_format: TextureFormat, physical_size: (u16, u16), virtual_size: (u16, u16), ) -> Self
pub fn viewport_from_integer_scale( physical_size: UVec2, virtual_size: UVec2, ) -> URect
pub fn resize(&mut self, physical_size: (u16, u16))
pub fn render_sprite( &mut self, position: Vec3, material: &SpriteMaterialRef, params: SpriteParams, )
pub fn sprite_atlas( &mut self, position: Vec3, atlas_rect: URect, material: &SpriteMaterialRef, )
pub fn sprite_atlas_frame( &mut self, position: Vec3, frame: u16, atlas: &impl AtlasLookup, )
pub fn render_sprite_2d( &mut self, position: Vec2, atlas_rect: URect, material: &SpriteMaterialRef, params: SpriteParams, )
pub fn order_sprites_in_batches(&self) -> Vec<Vec<&Sprite>>
pub fn prepare_render(&mut self)
pub fn render(&mut self, render_pass: &mut RenderPass<'_>)
pub fn create_material_png( &mut self, png: &[u8], label: &str, ) -> SpriteMaterialRef
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Render
impl !RefUnwindSafe for Render
impl !Send for Render
impl !Sync for Render
impl Unpin for Render
impl !UnwindSafe for Render
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<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>
Converts
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>
Converts
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