public class VkSurfaceCapabilitiesKHR
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
Supported usage flags of a presentable image when using PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR presentation mode are provided by VkSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlags.
Formulas such as min(N, maxImageCount) are not correct, since maxImageCount may be zero.
VkExtent2D, VkSurfaceCapabilities2KHR, GetPhysicalDeviceSurfaceCapabilitiesKHR
minImageCount – the minimum number of images the specified device supports for a swapchain created for the surface, and will be at least one.maxImageCount – the maximum number of images the specified device supports for a swapchain created for the surface, and will be either 0, or greater than or equal to minImageCount. A value of 0 means that there is no limit on the number of images, though there may be limits related to the total amount of memory used by presentable images.currentExtent – the current width and height of the surface, or the special value (0xFFFFFFFF, 0xFFFFFFFF) indicating that the surface size will be determined by the extent of a swapchain targeting the surface.minImageExtent – contains the smallest valid swapchain extent for the surface on the specified device. The width and height of the extent will each be less than or equal to the corresponding width and height of currentExtent, unless currentExtent has the special value described above.maxImageExtent – contains the largest valid swapchain extent for the surface on the specified device. The width and height of the extent will each be greater than or equal to the corresponding width and height of minImageExtent. The width and height of the extent will each be greater than or equal to the corresponding width and height of currentExtent, unless currentExtent has the special value described above.maxImageArrayLayers – the maximum number of layers presentable images can have for a swapchain created for this device and surface, and will be at least one.supportedTransforms – a bitmask of VkSurfaceTransformFlagBitsKHR indicating the presentation transforms supported for the surface on the specified device. At least one bit will be set.currentTransform – VkSurfaceTransformFlagBitsKHR value indicating the surface’s current transform relative to the presentation engine’s natural orientation.supportedCompositeAlpha – a bitmask of VkCompositeAlphaFlagBitsKHR, representing the alpha compositing modes supported by the presentation engine for the surface on the specified device, and at least one bit will be set. Opaque composition can be achieved in any alpha compositing mode by either using an image format that has no alpha component, or by ensuring that all pixels in the presentable images have an alpha value of 1.0.supportedUsageFlags – a bitmask of VkImageUsageFlagBits representing the ways the application can use the presentable images of a swapchain created with VkPresentModeKHR set to PRESENT_MODE_IMMEDIATE_KHR, PRESENT_MODE_MAILBOX_KHR, PRESENT_MODE_FIFO_KHR or PRESENT_MODE_FIFO_RELAXED_KHR for the surface on the specified device. IMAGE_USAGE_COLOR_ATTACHMENT_BIT must be included in the set but implementations may support additional usages.
struct VkSurfaceCapabilitiesKHR {
uint32_t minImageCount;
uint32_t maxImageCount;
VkExtent2D currentExtent;
VkExtent2D minImageExtent;
VkExtent2D maxImageExtent;
uint32_t maxImageArrayLayers;
VkSurfaceTransformFlagsKHR supportedTransforms;
VkSurfaceTransformFlagBitsKHR currentTransform;
VkCompositeAlphaFlagsKHR supportedCompositeAlpha;
VkImageUsageFlags supportedUsageFlags;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkSurfaceCapabilitiesKHR.Buffer
An array of
VkSurfaceCapabilitiesKHR structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
CURRENTEXTENT
The struct member offsets.
|
static int |
CURRENTTRANSFORM
The struct member offsets.
|
static int |
MAXIMAGEARRAYLAYERS
The struct member offsets.
|
static int |
MAXIMAGECOUNT
The struct member offsets.
|
static int |
MAXIMAGEEXTENT
The struct member offsets.
|
static int |
MINIMAGECOUNT
The struct member offsets.
|
static int |
MINIMAGEEXTENT
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
SUPPORTEDCOMPOSITEALPHA
The struct member offsets.
|
static int |
SUPPORTEDTRANSFORMS
The struct member offsets.
|
static int |
SUPPORTEDUSAGEFLAGS
The struct member offsets.
|
| Constructor and Description |
|---|
VkSurfaceCapabilitiesKHR(java.nio.ByteBuffer container)
Creates a
VkSurfaceCapabilitiesKHR instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkSurfaceCapabilitiesKHR |
calloc()
Returns a new
VkSurfaceCapabilitiesKHR instance allocated with memCalloc. |
static VkSurfaceCapabilitiesKHR.Buffer |
calloc(int capacity)
Returns a new
VkSurfaceCapabilitiesKHR.Buffer instance allocated with memCalloc. |
static VkSurfaceCapabilitiesKHR |
callocStack()
Returns a new
VkSurfaceCapabilitiesKHR instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkSurfaceCapabilitiesKHR.Buffer |
callocStack(int capacity)
Returns a new
VkSurfaceCapabilitiesKHR.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkSurfaceCapabilitiesKHR.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkSurfaceCapabilitiesKHR.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkSurfaceCapabilitiesKHR |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkSurfaceCapabilitiesKHR instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkSurfaceCapabilitiesKHR |
create()
Returns a new
VkSurfaceCapabilitiesKHR instance allocated with BufferUtils. |
static VkSurfaceCapabilitiesKHR.Buffer |
create(int capacity)
Returns a new
VkSurfaceCapabilitiesKHR.Buffer instance allocated with BufferUtils. |
static VkSurfaceCapabilitiesKHR |
create(long address)
Returns a new
VkSurfaceCapabilitiesKHR instance for the specified memory address. |
static VkSurfaceCapabilitiesKHR.Buffer |
create(long address,
int capacity)
Create a
VkSurfaceCapabilitiesKHR.Buffer instance at the specified memory. |
static VkSurfaceCapabilitiesKHR |
createSafe(long address)
|
static VkSurfaceCapabilitiesKHR.Buffer |
createSafe(long address,
int capacity)
|
VkExtent2D |
currentExtent()
Returns a
VkExtent2D view of the currentExtent field. |
int |
currentTransform()
Returns the value of the
currentTransform field. |
static VkSurfaceCapabilitiesKHR |
malloc()
Returns a new
VkSurfaceCapabilitiesKHR instance allocated with memAlloc. |
static VkSurfaceCapabilitiesKHR.Buffer |
malloc(int capacity)
Returns a new
VkSurfaceCapabilitiesKHR.Buffer instance allocated with memAlloc. |
static VkSurfaceCapabilitiesKHR |
mallocStack()
Returns a new
VkSurfaceCapabilitiesKHR instance allocated on the thread-local MemoryStack. |
static VkSurfaceCapabilitiesKHR.Buffer |
mallocStack(int capacity)
Returns a new
VkSurfaceCapabilitiesKHR.Buffer instance allocated on the thread-local MemoryStack. |
static VkSurfaceCapabilitiesKHR.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkSurfaceCapabilitiesKHR.Buffer instance allocated on the specified MemoryStack. |
static VkSurfaceCapabilitiesKHR |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkSurfaceCapabilitiesKHR instance allocated on the specified MemoryStack. |
int |
maxImageArrayLayers()
Returns the value of the
maxImageArrayLayers field. |
int |
maxImageCount()
Returns the value of the
maxImageCount field. |
VkExtent2D |
maxImageExtent()
Returns a
VkExtent2D view of the maxImageExtent field. |
int |
minImageCount()
Returns the value of the
minImageCount field. |
VkExtent2D |
minImageExtent()
Returns a
VkExtent2D view of the minImageExtent field. |
static VkExtent2D |
ncurrentExtent(long struct)
Unsafe version of
currentExtent(). |
static int |
ncurrentTransform(long struct)
Unsafe version of
currentTransform(). |
static int |
nmaxImageArrayLayers(long struct)
Unsafe version of
maxImageArrayLayers(). |
static int |
nmaxImageCount(long struct)
Unsafe version of
maxImageCount(). |
static VkExtent2D |
nmaxImageExtent(long struct)
Unsafe version of
maxImageExtent(). |
static int |
nminImageCount(long struct)
Unsafe version of
minImageCount(). |
static VkExtent2D |
nminImageExtent(long struct)
Unsafe version of
minImageExtent(). |
static int |
nsupportedCompositeAlpha(long struct)
Unsafe version of
supportedCompositeAlpha(). |
static int |
nsupportedTransforms(long struct)
Unsafe version of
supportedTransforms(). |
static int |
nsupportedUsageFlags(long struct)
Unsafe version of
supportedUsageFlags(). |
int |
sizeof() |
int |
supportedCompositeAlpha()
Returns the value of the
supportedCompositeAlpha field. |
int |
supportedTransforms()
Returns the value of the
supportedTransforms field. |
int |
supportedUsageFlags()
Returns the value of the
supportedUsageFlags field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int MINIMAGECOUNT
public static final int MAXIMAGECOUNT
public static final int CURRENTEXTENT
public static final int MINIMAGEEXTENT
public static final int MAXIMAGEEXTENT
public static final int MAXIMAGEARRAYLAYERS
public static final int SUPPORTEDTRANSFORMS
public static final int CURRENTTRANSFORM
public static final int SUPPORTEDCOMPOSITEALPHA
public static final int SUPPORTEDUSAGEFLAGS
public VkSurfaceCapabilitiesKHR(java.nio.ByteBuffer container)
VkSurfaceCapabilitiesKHR instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int minImageCount()
minImageCount field.public int maxImageCount()
maxImageCount field.public VkExtent2D currentExtent()
VkExtent2D view of the currentExtent field.public VkExtent2D minImageExtent()
VkExtent2D view of the minImageExtent field.public VkExtent2D maxImageExtent()
VkExtent2D view of the maxImageExtent field.public int maxImageArrayLayers()
maxImageArrayLayers field.public int supportedTransforms()
supportedTransforms field.public int currentTransform()
currentTransform field.public int supportedCompositeAlpha()
supportedCompositeAlpha field.public int supportedUsageFlags()
supportedUsageFlags field.public static VkSurfaceCapabilitiesKHR malloc()
VkSurfaceCapabilitiesKHR instance allocated with memAlloc. The instance must be explicitly freed.public static VkSurfaceCapabilitiesKHR calloc()
VkSurfaceCapabilitiesKHR instance allocated with memCalloc. The instance must be explicitly freed.public static VkSurfaceCapabilitiesKHR create()
VkSurfaceCapabilitiesKHR instance allocated with BufferUtils.public static VkSurfaceCapabilitiesKHR create(long address)
VkSurfaceCapabilitiesKHR instance for the specified memory address.@Nullable public static VkSurfaceCapabilitiesKHR createSafe(long address)
public static VkSurfaceCapabilitiesKHR.Buffer malloc(int capacity)
VkSurfaceCapabilitiesKHR.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkSurfaceCapabilitiesKHR.Buffer calloc(int capacity)
VkSurfaceCapabilitiesKHR.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkSurfaceCapabilitiesKHR.Buffer create(int capacity)
VkSurfaceCapabilitiesKHR.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkSurfaceCapabilitiesKHR.Buffer create(long address, int capacity)
VkSurfaceCapabilitiesKHR.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkSurfaceCapabilitiesKHR.Buffer createSafe(long address, int capacity)
public static VkSurfaceCapabilitiesKHR mallocStack()
VkSurfaceCapabilitiesKHR instance allocated on the thread-local MemoryStack.public static VkSurfaceCapabilitiesKHR callocStack()
VkSurfaceCapabilitiesKHR instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkSurfaceCapabilitiesKHR mallocStack(org.lwjgl.system.MemoryStack stack)
VkSurfaceCapabilitiesKHR instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkSurfaceCapabilitiesKHR callocStack(org.lwjgl.system.MemoryStack stack)
VkSurfaceCapabilitiesKHR instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkSurfaceCapabilitiesKHR.Buffer mallocStack(int capacity)
VkSurfaceCapabilitiesKHR.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkSurfaceCapabilitiesKHR.Buffer callocStack(int capacity)
VkSurfaceCapabilitiesKHR.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkSurfaceCapabilitiesKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkSurfaceCapabilitiesKHR.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkSurfaceCapabilitiesKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkSurfaceCapabilitiesKHR.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nminImageCount(long struct)
minImageCount().public static int nmaxImageCount(long struct)
maxImageCount().public static VkExtent2D ncurrentExtent(long struct)
currentExtent().public static VkExtent2D nminImageExtent(long struct)
minImageExtent().public static VkExtent2D nmaxImageExtent(long struct)
maxImageExtent().public static int nmaxImageArrayLayers(long struct)
maxImageArrayLayers().public static int nsupportedTransforms(long struct)
supportedTransforms().public static int ncurrentTransform(long struct)
currentTransform().public static int nsupportedCompositeAlpha(long struct)
supportedCompositeAlpha().public static int nsupportedUsageFlags(long struct)
supportedUsageFlags().Copyright LWJGL. All Rights Reserved. License terms.