Struct wgpu_tilemap::TilemapRef
source · pub struct TilemapRef<'a> {
pub tile_size: Vec2<u32>,
pub data: Cow<'a, [u8]>,
}
Expand description
A reference to tilemap data to be uploaded as a texture and used as indices into the tileset.
Fields§
§tile_size: Vec2<u32>
Size of this tilemap, in tiles.
data: Cow<'a, [u8]>
Assumes a maximum of 256 tiles per tileset, represented as wgpu::TextureFormat::R8Uint
.
Implementations§
source§impl TilemapRef<'static>
impl TilemapRef<'static>
pub fn new_zeroed(size: Vec2<u32>) -> Self
Trait Implementations§
source§impl<'a> Clone for TilemapRef<'a>
impl<'a> Clone for TilemapRef<'a>
source§fn clone(&self) -> TilemapRef<'a>
fn clone(&self) -> TilemapRef<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> RefUnwindSafe for TilemapRef<'a>
impl<'a> Send for TilemapRef<'a>
impl<'a> Sync for TilemapRef<'a>
impl<'a> Unpin for TilemapRef<'a>
impl<'a> UnwindSafe for TilemapRef<'a>
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