Class VkImageCopy
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkImageCopy
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkImageCopy extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying an image copy operation.Description
For
IMAGE_TYPE_3Dimages, copies are performed slice by slice starting with thezmember of thesrcOffsetordstOffset, and copyingdepthslices. For images with multiple layers, copies are performed layer by layer starting with thebaseArrayLayermember of thesrcSubresourceordstSubresourceand copyinglayerCountlayers. Image data can be copied between images with different image types. If one image isIMAGE_TYPE_3Dand the other image isIMAGE_TYPE_2Dwith multiple layers, then each slice is copied to or from a different layer.Copies involving a multi-planar image format specify the region to be copied in terms of the plane to be copied, not the coordinates of the multi-planar image. This means that copies accessing the R/B planes of “
_422” format images must fit the copied region within half thewidthof the parent image, and that copies accessing the R/B planes of “_420” format images must fit the copied region within half thewidthandheightof the parent image.Valid Usage
- The number of slices of the
extent(for 3D) or layers of thesrcSubresource(for non-3D) must match the number of slices of theextent(for 3D) or layers of thedstSubresource(for non-3D)
Valid Usage (Implicit)
srcSubresourcemust be a validVkImageSubresourceLayersstructuredstSubresourcemust be a validVkImageSubresourceLayersstructure
See Also
VkExtent3D,VkImageSubresourceLayers,VkOffset3D,CmdCopyImageLayout
struct VkImageCopy {VkImageSubresourceLayerssrcSubresource();VkOffset3DsrcOffset();VkImageSubresourceLayersdstSubresource();VkOffset3DdstOffset();VkExtent3Dextent(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkImageCopy.BufferAn array ofVkImageCopystructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intDSTOFFSET
DSTSUBRESOURCE
EXTENTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSRCOFFSET
SRCSUBRESOURCEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkImageCopy(java.nio.ByteBuffer container)Creates aVkImageCopyinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static VkImageCopycalloc()Returns a newVkImageCopyinstance allocated withmemCalloc.static VkImageCopy.Buffercalloc(int capacity)Returns a newVkImageCopy.Bufferinstance allocated withmemCalloc.static VkImageCopy.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkImageCopy.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImageCopycalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkImageCopyinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImageCopycallocStack()Deprecated.static VkImageCopy.BuffercallocStack(int capacity)Deprecated.static VkImageCopy.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkImageCopycallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VkImageCopycreate()Returns a newVkImageCopyinstance allocated withBufferUtils.static VkImageCopy.Buffercreate(int capacity)Returns a newVkImageCopy.Bufferinstance allocated withBufferUtils.static VkImageCopycreate(long address)Returns a newVkImageCopyinstance for the specified memory address.static VkImageCopy.Buffercreate(long address, int capacity)Create aVkImageCopy.Bufferinstance at the specified memory.static VkImageCopycreateSafe(long address)static VkImageCopy.BuffercreateSafe(long address, int capacity)VkOffset3DdstOffset()seesrcOffsetVkImageCopydstOffset(java.util.function.Consumer<VkOffset3D> consumer)Passes thedstOffset()field to the specifiedConsumer.VkImageCopydstOffset(VkOffset3D value)Copies the specifiedVkOffset3Dto thedstOffset()field.VkImageSubresourceLayersdstSubresource()seesrcSubresourceVkImageCopydstSubresource(java.util.function.Consumer<VkImageSubresourceLayers> consumer)Passes thedstSubresource()field to the specifiedConsumer.VkImageCopydstSubresource(VkImageSubresourceLayers value)Copies the specifiedVkImageSubresourceLayersto thedstSubresource()field.VkExtent3Dextent()the size in texels of the image to copy inwidth,heightanddepth.VkImageCopyextent(java.util.function.Consumer<VkExtent3D> consumer)Passes theextent()field to the specifiedConsumer.VkImageCopyextent(VkExtent3D value)Copies the specifiedVkExtent3Dto theextent()field.static VkImageCopymalloc()Returns a newVkImageCopyinstance allocated withmemAlloc.static VkImageCopy.Buffermalloc(int capacity)Returns a newVkImageCopy.Bufferinstance allocated withmemAlloc.static VkImageCopy.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkImageCopy.Bufferinstance allocated on the specifiedMemoryStack.static VkImageCopymalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkImageCopyinstance allocated on the specifiedMemoryStack.static VkImageCopymallocStack()Deprecated.static VkImageCopy.BuffermallocStack(int capacity)Deprecated.static VkImageCopy.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkImageCopymallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VkOffset3DndstOffset(long struct)Unsafe version ofdstOffset().static voidndstOffset(long struct, VkOffset3D value)Unsafe version ofdstOffset.static VkImageSubresourceLayersndstSubresource(long struct)Unsafe version ofdstSubresource().static voidndstSubresource(long struct, VkImageSubresourceLayers value)Unsafe version ofdstSubresource.static VkExtent3Dnextent(long struct)Unsafe version ofextent().static voidnextent(long struct, VkExtent3D value)Unsafe version ofextent.static VkOffset3DnsrcOffset(long struct)Unsafe version ofsrcOffset().static voidnsrcOffset(long struct, VkOffset3D value)Unsafe version ofsrcOffset.static VkImageSubresourceLayersnsrcSubresource(long struct)Unsafe version ofsrcSubresource().static voidnsrcSubresource(long struct, VkImageSubresourceLayers value)Unsafe version ofsrcSubresource.VkImageCopyset(VkImageCopy src)Copies the specified struct data to this struct.VkImageCopyset(VkImageSubresourceLayers srcSubresource, VkOffset3D srcOffset, VkImageSubresourceLayers dstSubresource, VkOffset3D dstOffset, VkExtent3D extent)Initializes this struct with the specified values.intsizeof()VkOffset3DsrcOffset()srcOffsetanddstOffsetselect the initialx,y, andzoffsets in texels of the sub-regions of the source and destination image data.VkImageCopysrcOffset(java.util.function.Consumer<VkOffset3D> consumer)Passes thesrcOffset()field to the specifiedConsumer.VkImageCopysrcOffset(VkOffset3D value)Copies the specifiedVkOffset3Dto thesrcOffset()field.VkImageSubresourceLayerssrcSubresource()srcSubresourceanddstSubresourceareVkImageSubresourceLayersstructures specifying the image subresources of the images used for the source and destination image data, respectively.VkImageCopysrcSubresource(java.util.function.Consumer<VkImageSubresourceLayers> consumer)Passes thesrcSubresource()field to the specifiedConsumer.VkImageCopysrcSubresource(VkImageSubresourceLayers value)Copies the specifiedVkImageSubresourceLayersto thesrcSubresource()field.
-
-
-
Constructor Detail
-
VkImageCopy
public VkImageCopy(java.nio.ByteBuffer container)
Creates aVkImageCopyinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
srcSubresource
public VkImageSubresourceLayers srcSubresource()
srcSubresourceanddstSubresourceareVkImageSubresourceLayersstructures specifying the image subresources of the images used for the source and destination image data, respectively.
-
srcOffset
public VkOffset3D srcOffset()
srcOffsetanddstOffsetselect the initialx,y, andzoffsets in texels of the sub-regions of the source and destination image data.
-
dstSubresource
public VkImageSubresourceLayers dstSubresource()
seesrcSubresource
-
dstOffset
public VkOffset3D dstOffset()
seesrcOffset
-
extent
public VkExtent3D extent()
the size in texels of the image to copy inwidth,heightanddepth.
-
srcSubresource
public VkImageCopy srcSubresource(VkImageSubresourceLayers value)
Copies the specifiedVkImageSubresourceLayersto thesrcSubresource()field.
-
srcSubresource
public VkImageCopy srcSubresource(java.util.function.Consumer<VkImageSubresourceLayers> consumer)
Passes thesrcSubresource()field to the specifiedConsumer.
-
srcOffset
public VkImageCopy srcOffset(VkOffset3D value)
Copies the specifiedVkOffset3Dto thesrcOffset()field.
-
srcOffset
public VkImageCopy srcOffset(java.util.function.Consumer<VkOffset3D> consumer)
Passes thesrcOffset()field to the specifiedConsumer.
-
dstSubresource
public VkImageCopy dstSubresource(VkImageSubresourceLayers value)
Copies the specifiedVkImageSubresourceLayersto thedstSubresource()field.
-
dstSubresource
public VkImageCopy dstSubresource(java.util.function.Consumer<VkImageSubresourceLayers> consumer)
Passes thedstSubresource()field to the specifiedConsumer.
-
dstOffset
public VkImageCopy dstOffset(VkOffset3D value)
Copies the specifiedVkOffset3Dto thedstOffset()field.
-
dstOffset
public VkImageCopy dstOffset(java.util.function.Consumer<VkOffset3D> consumer)
Passes thedstOffset()field to the specifiedConsumer.
-
extent
public VkImageCopy extent(VkExtent3D value)
Copies the specifiedVkExtent3Dto theextent()field.
-
extent
public VkImageCopy extent(java.util.function.Consumer<VkExtent3D> consumer)
Passes theextent()field to the specifiedConsumer.
-
set
public VkImageCopy set(VkImageSubresourceLayers srcSubresource, VkOffset3D srcOffset, VkImageSubresourceLayers dstSubresource, VkOffset3D dstOffset, VkExtent3D extent)
Initializes this struct with the specified values.
-
set
public VkImageCopy set(VkImageCopy src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkImageCopy malloc()
Returns a newVkImageCopyinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkImageCopy calloc()
Returns a newVkImageCopyinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkImageCopy create()
Returns a newVkImageCopyinstance allocated withBufferUtils.
-
create
public static VkImageCopy create(long address)
Returns a newVkImageCopyinstance for the specified memory address.
-
createSafe
@Nullable public static VkImageCopy createSafe(long address)
-
malloc
public static VkImageCopy.Buffer malloc(int capacity)
Returns a newVkImageCopy.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkImageCopy.Buffer calloc(int capacity)
Returns a newVkImageCopy.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkImageCopy.Buffer create(int capacity)
Returns a newVkImageCopy.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkImageCopy.Buffer create(long address, int capacity)
Create aVkImageCopy.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkImageCopy.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkImageCopy mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkImageCopy callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkImageCopy mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkImageCopy callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkImageCopy.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkImageCopy.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkImageCopy.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkImageCopy.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkImageCopy malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageCopyinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkImageCopy calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageCopyinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkImageCopy.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageCopy.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkImageCopy.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageCopy.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsrcSubresource
public static VkImageSubresourceLayers nsrcSubresource(long struct)
Unsafe version ofsrcSubresource().
-
nsrcOffset
public static VkOffset3D nsrcOffset(long struct)
Unsafe version ofsrcOffset().
-
ndstSubresource
public static VkImageSubresourceLayers ndstSubresource(long struct)
Unsafe version ofdstSubresource().
-
ndstOffset
public static VkOffset3D ndstOffset(long struct)
Unsafe version ofdstOffset().
-
nextent
public static VkExtent3D nextent(long struct)
Unsafe version ofextent().
-
nsrcSubresource
public static void nsrcSubresource(long struct, VkImageSubresourceLayers value)Unsafe version ofsrcSubresource.
-
nsrcOffset
public static void nsrcOffset(long struct, VkOffset3D value)Unsafe version ofsrcOffset.
-
ndstSubresource
public static void ndstSubresource(long struct, VkImageSubresourceLayers value)Unsafe version ofdstSubresource.
-
ndstOffset
public static void ndstOffset(long struct, VkOffset3D value)Unsafe version ofdstOffset.
-
nextent
public static void nextent(long struct, VkExtent3D value)Unsafe version ofextent.
-
-