pub struct Image<B: Backend> { /* private fields */ }Expand description
Implementations§
Source§impl<B> Image<B>where
B: Backend,
impl<B> Image<B>where
B: Backend,
Sourcepub fn assert_device_owner(&self, device: &Device<B>)
pub fn assert_device_owner(&self, device: &Device<B>)
Assert specified device is owner.
Sourcepub fn instance_id(&self) -> InstanceId
pub fn instance_id(&self) -> InstanceId
Get owned id.
Sourcepub fn assert_instance_owner(&self, instance: &Instance<B>)
pub fn assert_instance_owner(&self, instance: &Instance<B>)
Assert specified instance is owner.
Source§impl<B> Image<B>where
B: Backend,
impl<B> Image<B>where
B: Backend,
Sourcepub unsafe fn create(
device: &Device<B>,
heaps: &mut Heaps<B>,
info: ImageInfo,
memory_usage: impl MemoryUsage,
) -> Result<Self, ImageCreationError>
pub unsafe fn create( device: &Device<B>, heaps: &mut Heaps<B>, info: ImageInfo, memory_usage: impl MemoryUsage, ) -> Result<Self, ImageCreationError>
Create image.
§Safety
In order to guarantee that Heap::allocate will return
memory range owned by this Device,
this Heaps instance must always be used with this Device instance.
Otherwise usage of hal methods must be always valid.
Sourcepub unsafe fn create_from_swapchain(
device: DeviceId,
info: ImageInfo,
raw: B::Image,
) -> Self
pub unsafe fn create_from_swapchain( device: DeviceId, info: ImageInfo, raw: B::Image, ) -> Self
Create image handler for swapchain image.
Sourcepub unsafe fn dispose_swapchain_image(self, device: DeviceId)
pub unsafe fn dispose_swapchain_image(self, device: DeviceId)
Drop image wrapper for swapchain image.
Sourcepub unsafe fn raw_mut(&mut self) -> &mut B::Image
pub unsafe fn raw_mut(&mut self) -> &mut B::Image
Get mutable reference for raw image resource.
Sourcepub fn block(&self) -> Option<&MemoryBlock<B>>
pub fn block(&self) -> Option<&MemoryBlock<B>>
Get reference to memory block occupied by image.
Sourcepub unsafe fn block_mut(&mut self) -> Option<&mut MemoryBlock<B>>
pub unsafe fn block_mut(&mut self) -> Option<&mut MemoryBlock<B>>
Get mutable reference to memory block occupied by image.
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for Image<B>
impl<B> RefUnwindSafe for Image<B>
impl<B> Send for Image<B>
impl<B> Sync for Image<B>
impl<B> Unpin for Image<B>
impl<B> UnwindSafe for Image<B>
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