pub struct Texture {
raw: Image,
memory: TextureMemory,
format: TextureFormat,
copy_size: CopyExtent,
identity: ResourceIdentity<Image>,
drop_guard: Option<DropGuard>,
}Available on
vulkan only.Fields§
§raw: Image§memory: TextureMemory§format: TextureFormat§copy_size: CopyExtent§identity: ResourceIdentity<Image>§drop_guard: Option<DropGuard>Implementations§
Source§impl Texture
impl Texture
fn map_buffer_copies<T>(
&self,
regions: T,
) -> impl Iterator<Item = BufferImageCopy>where
T: Iterator<Item = BufferTextureCopy>,
Source§impl Texture
impl Texture
Sourcepub unsafe fn raw_handle(&self) -> Image
pub unsafe fn raw_handle(&self) -> Image
§Safety
- The image handle must not be manually destroyed
Sourcepub unsafe fn memory(&self) -> &TextureMemory
pub unsafe fn memory(&self) -> &TextureMemory
§Safety
- The caller must not free the
vk::DeviceMemoryorgpu_alloc::MemoryBlockin the returnedTextureMemory.
Trait Implementations§
Source§impl Borrow<Texture> for SurfaceTexture
impl Borrow<Texture> for SurfaceTexture
Source§impl DynResource for Texture
impl DynResource for Texture
impl DynTexture for Texture
Auto Trait Implementations§
impl Freeze for Texture
impl !RefUnwindSafe for Texture
impl Send for Texture
impl Sync for Texture
impl Unpin for Texture
impl !UnwindSafe for Texture
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