Package org.lwjgl.vulkan
Class VkImageBlit
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkImageBlit
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkImageBlit extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying an image blit operation.Description
For each element of the
pRegions
array, a blit operation is performed the specified source and destination regions.Valid Usage
- 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
[0].x
andsrcOffset
[1].x
must both be greater than or equal to 0 and less than or equal to the source image subresource widthsrcOffset
[0].y
andsrcOffset
[1].y
must both be greater than or equal to 0 and less than or equal to the source image subresource height- If the calling command’s
srcImage
is of typeIMAGE_TYPE_1D
, thensrcOffset
[0].y must be 0 andsrcOffset
[1].y must be 1. srcOffset
[0].z
andsrcOffset
[1].z
must both be greater than or equal to 0 and less than or equal to the source image subresource depth- If the calling command’s
srcImage
is of typeIMAGE_TYPE_1D
orIMAGE_TYPE_2D
, thensrcOffset
[0].z must be 0 andsrcOffset
[1].z must be 1. dstOffset
[0].x
anddstOffset
[1].x
must both be greater than or equal to 0 and less than or equal to the destination image subresource widthdstOffset
[0].y
anddstOffset
[1].y
must both be greater than or equal to 0 and less than or equal to the destination image subresource height- If the calling command’s
dstImage
is of typeIMAGE_TYPE_1D
, thendstOffset
[0].y must be 0 anddstOffset
[1].y must be 1. dstOffset
[0].z
anddstOffset
[1].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
dstImage
is of typeIMAGE_TYPE_1D
orIMAGE_TYPE_2D
, thendstOffset
[0].z must be 0 anddstOffset
[1].z must be 1.
Valid Usage (Implicit)
srcSubresource
must be a validVkImageSubresourceLayers
structuredstSubresource
must be a validVkImageSubresourceLayers
structure
See Also
VkImageSubresourceLayers
,VkOffset3D
,CmdBlitImage
Member documentation
srcSubresource
– the subresource to blit from.srcOffsets[2]
– an array of twoVkOffset3D
structures specifying the bounds of the source region withinsrcSubresource
.dstSubresource
– the subresource to blit into.dstOffsets[2]
– an array of twoVkOffset3D
structures specifying the bounds of the destination region withindstSubresource
.
Layout
struct VkImageBlit {
VkImageSubresourceLayers
srcSubresource;VkOffset3D
srcOffsets[2];VkImageSubresourceLayers
dstSubresource;VkOffset3D
dstOffsets[2]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkImageBlit.Buffer
An array ofVkImageBlit
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
DSTOFFSETS
DSTSUBRESOURCEThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
SRCOFFSETS
SRCSUBRESOURCEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkImageBlit(java.nio.ByteBuffer container)
Creates aVkImageBlit
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkImageBlit
calloc()
Returns a newVkImageBlit
instance allocated withmemCalloc
.static VkImageBlit.Buffer
calloc(int capacity)
Returns a newVkImageBlit.Buffer
instance allocated withmemCalloc
.static VkImageBlit
callocStack()
Returns a newVkImageBlit
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageBlit.Buffer
callocStack(int capacity)
Returns a newVkImageBlit.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageBlit.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageBlit.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageBlit
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageBlit
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageBlit
create()
Returns a newVkImageBlit
instance allocated withBufferUtils
.static VkImageBlit.Buffer
create(int capacity)
Returns a newVkImageBlit.Buffer
instance allocated withBufferUtils
.static VkImageBlit
create(long address)
Returns a newVkImageBlit
instance for the specified memory address.static VkImageBlit.Buffer
create(long address, int capacity)
Create aVkImageBlit.Buffer
instance at the specified memory.static VkImageBlit
createSafe(long address)
static VkImageBlit.Buffer
createSafe(long address, int capacity)
VkOffset3D.Buffer
dstOffsets()
Returns aVkOffset3D
.Buffer view of thedstOffsets
field.VkOffset3D
dstOffsets(int index)
Returns aVkOffset3D
view of the struct at the specified index of thedstOffsets
field.VkImageBlit
dstOffsets(int index, java.util.function.Consumer<VkOffset3D> consumer)
Passes the element atindex
of thedstOffsets
field to the specifiedConsumer
.VkImageBlit
dstOffsets(int index, VkOffset3D value)
Copies the specifiedVkOffset3D
at the specified index of thedstOffsets
field.VkImageBlit
dstOffsets(java.util.function.Consumer<VkOffset3D.Buffer> consumer)
Passes thedstOffsets
field to the specifiedConsumer
.VkImageBlit
dstOffsets(VkOffset3D.Buffer value)
Copies the specifiedVkOffset3D.Buffer
to thedstOffsets
field.VkImageSubresourceLayers
dstSubresource()
Returns aVkImageSubresourceLayers
view of thedstSubresource
field.VkImageBlit
dstSubresource(java.util.function.Consumer<VkImageSubresourceLayers> consumer)
Passes thedstSubresource
field to the specifiedConsumer
.VkImageBlit
dstSubresource(VkImageSubresourceLayers value)
Copies the specifiedVkImageSubresourceLayers
to thedstSubresource
field.static VkImageBlit
malloc()
Returns a newVkImageBlit
instance allocated withmemAlloc
.static VkImageBlit.Buffer
malloc(int capacity)
Returns a newVkImageBlit.Buffer
instance allocated withmemAlloc
.static VkImageBlit
mallocStack()
Returns a newVkImageBlit
instance allocated on the thread-localMemoryStack
.static VkImageBlit.Buffer
mallocStack(int capacity)
Returns a newVkImageBlit.Buffer
instance allocated on the thread-localMemoryStack
.static VkImageBlit.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageBlit.Buffer
instance allocated on the specifiedMemoryStack
.static VkImageBlit
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageBlit
instance allocated on the specifiedMemoryStack
.static VkOffset3D.Buffer
ndstOffsets(long struct)
Unsafe version ofdstOffsets()
.static VkOffset3D
ndstOffsets(long struct, int index)
Unsafe version ofdstOffsets
.static void
ndstOffsets(long struct, int index, VkOffset3D value)
Unsafe version ofdstOffsets
.static void
ndstOffsets(long struct, VkOffset3D.Buffer value)
Unsafe version ofdstOffsets
.static VkImageSubresourceLayers
ndstSubresource(long struct)
Unsafe version ofdstSubresource()
.static void
ndstSubresource(long struct, VkImageSubresourceLayers value)
Unsafe version ofdstSubresource
.static VkOffset3D.Buffer
nsrcOffsets(long struct)
Unsafe version ofsrcOffsets()
.static VkOffset3D
nsrcOffsets(long struct, int index)
Unsafe version ofsrcOffsets
.static void
nsrcOffsets(long struct, int index, VkOffset3D value)
Unsafe version ofsrcOffsets
.static void
nsrcOffsets(long struct, VkOffset3D.Buffer value)
Unsafe version ofsrcOffsets
.static VkImageSubresourceLayers
nsrcSubresource(long struct)
Unsafe version ofsrcSubresource()
.static void
nsrcSubresource(long struct, VkImageSubresourceLayers value)
Unsafe version ofsrcSubresource
.VkImageBlit
set(VkImageBlit src)
Copies the specified struct data to this struct.VkImageBlit
set(VkImageSubresourceLayers srcSubresource, VkOffset3D.Buffer srcOffsets, VkImageSubresourceLayers dstSubresource, VkOffset3D.Buffer dstOffsets)
Initializes this struct with the specified values.int
sizeof()
VkOffset3D.Buffer
srcOffsets()
Returns aVkOffset3D
.Buffer view of thesrcOffsets
field.VkOffset3D
srcOffsets(int index)
Returns aVkOffset3D
view of the struct at the specified index of thesrcOffsets
field.VkImageBlit
srcOffsets(int index, java.util.function.Consumer<VkOffset3D> consumer)
Passes the element atindex
of thesrcOffsets
field to the specifiedConsumer
.VkImageBlit
srcOffsets(int index, VkOffset3D value)
Copies the specifiedVkOffset3D
at the specified index of thesrcOffsets
field.VkImageBlit
srcOffsets(java.util.function.Consumer<VkOffset3D.Buffer> consumer)
Passes thesrcOffsets
field to the specifiedConsumer
.VkImageBlit
srcOffsets(VkOffset3D.Buffer value)
Copies the specifiedVkOffset3D.Buffer
to thesrcOffsets
field.VkImageSubresourceLayers
srcSubresource()
Returns aVkImageSubresourceLayers
view of thesrcSubresource
field.VkImageBlit
srcSubresource(java.util.function.Consumer<VkImageSubresourceLayers> consumer)
Passes thesrcSubresource
field to the specifiedConsumer
.VkImageBlit
srcSubresource(VkImageSubresourceLayers value)
Copies the specifiedVkImageSubresourceLayers
to thesrcSubresource
field.
-
-
-
Constructor Detail
-
VkImageBlit
public VkImageBlit(java.nio.ByteBuffer container)
Creates aVkImageBlit
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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
srcSubresource
public VkImageSubresourceLayers srcSubresource()
Returns aVkImageSubresourceLayers
view of thesrcSubresource
field.
-
srcOffsets
public VkOffset3D.Buffer srcOffsets()
Returns aVkOffset3D
.Buffer view of thesrcOffsets
field.
-
srcOffsets
public VkOffset3D srcOffsets(int index)
Returns aVkOffset3D
view of the struct at the specified index of thesrcOffsets
field.
-
dstSubresource
public VkImageSubresourceLayers dstSubresource()
Returns aVkImageSubresourceLayers
view of thedstSubresource
field.
-
dstOffsets
public VkOffset3D.Buffer dstOffsets()
Returns aVkOffset3D
.Buffer view of thedstOffsets
field.
-
dstOffsets
public VkOffset3D dstOffsets(int index)
Returns aVkOffset3D
view of the struct at the specified index of thedstOffsets
field.
-
srcSubresource
public VkImageBlit srcSubresource(VkImageSubresourceLayers value)
Copies the specifiedVkImageSubresourceLayers
to thesrcSubresource
field.
-
srcSubresource
public VkImageBlit srcSubresource(java.util.function.Consumer<VkImageSubresourceLayers> consumer)
Passes thesrcSubresource
field to the specifiedConsumer
.
-
srcOffsets
public VkImageBlit srcOffsets(VkOffset3D.Buffer value)
Copies the specifiedVkOffset3D.Buffer
to thesrcOffsets
field.
-
srcOffsets
public VkImageBlit srcOffsets(int index, VkOffset3D value)
Copies the specifiedVkOffset3D
at the specified index of thesrcOffsets
field.
-
srcOffsets
public VkImageBlit srcOffsets(java.util.function.Consumer<VkOffset3D.Buffer> consumer)
Passes thesrcOffsets
field to the specifiedConsumer
.
-
srcOffsets
public VkImageBlit srcOffsets(int index, java.util.function.Consumer<VkOffset3D> consumer)
Passes the element atindex
of thesrcOffsets
field to the specifiedConsumer
.
-
dstSubresource
public VkImageBlit dstSubresource(VkImageSubresourceLayers value)
Copies the specifiedVkImageSubresourceLayers
to thedstSubresource
field.
-
dstSubresource
public VkImageBlit dstSubresource(java.util.function.Consumer<VkImageSubresourceLayers> consumer)
Passes thedstSubresource
field to the specifiedConsumer
.
-
dstOffsets
public VkImageBlit dstOffsets(VkOffset3D.Buffer value)
Copies the specifiedVkOffset3D.Buffer
to thedstOffsets
field.
-
dstOffsets
public VkImageBlit dstOffsets(int index, VkOffset3D value)
Copies the specifiedVkOffset3D
at the specified index of thedstOffsets
field.
-
dstOffsets
public VkImageBlit dstOffsets(java.util.function.Consumer<VkOffset3D.Buffer> consumer)
Passes thedstOffsets
field to the specifiedConsumer
.
-
dstOffsets
public VkImageBlit dstOffsets(int index, java.util.function.Consumer<VkOffset3D> consumer)
Passes the element atindex
of thedstOffsets
field to the specifiedConsumer
.
-
set
public VkImageBlit set(VkImageSubresourceLayers srcSubresource, VkOffset3D.Buffer srcOffsets, VkImageSubresourceLayers dstSubresource, VkOffset3D.Buffer dstOffsets)
Initializes this struct with the specified values.
-
set
public VkImageBlit set(VkImageBlit src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkImageBlit malloc()
Returns a newVkImageBlit
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkImageBlit calloc()
Returns a newVkImageBlit
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkImageBlit create()
Returns a newVkImageBlit
instance allocated withBufferUtils
.
-
create
public static VkImageBlit create(long address)
Returns a newVkImageBlit
instance for the specified memory address.
-
createSafe
@Nullable public static VkImageBlit createSafe(long address)
-
malloc
public static VkImageBlit.Buffer malloc(int capacity)
Returns a newVkImageBlit.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkImageBlit.Buffer calloc(int capacity)
Returns a newVkImageBlit.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageBlit.Buffer create(int capacity)
Returns a newVkImageBlit.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageBlit.Buffer create(long address, int capacity)
Create aVkImageBlit.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkImageBlit.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkImageBlit mallocStack()
Returns a newVkImageBlit
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkImageBlit callocStack()
Returns a newVkImageBlit
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkImageBlit mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageBlit
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkImageBlit callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageBlit
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkImageBlit.Buffer mallocStack(int capacity)
Returns a newVkImageBlit.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkImageBlit.Buffer callocStack(int capacity)
Returns a newVkImageBlit.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkImageBlit.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageBlit.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkImageBlit.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageBlit.Buffer
instance allocated on the specifiedMemoryStack
and 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()
.
-
nsrcOffsets
public static VkOffset3D.Buffer nsrcOffsets(long struct)
Unsafe version ofsrcOffsets()
.
-
nsrcOffsets
public static VkOffset3D nsrcOffsets(long struct, int index)
Unsafe version ofsrcOffsets
.
-
ndstSubresource
public static VkImageSubresourceLayers ndstSubresource(long struct)
Unsafe version ofdstSubresource()
.
-
ndstOffsets
public static VkOffset3D.Buffer ndstOffsets(long struct)
Unsafe version ofdstOffsets()
.
-
ndstOffsets
public static VkOffset3D ndstOffsets(long struct, int index)
Unsafe version ofdstOffsets
.
-
nsrcSubresource
public static void nsrcSubresource(long struct, VkImageSubresourceLayers value)
Unsafe version ofsrcSubresource
.
-
nsrcOffsets
public static void nsrcOffsets(long struct, VkOffset3D.Buffer value)
Unsafe version ofsrcOffsets
.
-
nsrcOffsets
public static void nsrcOffsets(long struct, int index, VkOffset3D value)
Unsafe version ofsrcOffsets
.
-
ndstSubresource
public static void ndstSubresource(long struct, VkImageSubresourceLayers value)
Unsafe version ofdstSubresource
.
-
ndstOffsets
public static void ndstOffsets(long struct, VkOffset3D.Buffer value)
Unsafe version ofdstOffsets
.
-
ndstOffsets
public static void ndstOffsets(long struct, int index, VkOffset3D value)
Unsafe version ofdstOffsets
.
-
-