Package org.lwjgl.vulkan
Class VkRectLayerKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkRectLayerKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkRectLayerKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure containing a rectangle, including layer, changed by vkQueuePresentKHR for a given VkImage.Valid Usage
- The sum of
offset
andextent
must be no greater than theimageExtent
member of theVkSwapchainCreateInfoKHR
structure given toCreateSwapchainKHR
. layer
must be less thanimageArrayLayers
member of theVkSwapchainCreateInfoKHR
structure given toCreateSwapchainKHR
.
Some platforms allow the size of a surface to change, and then scale the pixels of the image to fit the surface.
VkRectLayerKHR
specifies pixels of the swapchain's image(s), which will be constant for the life of the swapchain.See Also
VkExtent2D
,VkOffset2D
,VkPresentRegionKHR
Member documentation
offset
– the origin of the rectangle, in pixels.extent
– the size of the rectangle, in pixels.layer
– the layer of the image. For images with only one layer, the value oflayer
must be 0.
Layout
struct VkRectLayerKHR {
VkOffset2D
offset;VkExtent2D
extent; uint32_t layer; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkRectLayerKHR.Buffer
An array ofVkRectLayerKHR
structs.
-
Constructor Summary
Constructors Constructor Description VkRectLayerKHR(java.nio.ByteBuffer container)
Creates aVkRectLayerKHR
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 VkRectLayerKHR
calloc()
Returns a newVkRectLayerKHR
instance allocated withmemCalloc
.static VkRectLayerKHR.Buffer
calloc(int capacity)
Returns a newVkRectLayerKHR.Buffer
instance allocated withmemCalloc
.static VkRectLayerKHR
callocStack()
Returns a newVkRectLayerKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkRectLayerKHR.Buffer
callocStack(int capacity)
Returns a newVkRectLayerKHR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkRectLayerKHR.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkRectLayerKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkRectLayerKHR
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRectLayerKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkRectLayerKHR
create()
Returns a newVkRectLayerKHR
instance allocated withBufferUtils
.static VkRectLayerKHR.Buffer
create(int capacity)
Returns a newVkRectLayerKHR.Buffer
instance allocated withBufferUtils
.static VkRectLayerKHR
create(long address)
Returns a newVkRectLayerKHR
instance for the specified memory address.static VkRectLayerKHR.Buffer
create(long address, int capacity)
Create aVkRectLayerKHR.Buffer
instance at the specified memory.static VkRectLayerKHR
createSafe(long address)
static VkRectLayerKHR.Buffer
createSafe(long address, int capacity)
VkExtent2D
extent()
Returns aVkExtent2D
view of theextent
field.VkRectLayerKHR
extent(java.util.function.Consumer<VkExtent2D> consumer)
Passes theextent
field to the specifiedConsumer
.VkRectLayerKHR
extent(VkExtent2D value)
Copies the specifiedVkExtent2D
to theextent
field.int
layer()
Returns the value of thelayer
field.VkRectLayerKHR
layer(int value)
Sets the specified value to thelayer
field.static VkRectLayerKHR
malloc()
Returns a newVkRectLayerKHR
instance allocated withmemAlloc
.static VkRectLayerKHR.Buffer
malloc(int capacity)
Returns a newVkRectLayerKHR.Buffer
instance allocated withmemAlloc
.static VkRectLayerKHR
mallocStack()
Returns a newVkRectLayerKHR
instance allocated on the thread-localMemoryStack
.static VkRectLayerKHR.Buffer
mallocStack(int capacity)
Returns a newVkRectLayerKHR.Buffer
instance allocated on the thread-localMemoryStack
.static VkRectLayerKHR.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkRectLayerKHR.Buffer
instance allocated on the specifiedMemoryStack
.static VkRectLayerKHR
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRectLayerKHR
instance allocated on the specifiedMemoryStack
.static VkExtent2D
nextent(long struct)
Unsafe version ofextent()
.static void
nextent(long struct, VkExtent2D value)
Unsafe version ofextent
.static int
nlayer(long struct)
Unsafe version oflayer()
.static void
nlayer(long struct, int value)
Unsafe version oflayer
.static VkOffset2D
noffset(long struct)
Unsafe version ofoffset()
.static void
noffset(long struct, VkOffset2D value)
Unsafe version ofoffset
.VkOffset2D
offset()
Returns aVkOffset2D
view of theoffset
field.VkRectLayerKHR
offset(java.util.function.Consumer<VkOffset2D> consumer)
Passes theoffset
field to the specifiedConsumer
.VkRectLayerKHR
offset(VkOffset2D value)
Copies the specifiedVkOffset2D
to theoffset
field.VkRectLayerKHR
set(VkOffset2D offset, VkExtent2D extent, int layer)
Initializes this struct with the specified values.VkRectLayerKHR
set(VkRectLayerKHR src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
VkRectLayerKHR
public VkRectLayerKHR(java.nio.ByteBuffer container)
Creates aVkRectLayerKHR
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
-
offset
public VkOffset2D offset()
Returns aVkOffset2D
view of theoffset
field.
-
extent
public VkExtent2D extent()
Returns aVkExtent2D
view of theextent
field.
-
layer
public int layer()
Returns the value of thelayer
field.
-
offset
public VkRectLayerKHR offset(VkOffset2D value)
Copies the specifiedVkOffset2D
to theoffset
field.
-
offset
public VkRectLayerKHR offset(java.util.function.Consumer<VkOffset2D> consumer)
Passes theoffset
field to the specifiedConsumer
.
-
extent
public VkRectLayerKHR extent(VkExtent2D value)
Copies the specifiedVkExtent2D
to theextent
field.
-
extent
public VkRectLayerKHR extent(java.util.function.Consumer<VkExtent2D> consumer)
Passes theextent
field to the specifiedConsumer
.
-
layer
public VkRectLayerKHR layer(int value)
Sets the specified value to thelayer
field.
-
set
public VkRectLayerKHR set(VkOffset2D offset, VkExtent2D extent, int layer)
Initializes this struct with the specified values.
-
set
public VkRectLayerKHR set(VkRectLayerKHR src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkRectLayerKHR malloc()
Returns a newVkRectLayerKHR
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkRectLayerKHR calloc()
Returns a newVkRectLayerKHR
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkRectLayerKHR create()
Returns a newVkRectLayerKHR
instance allocated withBufferUtils
.
-
create
public static VkRectLayerKHR create(long address)
Returns a newVkRectLayerKHR
instance for the specified memory address.
-
createSafe
@Nullable public static VkRectLayerKHR createSafe(long address)
-
malloc
public static VkRectLayerKHR.Buffer malloc(int capacity)
Returns a newVkRectLayerKHR.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkRectLayerKHR.Buffer calloc(int capacity)
Returns a newVkRectLayerKHR.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkRectLayerKHR.Buffer create(int capacity)
Returns a newVkRectLayerKHR.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkRectLayerKHR.Buffer create(long address, int capacity)
Create aVkRectLayerKHR.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkRectLayerKHR.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkRectLayerKHR mallocStack()
Returns a newVkRectLayerKHR
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkRectLayerKHR callocStack()
Returns a newVkRectLayerKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkRectLayerKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRectLayerKHR
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkRectLayerKHR callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRectLayerKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkRectLayerKHR.Buffer mallocStack(int capacity)
Returns a newVkRectLayerKHR.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkRectLayerKHR.Buffer callocStack(int capacity)
Returns a newVkRectLayerKHR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkRectLayerKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkRectLayerKHR.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkRectLayerKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkRectLayerKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
noffset
public static VkOffset2D noffset(long struct)
Unsafe version ofoffset()
.
-
nextent
public static VkExtent2D nextent(long struct)
Unsafe version ofextent()
.
-
nlayer
public static int nlayer(long struct)
Unsafe version oflayer()
.
-
noffset
public static void noffset(long struct, VkOffset2D value)
Unsafe version ofoffset
.
-
nextent
public static void nextent(long struct, VkExtent2D value)
Unsafe version ofextent
.
-
nlayer
public static void nlayer(long struct, int value)
Unsafe version oflayer
.
-
-