Struct vulkano::image::swapchain::SwapchainImage
[−]
[src]
pub struct SwapchainImage { /* fields omitted */ }
An image that is part of a swapchain.
Creating a SwapchainImage
is automatically done when creating a swapchain.
A swapchain image is special in the sense that it can only be used after being acquired by
calling the acquire
method on the swapchain. You have no way to know in advance which
swapchain image is going to be acquired, so you should keep all of them alive.
After a swapchain image has been acquired, you are free to perform all the usual operations on it. When you are done you can then present the image (by calling the corresponding method on the swapchain), which will have the effect of showing the content of the image to the screen. Once an image has been presented, it can no longer be used unless it is acquired again.
Methods
impl SwapchainImage
[src]
unsafe fn from_raw(
image: UnsafeImage,
format: Format,
swapchain: &Arc<Swapchain>,
id: u32
) -> Result<Arc<SwapchainImage>, OomError>
image: UnsafeImage,
format: Format,
swapchain: &Arc<Swapchain>,
id: u32
) -> Result<Arc<SwapchainImage>, OomError>
Builds a SwapchainImage
from raw components.
This is an internal method that you shouldn't call.
fn dimensions(&self) -> [u32; 2]
Returns the dimensions of the image.
A SwapchainImage
is always two-dimensional.
fn format(&self) -> Format
Returns the format of the image.
fn swapchain(&self) -> &Arc<Swapchain>
Returns the swapchain this image belongs to.
Trait Implementations
impl Image for SwapchainImage
[src]
fn inner(&self) -> &UnsafeImage
Returns the inner unsafe image object used by this image.
fn blocks(&self, _: Range<u32>, _: Range<u32>) -> Vec<(u32, u32)>
Given a range, returns the list of blocks which each range is contained in. Read more
fn block_mipmap_levels_range(&self, block: (u32, u32)) -> Range<u32>
fn block_array_layers_range(&self, block: (u32, u32)) -> Range<u32>
fn initial_layout(&self, _: (u32, u32), _: Layout) -> (Layout, bool, bool)
Called when a command buffer that uses this image is being built. Given a block, this function should return the layout that the block will have when the command buffer is submitted. Read more
fn final_layout(&self, _: (u32, u32), _: Layout) -> (Layout, bool, bool)
Called when a command buffer that uses this image is being built. Given a block, this function should return the layout that the block must have when the command buffer is end. Read more
fn needs_fence(&self, access: &mut Iterator<Item = AccessRange>) -> Option<bool>
Returns whether accessing a subresource of that image should signal a fence.
unsafe fn gpu_access(
&self,
access: &mut Iterator<Item = AccessRange>,
submission: &Arc<Submission>
) -> GpuAccessResult
&self,
access: &mut Iterator<Item = AccessRange>,
submission: &Arc<Submission>
) -> GpuAccessResult
fn format(&self) -> Format
Returns the format of this image.
fn samples(&self) -> u32
Returns the number of samples of this image.
fn dimensions(&self) -> ImageDimensions
Returns the dimensions of the image.
fn supports_blit_source(&self) -> bool
Returns true if the image can be used as a source for blits.
fn supports_blit_destination(&self) -> bool
Returns true if the image can be used as a destination for blits.
impl ImageClearValue<<Format as FormatDesc>::ClearValue> for SwapchainImage
[src]
fn decode(
&self,
value: <Format as FormatDesc>::ClearValue
) -> Option<ClearValue>
&self,
value: <Format as FormatDesc>::ClearValue
) -> Option<ClearValue>
impl<P> ImageContent<P> for SwapchainImage
[src]
fn matches_format(&self) -> bool
Checks whether pixels of type P
match the format of the image.
impl ImageView for SwapchainImage
[src]
fn parent(&self) -> &Image
fn parent_arc(me: &Arc<Self>) -> Arc<Image> where
Self: Sized,
Self: Sized,
fn dimensions(&self) -> Dimensions
Returns the dimensions of the image view.
fn blocks(&self) -> Vec<(u32, u32)>
Returns the blocks of the parent image this image view overlaps.
fn inner(&self) -> &UnsafeImageView
Returns the inner unsafe image view object used by this image view.
fn descriptor_set_storage_image_layout(&self) -> Layout
Returns the image layout to use in a descriptor with the given subresource.
fn descriptor_set_combined_image_sampler_layout(&self) -> Layout
Returns the image layout to use in a descriptor with the given subresource.
fn descriptor_set_sampled_image_layout(&self) -> Layout
Returns the image layout to use in a descriptor with the given subresource.
fn descriptor_set_input_attachment_layout(&self) -> Layout
Returns the image layout to use in a descriptor with the given subresource.
fn identity_swizzle(&self) -> bool
Returns true if the view doesn't use components swizzling. Read more
fn format(&self) -> Format
Returns the format of this view. This can be different from the parent's format.
fn samples(&self) -> u32
fn can_be_sampled(&self, sampler: &Sampler) -> bool
Returns true if the given sampler can be used with this image view. Read more
impl TrackedImage for SwapchainImage
[src]
type CommandListState = SwapchainImageCbState
State of the image in a list of commands. Read more
type FinishedState = SwapchainImageFinishedState
State of the buffer in a finished list of commands.
fn initial_state(&self) -> SwapchainImageCbState
Returns the state of the image when it has not yet been used.
fn is_same_buffer<B>(&self, other: &B) -> bool where
B: Buffer,
B: Buffer,
Returns true if TODO. Read more
fn is_same_image<I>(&self, other: &I) -> bool where
I: Image,
I: Image,
Returns true if TODO. Read more