Package org.lwjgl.vulkan
Class VkImageCopy
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkImageCopy
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkImageCopy extends Struct
Khronos Reference Page
Vulkan SpecificationSpecifies the image regions to copy.
Valid Usage
srcSubresource
must be a validVkImageSubresourceLayers
structuredstSubresource
must be a validVkImageSubresourceLayers
structure- The
aspectMask
member ofsrcSubresource
anddstSubresource
must match - The
layerCount
member ofsrcSubresource
anddstSubresource
must match - If either of the calling command's
srcImage
ordstImage
parameters are ofVkImageType
IMAGE_TYPE_3D
, thebaseArrayLayer
andlayerCount
members of bothsrcSubresource
anddstSubresource
must be 0 and 1, respectively - The
aspectMask
member ofsrcSubresource
must specify aspects present in the calling command'ssrcImage
- The
aspectMask
member ofdstSubresource
must specify aspects present in the calling command'sdstImage
srcOffset.x
and (extent.width
+srcOffset.x
) must both be greater than or equal to 0 and less than or equal to the source image subresource widthsrcOffset.y
and (extent.height
+srcOffset.y
) must both be greater than or equal to 0 and less than or equal to the source image subresource heightsrcOffset.z
and (extent.depth
+srcOffset.z
) must both be greater than or equal to 0 and less than or equal to the source image subresource depthdstOffset.x
and (extent.width
+dstOffset.x
) must both be greater than or equal to 0 and less than or equal to the destination image subresource widthdstOffset.y
and (extent.height
+dstOffset.y
) must both be greater than or equal to 0 and less than or equal to the destination image subresource heightdstOffset.z
and (extent.depth
+dstOffset.z
) must both be greater than or equal to 0 and less than or equal to the destination image subresource depth- If the calling command's
srcImage
is a compressed format image: - If the calling command's
dstImage
is a compressed format image: srcOffset
,dstOffset
, andextent
must respect the image transfer granularity requirements of the queue family that it will be submitted against, as described in Physical Device Enumeration
Member documentation
srcSubresource
– aVkImageSubresourceLayers
structure specifying the image subresource of the image used for the source image datasrcOffset
– selects the initial x, y, and z offsets in texels of the sub-regions of the source image datadstSubresource
– anVkImageSubresourceLayers
structure specifying the image subresource of the image used for the destination image datadstOffset
– selects the initial x, y, and z offsets in texels of the sub-regions of the destination image dataextent
– the size in texels of the source image to copy in width, height and depth
Layout
struct VkImageCopy {
VkImageSubresourceLayers
srcSubresource;VkOffset3D
srcOffset;VkImageSubresourceLayers
dstSubresource;VkOffset3D
dstOffset;VkExtent3D
extent; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkImageCopy.Buffer
An array ofVkImageCopy
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description VkImageCopy(java.nio.ByteBuffer container)
Creates aVkImageCopy
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkImageCopy
calloc()
Returns a newVkImageCopy
instance allocated withmemCalloc
.static VkImageCopy.Buffer
calloc(int capacity)
Returns a newVkImageCopy.Buffer
instance allocated withmemCalloc
.static VkImageCopy
callocStack()
Returns a newVkImageCopy
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageCopy.Buffer
callocStack(int capacity)
Returns a newVkImageCopy.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageCopy.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkImageCopy.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageCopy
callocStack(MemoryStack stack)
Returns a newVkImageCopy
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageCopy
create()
Returns a newVkImageCopy
instance allocated withBufferUtils
.static VkImageCopy.Buffer
create(int capacity)
Returns a newVkImageCopy.Buffer
instance allocated withBufferUtils
.static VkImageCopy
create(long address)
static VkImageCopy.Buffer
create(long address, int capacity)
Create aVkImageCopy.Buffer
instance at the specified memory.VkOffset3D
dstOffset()
Returns aVkOffset3D
view of thedstOffset
field.VkImageCopy
dstOffset(VkOffset3D value)
Copies the specifiedVkOffset3D
to thedstOffset
field.VkImageSubresourceLayers
dstSubresource()
Returns aVkImageSubresourceLayers
view of thedstSubresource
field.VkImageCopy
dstSubresource(VkImageSubresourceLayers value)
Copies the specifiedVkImageSubresourceLayers
to thedstSubresource
field.VkExtent3D
extent()
Returns aVkExtent3D
view of theextent
field.VkImageCopy
extent(VkExtent3D value)
Copies the specifiedVkExtent3D
to theextent
field.static VkImageCopy
malloc()
Returns a newVkImageCopy
instance allocated withmemAlloc
.static VkImageCopy.Buffer
malloc(int capacity)
Returns a newVkImageCopy.Buffer
instance allocated withmemAlloc
.static VkImageCopy
mallocStack()
Returns a newVkImageCopy
instance allocated on the thread-localMemoryStack
.static VkImageCopy.Buffer
mallocStack(int capacity)
Returns a newVkImageCopy.Buffer
instance allocated on the thread-localMemoryStack
.static VkImageCopy.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkImageCopy.Buffer
instance allocated on the specifiedMemoryStack
.static VkImageCopy
mallocStack(MemoryStack stack)
Returns a newVkImageCopy
instance allocated on the specifiedMemoryStack
.VkImageCopy
nset(long struct)
Unsafe version ofset
.VkImageCopy
set(VkImageCopy src)
Copies the specified struct data to this struct.VkImageCopy
set(VkImageSubresourceLayers srcSubresource, VkOffset3D srcOffset, VkImageSubresourceLayers dstSubresource, VkOffset3D dstOffset, VkExtent3D extent)
Initializes this struct with the specified values.int
sizeof()
Returns thesizeof(struct)
.VkOffset3D
srcOffset()
Returns aVkOffset3D
view of thesrcOffset
field.VkImageCopy
srcOffset(VkOffset3D value)
Copies the specifiedVkOffset3D
to thesrcOffset
field.VkImageSubresourceLayers
srcSubresource()
Returns aVkImageSubresourceLayers
view of thesrcSubresource
field.VkImageCopy
srcSubresource(VkImageSubresourceLayers value)
Copies the specifiedVkImageSubresourceLayers
to thesrcSubresource
field.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkImageCopy
public VkImageCopy(java.nio.ByteBuffer container)
Creates aVkImageCopy
instance at the current position of the specifiedByteBuffer
container. 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()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
srcSubresource
public VkImageSubresourceLayers srcSubresource()
Returns aVkImageSubresourceLayers
view of thesrcSubresource
field.
-
srcOffset
public VkOffset3D srcOffset()
Returns aVkOffset3D
view of thesrcOffset
field.
-
dstSubresource
public VkImageSubresourceLayers dstSubresource()
Returns aVkImageSubresourceLayers
view of thedstSubresource
field.
-
dstOffset
public VkOffset3D dstOffset()
Returns aVkOffset3D
view of thedstOffset
field.
-
extent
public VkExtent3D extent()
Returns aVkExtent3D
view of theextent
field.
-
srcSubresource
public VkImageCopy srcSubresource(VkImageSubresourceLayers value)
Copies the specifiedVkImageSubresourceLayers
to thesrcSubresource
field.
-
srcOffset
public VkImageCopy srcOffset(VkOffset3D value)
Copies the specifiedVkOffset3D
to thesrcOffset
field.
-
dstSubresource
public VkImageCopy dstSubresource(VkImageSubresourceLayers value)
Copies the specifiedVkImageSubresourceLayers
to thedstSubresource
field.
-
dstOffset
public VkImageCopy dstOffset(VkOffset3D value)
Copies the specifiedVkOffset3D
to thedstOffset
field.
-
extent
public VkImageCopy extent(VkExtent3D value)
Copies the specifiedVkExtent3D
to theextent
field.
-
set
public VkImageCopy set(VkImageSubresourceLayers srcSubresource, VkOffset3D srcOffset, VkImageSubresourceLayers dstSubresource, VkOffset3D dstOffset, VkExtent3D extent)
Initializes this struct with the specified values.
-
nset
public VkImageCopy nset(long struct)
Unsafe version ofset
.
-
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 newVkImageCopy
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkImageCopy calloc()
Returns a newVkImageCopy
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkImageCopy create()
Returns a newVkImageCopy
instance allocated withBufferUtils
.
-
create
public static VkImageCopy create(long address)
-
malloc
public static VkImageCopy.Buffer malloc(int capacity)
Returns a newVkImageCopy.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkImageCopy.Buffer calloc(int capacity)
Returns a newVkImageCopy.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageCopy.Buffer create(int capacity)
Returns a newVkImageCopy.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageCopy.Buffer create(long address, int capacity)
Create aVkImageCopy.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkImageCopy mallocStack()
Returns a newVkImageCopy
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkImageCopy callocStack()
Returns a newVkImageCopy
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkImageCopy mallocStack(MemoryStack stack)
Returns a newVkImageCopy
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkImageCopy callocStack(MemoryStack stack)
Returns a newVkImageCopy
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkImageCopy.Buffer mallocStack(int capacity)
Returns a newVkImageCopy.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkImageCopy.Buffer callocStack(int capacity)
Returns a newVkImageCopy.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkImageCopy.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkImageCopy.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkImageCopy.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkImageCopy.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-