Struct vulkano::image::sys::UnsafeImageView
source · pub struct UnsafeImageView { /* private fields */ }
Implementations
sourceimpl UnsafeImageView
impl UnsafeImageView
sourcepub unsafe fn raw(
image: &UnsafeImage,
ty: ViewType,
mipmap_levels: Range<u32>,
array_layers: Range<u32>
) -> Result<UnsafeImageView, OomError>
pub unsafe fn raw(
image: &UnsafeImage,
ty: ViewType,
mipmap_levels: Range<u32>,
array_layers: Range<u32>
) -> Result<UnsafeImageView, OomError>
See the docs of new().
sourcepub unsafe fn new(
image: &UnsafeImage,
ty: ViewType,
mipmap_levels: Range<u32>,
array_layers: Range<u32>
) -> UnsafeImageView
pub unsafe fn new(
image: &UnsafeImage,
ty: ViewType,
mipmap_levels: Range<u32>,
array_layers: Range<u32>
) -> UnsafeImageView
Creates a new view from an image.
Note that you must create the view with identity swizzling if you want to use this view as a framebuffer attachment.
Panic
- Panics if
mipmap_levels
orarray_layers
is out of range of the image. - Panics if the view types doesn’t match the dimensions of the image (for example a 2D view from a 3D image).
- Panics if trying to create a cubemap with a number of array layers different from 6.
- Panics if trying to create a cubemap array with a number of array layers not a multiple of 6.
- Panics if the device or host ran out of memory.
pub fn format(&self) -> Format
pub fn usage_transfer_source(&self) -> bool
pub fn usage_transfer_destination(&self) -> bool
pub fn usage_sampled(&self) -> bool
pub fn usage_storage(&self) -> bool
pub fn usage_color_attachment(&self) -> bool
pub fn usage_depth_stencil_attachment(&self) -> bool
pub fn usage_transient_attachment(&self) -> bool
pub fn usage_input_attachment(&self) -> bool
Trait Implementations
sourceimpl Debug for UnsafeImageView
impl Debug for UnsafeImageView
sourceimpl Drop for UnsafeImageView
impl Drop for UnsafeImageView
sourceimpl VulkanObject for UnsafeImageView
impl VulkanObject for UnsafeImageView
sourceconst TYPE: DebugReportObjectTypeEXT = 14u32
const TYPE: DebugReportObjectTypeEXT = 14u32
The
DebugReportObjectTypeEXT
of the internal Vulkan handle.sourcefn internal_object(&self) -> ImageView
fn internal_object(&self) -> ImageView
Returns a reference to the object.
Auto Trait Implementations
impl RefUnwindSafe for UnsafeImageView
impl Send for UnsafeImageView
impl Sync for UnsafeImageView
impl Unpin for UnsafeImageView
impl UnwindSafe for UnsafeImageView
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Content for T
impl<T> Content for T
sourcefn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
sourcefn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
sourcefn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.