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: UVec2, virtual_surface_size: UVec2, ) -> Self
pub fn viewport_from_integer_scale( physical_size: UVec2, virtual_size: UVec2, ) -> URect
pub fn resize(&mut self, physical_size: UVec2)
pub fn render_sprite( &mut self, position: Vec3, material: &MaterialRef, params: SpriteParams, )
pub fn sprite_atlas( &mut self, position: Vec3, atlas_rect: URect, material: &MaterialRef, )
pub fn sprite_2d( &mut self, position: Vec2, atlas_rect: URect, material: &MaterialRef, params: SpriteParams, )
pub fn set_clear_color(&mut self, color: Color)
pub const fn clear_color(&self) -> Color
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<'_>)
Trait Implementations§
Source§impl Assets for Render
impl Assets for Render
fn material_png_raw(&mut self, png: &[u8], label: &str) -> MaterialRef
fn material_png(&mut self, name: &str) -> MaterialRef
fn set_prefix(&mut self, prefix: &str)
fn frame_fixed_grid_material_png( &mut self, name: &str, grid_size: UVec2, ) -> FixedAtlas
fn now(&self) -> Millis
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