[][src]Struct vulkano::image::immutable::ImmutableImage

pub struct ImmutableImage<F, A = PotentialDedicatedAllocation<StdMemoryPoolAlloc>> { /* fields omitted */ }

Image whose purpose is to be used for read-only purposes. You can write to the image once, but then you must only ever read from it.

Methods

impl<F> ImmutableImage<F>[src]

pub fn new<'a, I>(
    device: Arc<Device>,
    dimensions: Dimensions,
    format: F,
    queue_families: I
) -> Result<Arc<ImmutableImage<F>>, ImageCreationError> where
    F: FormatDesc,
    I: IntoIterator<Item = QueueFamily<'a>>, 
[src]

Deprecated:

use ImmutableImage::uninitialized instead

pub fn with_mipmaps<'a, I, M>(
    device: Arc<Device>,
    dimensions: Dimensions,
    format: F,
    mipmaps: M,
    queue_families: I
) -> Result<Arc<ImmutableImage<F>>, ImageCreationError> where
    F: FormatDesc,
    I: IntoIterator<Item = QueueFamily<'a>>,
    M: Into<MipmapsCount>, 
[src]

Deprecated:

use ImmutableImage::uninitialized instead

pub fn uninitialized<'a, I, M>(
    device: Arc<Device>,
    dimensions: Dimensions,
    format: F,
    mipmaps: M,
    usage: ImageUsage,
    layout: ImageLayout,
    queue_families: I
) -> Result<(Arc<ImmutableImage<F>>, ImmutableImageInitialization<F>), ImageCreationError> where
    F: FormatDesc,
    I: IntoIterator<Item = QueueFamily<'a>>,
    M: Into<MipmapsCount>, 
[src]

Builds an uninitialized immutable image.

Returns two things: the image, and a special access that should be used for the initial upload to the image.

pub fn from_iter<P, I>(
    iter: I,
    dimensions: Dimensions,
    format: F,
    queue: Arc<Queue>
) -> Result<(Arc<Self>, CommandBufferExecFuture<NowFuture, AutoCommandBuffer>), ImageCreationError> where
    P: Send + Sync + Clone + 'static,
    F: FormatDesc + AcceptsPixels<P> + 'static + Send + Sync,
    I: ExactSizeIterator<Item = P>,
    Format: AcceptsPixels<P>, 
[src]

Construct an ImmutableImage from the contents of iter.

TODO: Support mipmaps

pub fn from_buffer<B, P>(
    source: B,
    dimensions: Dimensions,
    format: F,
    queue: Arc<Queue>
) -> Result<(Arc<Self>, CommandBufferExecFuture<NowFuture, AutoCommandBuffer>), ImageCreationError> where
    B: BufferAccess + TypedBufferAccess<Content = [P]> + 'static + Clone + Send + Sync,
    P: Send + Sync + Clone + 'static,
    F: FormatDesc + AcceptsPixels<P> + 'static + Send + Sync,
    Format: AcceptsPixels<P>, 
[src]

Construct an ImmutableImage containing a copy of the data in source.

TODO: Support mipmaps

impl<F, A> ImmutableImage<F, A>[src]

pub fn dimensions(&self) -> Dimensions[src]

Returns the dimensions of the image.

pub fn mipmap_levels(&self) -> u32[src]

Returns the number of mipmap levels of the image.

Trait Implementations

impl<F, A> ImageAccess for ImmutableImage<F, A> where
    F: 'static + Send + Sync
[src]

fn format(&self) -> Format[src]

Returns the format of this image.

fn has_color(&self) -> bool[src]

Returns true if the image is a color image.

fn has_depth(&self) -> bool[src]

Returns true if the image has a depth component. In other words, if it is a depth or a depth-stencil format. Read more

fn has_stencil(&self) -> bool[src]

Returns true if the image has a stencil component. In other words, if it is a stencil or a depth-stencil format. Read more

fn mipmap_levels(&self) -> u32[src]

Returns the number of mipmap levels of this image.

fn samples(&self) -> u32[src]

Returns the number of samples of this image.

fn dimensions(&self) -> ImageDimensions[src]

Returns the dimensions of the image.

fn supports_blit_source(&self) -> bool[src]

Returns true if the image can be used as a source for blits.

fn supports_blit_destination(&self) -> bool[src]

Returns true if the image can be used as a destination for blits.

unsafe fn layout_initialized(&self)[src]

When images are created their memory layout is initially Undefined or Preinitialized. This method allows the image memory barrier creation process to signal when an image has been transitioned out of its initial Undefined or Preinitialized state. This allows vulkano to avoid creating unnecessary image memory barriers between future uses of the image. Read more

fn is_layout_initialized(&self) -> bool[src]

unsafe fn preinitialized_layout(&self) -> bool[src]

unsafe fn forced_undefined_initial_layout(
    self,
    preinitialized: bool
) -> ImageAccessFromUndefinedLayout<Self> where
    Self: Sized
[src]

Wraps around this ImageAccess and returns an identical ImageAccess but whose initial layout requirement is either Undefined or Preinitialized. Read more

impl<P, F, A> ImageContent<P> for ImmutableImage<F, A> where
    F: 'static + Send + Sync
[src]

impl<F: 'static, A> ImageViewAccess for ImmutableImage<F, A> where
    F: 'static + Send + Sync
[src]

fn format(&self) -> Format[src]

Returns the format of this view. This can be different from the parent's format.

fn samples(&self) -> u32[src]

fn can_be_sampled(&self, _sampler: &Sampler) -> bool[src]

Returns true if the given sampler can be used with this image view. Read more

impl<F: Debug, A: Debug> Debug for ImmutableImage<F, A>[src]

Auto Trait Implementations

impl<F, A> Send for ImmutableImage<F, A> where
    A: Send,
    F: Send

impl<F, A> Sync for ImmutableImage<F, A> where
    A: Sync,
    F: Sync

Blanket Implementations

impl<T> ImageAccess for T where
    T: SafeDeref,
    <T as Deref>::Target: ImageAccess
[src]

fn format(&self) -> Format[src]

Returns the format of this image.

fn has_color(&self) -> bool[src]

Returns true if the image is a color image.

fn has_depth(&self) -> bool[src]

Returns true if the image has a depth component. In other words, if it is a depth or a depth-stencil format. Read more

fn has_stencil(&self) -> bool[src]

Returns true if the image has a stencil component. In other words, if it is a stencil or a depth-stencil format. Read more

fn mipmap_levels(&self) -> u32[src]

Returns the number of mipmap levels of this image.

fn samples(&self) -> u32[src]

Returns the number of samples of this image.

fn dimensions(&self) -> ImageDimensions[src]

Returns the dimensions of the image.

fn supports_blit_source(&self) -> bool[src]

Returns true if the image can be used as a source for blits.

fn supports_blit_destination(&self) -> bool[src]

Returns true if the image can be used as a destination for blits.

unsafe fn preinitialized_layout(&self) -> bool[src]

unsafe fn forced_undefined_initial_layout(
    self,
    preinitialized: bool
) -> ImageAccessFromUndefinedLayout<Self> where
    Self: Sized
[src]

Wraps around this ImageAccess and returns an identical ImageAccess but whose initial layout requirement is either Undefined or Preinitialized. Read more

impl<T> ImageViewAccess for T where
    T: SafeDeref,
    <T as Deref>::Target: ImageViewAccess
[src]

fn format(&self) -> Format[src]

Returns the format of this view. This can be different from the parent's format.

fn samples(&self) -> u32[src]

impl<T> Content for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]