Class VkSwapchainCreateInfoKHR
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Valid Usage
surface
must be a surface that is supported by the device as determined usingGetPhysicalDeviceSurfaceSupportKHR
minImageCount
must be less than or equal to the value returned in themaxImageCount
member of theVkSurfaceCapabilitiesKHR
structure returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
for the surface if the returnedmaxImageCount
is not zero- If
presentMode
is notPRESENT_MODE_SHARED_DEMAND_REFRESH_KHR
norPRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR
, thenminImageCount
must be greater than or equal to the value returned in theminImageCount
member of theVkSurfaceCapabilitiesKHR
structure returned byGetPhysicalDeviceSurfaceCapabilitiesKHR
for the surface minImageCount
must be 1 ifpresentMode
is eitherPRESENT_MODE_SHARED_DEMAND_REFRESH_KHR
orPRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR
imageFormat
andimageColorSpace
must match theformat
andcolorSpace
members, respectively, of one of theVkSurfaceFormatKHR
structures returned byvkGetPhysicalDeviceSurfaceFormatsKHR
for the surface- If a
VkSwapchainPresentScalingCreateInfoEXT
structure was not included in thepNext
chain, or it is included andVkSwapchainPresentScalingCreateInfoEXT
::scalingBehavior
is zero thenimageExtent
must be betweenminImageExtent
andmaxImageExtent
, inclusive, whereminImageExtent
andmaxImageExtent
are members of theVkSurfaceCapabilitiesKHR
structure returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
for the surface - If a
VkSwapchainPresentScalingCreateInfoEXT
structure was included in thepNext
chain andVkSwapchainPresentScalingCreateInfoEXT
::scalingBehavior
is not zero thenimageExtent
must be betweenminScaledImageExtent
andmaxScaledImageExtent
, inclusive, whereminScaledImageExtent
andmaxScaledImageExtent
are members of theVkSurfacePresentScalingCapabilitiesEXT
structure returned byvkGetPhysicalDeviceSurfaceCapabilities2KHR
for the surface andpresentMode
imageExtent
memberswidth
andheight
must both be non-zeroimageArrayLayers
must be greater than 0 and less than or equal to themaxImageArrayLayers
member of theVkSurfaceCapabilitiesKHR
structure returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
for the surface- If
presentMode
isPRESENT_MODE_IMMEDIATE_KHR
,PRESENT_MODE_MAILBOX_KHR
,PRESENT_MODE_FIFO_KHR
orPRESENT_MODE_FIFO_RELAXED_KHR
,imageUsage
must be a subset of the supported usage flags present in thesupportedUsageFlags
member of theVkSurfaceCapabilitiesKHR
structure returned byGetPhysicalDeviceSurfaceCapabilitiesKHR
forsurface
- If
presentMode
isPRESENT_MODE_SHARED_DEMAND_REFRESH_KHR
orPRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR
,imageUsage
must be a subset of the supported usage flags present in thesharedPresentSupportedUsageFlags
member of theVkSharedPresentSurfaceCapabilitiesKHR
structure returned byGetPhysicalDeviceSurfaceCapabilities2KHR
forsurface
- If
imageSharingMode
isSHARING_MODE_CONCURRENT
,pQueueFamilyIndices
must be a valid pointer to an array ofqueueFamilyIndexCount
uint32_t
values - If
imageSharingMode
isSHARING_MODE_CONCURRENT
,queueFamilyIndexCount
must be greater than 1 - If
imageSharingMode
isSHARING_MODE_CONCURRENT
, each element ofpQueueFamilyIndices
must be unique and must be less thanpQueueFamilyPropertyCount
returned by eitherGetPhysicalDeviceQueueFamilyProperties
orGetPhysicalDeviceQueueFamilyProperties2
for thephysicalDevice
that was used to createdevice
preTransform
must be one of the bits present in thesupportedTransforms
member of theVkSurfaceCapabilitiesKHR
structure returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
for the surfacecompositeAlpha
must be one of the bits present in thesupportedCompositeAlpha
member of theVkSurfaceCapabilitiesKHR
structure returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
for the surfacepresentMode
must be one of theVkPresentModeKHR
values returned byvkGetPhysicalDeviceSurfacePresentModesKHR
for the surface- If the logical device was created with
VkDeviceGroupDeviceCreateInfo
::physicalDeviceCount
equal to 1,flags
must not containSWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR
- If
oldSwapchain
is notNULL_HANDLE
,oldSwapchain
must be a non-retired swapchain associated with native window referred to bysurface
- The implied image creation parameters of the swapchain must be supported as reported by
GetPhysicalDeviceImageFormatProperties
- If
flags
containsSWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR
then thepNext
chain must include aVkImageFormatListCreateInfo
structure with aviewFormatCount
greater than zero andpViewFormats
must have an element equal toimageFormat
- If a
VkImageFormatListCreateInfo
structure was included in thepNext
chain andVkImageFormatListCreateInfo
::viewFormatCount
is not zero then all of the formats inVkImageFormatListCreateInfo
::pViewFormats
must be compatible with theformat
as described in the compatibility table - If
flags
does not containSWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR
and thepNext
chain include aVkImageFormatListCreateInfo
structure thenVkImageFormatListCreateInfo
::viewFormatCount
must be 0 or 1 - If
flags
containsSWAPCHAIN_CREATE_PROTECTED_BIT_KHR
, thenVkSurfaceProtectedCapabilitiesKHR
::supportsProtected
must beTRUE
in theVkSurfaceProtectedCapabilitiesKHR
structure returned byGetPhysicalDeviceSurfaceCapabilities2KHR
forsurface
- If the
pNext
chain includes aVkSurfaceFullScreenExclusiveInfoEXT
structure with itsfullScreenExclusive
member set toFULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT
, andsurface
was created usingCreateWin32SurfaceKHR
, aVkSurfaceFullScreenExclusiveWin32InfoEXT
structure must be included in thepNext
chain - If the
imageCompressionControlSwapchain
feature is not enabled, thepNext
chain must not include anVkImageCompressionControlEXT
structure
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofVkDeviceGroupSwapchainCreateInfoKHR
,VkImageCompressionControlEXT
,VkImageFormatListCreateInfo
,VkSurfaceFullScreenExclusiveInfoEXT
,VkSurfaceFullScreenExclusiveWin32InfoEXT
,VkSwapchainCounterCreateInfoEXT
,VkSwapchainDisplayNativeHdrCreateInfoAMD
,VkSwapchainLatencyCreateInfoNV
,VkSwapchainPresentBarrierCreateInfoNV
,VkSwapchainPresentModesCreateInfoEXT
, orVkSwapchainPresentScalingCreateInfoEXT
- The
sType
value of each struct in thepNext
chain must be unique flags
must be a valid combination ofVkSwapchainCreateFlagBitsKHR
valuessurface
must be a validVkSurfaceKHR
handleimageFormat
must be a validVkFormat
valueimageColorSpace
must be a validVkColorSpaceKHR
valueimageUsage
must be a valid combination ofVkImageUsageFlagBits
valuesimageUsage
must not be 0imageSharingMode
must be a validVkSharingMode
valuepreTransform
must be a validVkSurfaceTransformFlagBitsKHR
valuecompositeAlpha
must be a validVkCompositeAlphaFlagBitsKHR
valuepresentMode
must be a validVkPresentModeKHR
value- If
oldSwapchain
is notNULL_HANDLE
,oldSwapchain
must be a validVkSwapchainKHR
handle - Both of
oldSwapchain
, andsurface
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkInstance
See Also
VkExtent2D
, CreateSharedSwapchainsKHR
, CreateSwapchainKHR
Layout
struct VkSwapchainCreateInfoKHR {
VkStructureType sType()
;
void const * pNext()
;
VkSwapchainCreateFlagsKHR flags()
;
VkSurfaceKHR surface()
;
uint32_t minImageCount()
;
VkFormat imageFormat()
;
VkColorSpaceKHR imageColorSpace()
;
VkExtent2D
imageExtent()
;
uint32_t imageArrayLayers()
;
VkImageUsageFlags imageUsage()
;
VkSharingMode imageSharingMode()
;
uint32_t queueFamilyIndexCount()
;
uint32_t const * pQueueFamilyIndices()
;
VkSurfaceTransformFlagBitsKHR preTransform()
;
VkCompositeAlphaFlagBitsKHR compositeAlpha()
;
VkPresentModeKHR presentMode()
;
VkBool32 clipped()
;
VkSwapchainKHR oldSwapchain()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionVkSwapchainCreateInfoKHR
(ByteBuffer container) Creates aVkSwapchainCreateInfoKHR
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkSwapchainCreateInfoKHR
calloc()
Returns a newVkSwapchainCreateInfoKHR
instance allocated withmemCalloc
.calloc
(int capacity) Returns a newVkSwapchainCreateInfoKHR.Buffer
instance allocated withmemCalloc
.calloc
(int capacity, MemoryStack stack) Returns a newVkSwapchainCreateInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSwapchainCreateInfoKHR
calloc
(MemoryStack stack) Returns a newVkSwapchainCreateInfoKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSwapchainCreateInfoKHR
Deprecated.callocStack
(int capacity) Deprecated.callocStack
(int capacity, MemoryStack stack) Deprecated.static VkSwapchainCreateInfoKHR
callocStack
(MemoryStack stack) Deprecated.boolean
clipped()
specifies whether the Vulkan implementation is allowed to discard rendering operations that affect regions of the surface that are not visible.clipped
(boolean value) Sets the specified value to theclipped()
field.int
aVkCompositeAlphaFlagBitsKHR
value indicating the alpha compositing mode to use when this surface is composited together with other surfaces on certain window systems.compositeAlpha
(int value) Sets the specified value to thecompositeAlpha()
field.static VkSwapchainCreateInfoKHR
create()
Returns a newVkSwapchainCreateInfoKHR
instance allocated withBufferUtils
.create
(int capacity) Returns a newVkSwapchainCreateInfoKHR.Buffer
instance allocated withBufferUtils
.static VkSwapchainCreateInfoKHR
create
(long address) Returns a newVkSwapchainCreateInfoKHR
instance for the specified memory address.create
(long address, int capacity) Create aVkSwapchainCreateInfoKHR.Buffer
instance at the specified memory.static VkSwapchainCreateInfoKHR
createSafe
(long address) createSafe
(long address, int capacity) int
flags()
a bitmask ofVkSwapchainCreateFlagBitsKHR
indicating parameters of the swapchain creation.flags
(int value) Sets the specified value to theflags()
field.int
the number of views in a multiview/stereo surface.imageArrayLayers
(int value) Sets the specified value to theimageArrayLayers()
field.int
aVkColorSpaceKHR
value specifying the way the swapchain interprets image data.imageColorSpace
(int value) Sets the specified value to theimageColorSpace()
field.the size (in pixels) of the swapchain image(s).imageExtent
(Consumer<VkExtent2D> consumer) Passes theimageExtent()
field to the specifiedConsumer
.imageExtent
(VkExtent2D value) Copies the specifiedVkExtent2D
to theimageExtent()
field.int
aVkFormat
value specifying the format the swapchain image(s) will be created with.imageFormat
(int value) Sets the specified value to theimageFormat()
field.int
the sharing mode used for the image(s) of the swapchain.imageSharingMode
(int value) Sets the specified value to theimageSharingMode()
field.int
a bitmask ofVkImageUsageFlagBits
describing the intended usage of the (acquired) swapchain images.imageUsage
(int value) Sets the specified value to theimageUsage()
field.static VkSwapchainCreateInfoKHR
malloc()
Returns a newVkSwapchainCreateInfoKHR
instance allocated withmemAlloc
.malloc
(int capacity) Returns a newVkSwapchainCreateInfoKHR.Buffer
instance allocated withmemAlloc
.malloc
(int capacity, MemoryStack stack) Returns a newVkSwapchainCreateInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
.static VkSwapchainCreateInfoKHR
malloc
(MemoryStack stack) Returns a newVkSwapchainCreateInfoKHR
instance allocated on the specifiedMemoryStack
.static VkSwapchainCreateInfoKHR
Deprecated.mallocStack
(int capacity) Deprecated.mallocStack
(int capacity, MemoryStack stack) Deprecated.static VkSwapchainCreateInfoKHR
mallocStack
(MemoryStack stack) Deprecated.int
the minimum number of presentable images that the application needs.minImageCount
(int value) Sets the specified value to theminImageCount()
field.static int
nclipped
(long struct) Unsafe version ofclipped()
.static void
nclipped
(long struct, int value) Unsafe version ofclipped
.static int
ncompositeAlpha
(long struct) Unsafe version ofcompositeAlpha()
.static void
ncompositeAlpha
(long struct, int value) Unsafe version ofcompositeAlpha
.static int
nflags
(long struct) Unsafe version offlags()
.static void
nflags
(long struct, int value) Unsafe version offlags
.static int
nimageArrayLayers
(long struct) Unsafe version ofimageArrayLayers()
.static void
nimageArrayLayers
(long struct, int value) Unsafe version ofimageArrayLayers
.static int
nimageColorSpace
(long struct) Unsafe version ofimageColorSpace()
.static void
nimageColorSpace
(long struct, int value) Unsafe version ofimageColorSpace
.static VkExtent2D
nimageExtent
(long struct) Unsafe version ofimageExtent()
.static void
nimageExtent
(long struct, VkExtent2D value) Unsafe version ofimageExtent
.static int
nimageFormat
(long struct) Unsafe version ofimageFormat()
.static void
nimageFormat
(long struct, int value) Unsafe version ofimageFormat
.static int
nimageSharingMode
(long struct) Unsafe version ofimageSharingMode()
.static void
nimageSharingMode
(long struct, int value) Unsafe version ofimageSharingMode
.static int
nimageUsage
(long struct) Unsafe version ofimageUsage()
.static void
nimageUsage
(long struct, int value) Unsafe version ofimageUsage
.static int
nminImageCount
(long struct) Unsafe version ofminImageCount()
.static void
nminImageCount
(long struct, int value) Unsafe version ofminImageCount
.static long
noldSwapchain
(long struct) Unsafe version ofoldSwapchain()
.static void
noldSwapchain
(long struct, long value) Unsafe version ofoldSwapchain
.static long
npNext
(long struct) Unsafe version ofpNext()
.static void
npNext
(long struct, long value) Unsafe version ofpNext
.static IntBuffer
npQueueFamilyIndices
(long struct) Unsafe version ofpQueueFamilyIndices
.static void
npQueueFamilyIndices
(long struct, IntBuffer value) Unsafe version ofpQueueFamilyIndices
.static int
npresentMode
(long struct) Unsafe version ofpresentMode()
.static void
npresentMode
(long struct, int value) Unsafe version ofpresentMode
.static int
npreTransform
(long struct) Unsafe version ofpreTransform()
.static void
npreTransform
(long struct, int value) Unsafe version ofpreTransform
.static int
nqueueFamilyIndexCount
(long struct) Unsafe version ofqueueFamilyIndexCount()
.static void
nqueueFamilyIndexCount
(long struct, int value) Sets the specified value to thequeueFamilyIndexCount
field of the specifiedstruct
.static int
nsType
(long struct) Unsafe version ofsType()
.static void
nsType
(long struct, int value) Unsafe version ofsType
.static long
nsurface
(long struct) Unsafe version ofsurface()
.static void
nsurface
(long struct, long value) Unsafe version ofsurface
.long
NULL_HANDLE
, or the existing non-retired swapchain currently associated withsurface
.oldSwapchain
(long value) Sets the specified value to theoldSwapchain()
field.long
pNext()
NULL
or a pointer to a structure extending this structure.pNext
(long value) Sets the specified value to thepNext()
field.Prepends the specifiedVkDeviceGroupSwapchainCreateInfoKHR
value to thepNext
chain.Prepends the specifiedVkImageCompressionControlEXT
value to thepNext
chain.pNext
(VkImageFormatListCreateInfo value) Prepends the specifiedVkImageFormatListCreateInfo
value to thepNext
chain.Prepends the specifiedVkImageFormatListCreateInfoKHR
value to thepNext
chain.Prepends the specifiedVkSurfaceFullScreenExclusiveInfoEXT
value to thepNext
chain.Prepends the specifiedVkSurfaceFullScreenExclusiveWin32InfoEXT
value to thepNext
chain.Prepends the specifiedVkSwapchainCounterCreateInfoEXT
value to thepNext
chain.Prepends the specifiedVkSwapchainDisplayNativeHdrCreateInfoAMD
value to thepNext
chain.Prepends the specifiedVkSwapchainLatencyCreateInfoNV
value to thepNext
chain.Prepends the specifiedVkSwapchainPresentBarrierCreateInfoNV
value to thepNext
chain.Prepends the specifiedVkSwapchainPresentModesCreateInfoEXT
value to thepNext
chain.Prepends the specifiedVkSwapchainPresentScalingCreateInfoEXT
value to thepNext
chain.a pointer to an array of queue family indices having access to the images(s) of the swapchain whenimageSharingMode
isSHARING_MODE_CONCURRENT
.pQueueFamilyIndices
(IntBuffer value) Sets the address of the specifiedIntBuffer
to thepQueueFamilyIndices()
field.int
the presentation mode the swapchain will use.presentMode
(int value) Sets the specified value to thepresentMode()
field.int
aVkSurfaceTransformFlagBitsKHR
value describing the transform, relative to the presentation engine’s natural orientation, applied to the image content prior to presentation.preTransform
(int value) Sets the specified value to thepreTransform()
field.int
the number of queue families having access to the image(s) of the swapchain whenimageSharingMode
isSHARING_MODE_CONCURRENT
.queueFamilyIndexCount
(int value) Sets the specified value to thequeueFamilyIndexCount()
field.set
(int sType, long pNext, int flags, long surface, int minImageCount, int imageFormat, int imageColorSpace, VkExtent2D imageExtent, int imageArrayLayers, int imageUsage, int imageSharingMode, int queueFamilyIndexCount, IntBuffer pQueueFamilyIndices, int preTransform, int compositeAlpha, int presentMode, boolean clipped, long oldSwapchain) Initializes this struct with the specified values.Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
sType()
aVkStructureType
value identifying this structure.sType
(int value) Sets the specified value to thesType()
field.Sets theSTRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR
value to thesType()
field.long
surface()
the surface onto which the swapchain will present images.surface
(long value) Sets the specified value to thesurface()
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets. -
SURFACE
public static final int SURFACEThe struct member offsets. -
MINIMAGECOUNT
public static final int MINIMAGECOUNTThe struct member offsets. -
IMAGEFORMAT
public static final int IMAGEFORMATThe struct member offsets. -
IMAGECOLORSPACE
public static final int IMAGECOLORSPACEThe struct member offsets. -
IMAGEEXTENT
public static final int IMAGEEXTENTThe struct member offsets. -
IMAGEARRAYLAYERS
public static final int IMAGEARRAYLAYERSThe struct member offsets. -
IMAGEUSAGE
public static final int IMAGEUSAGEThe struct member offsets. -
IMAGESHARINGMODE
public static final int IMAGESHARINGMODEThe struct member offsets. -
QUEUEFAMILYINDEXCOUNT
public static final int QUEUEFAMILYINDEXCOUNTThe struct member offsets. -
PQUEUEFAMILYINDICES
public static final int PQUEUEFAMILYINDICESThe struct member offsets. -
PRETRANSFORM
public static final int PRETRANSFORMThe struct member offsets. -
COMPOSITEALPHA
public static final int COMPOSITEALPHAThe struct member offsets. -
PRESENTMODE
public static final int PRESENTMODEThe struct member offsets. -
CLIPPED
public static final int CLIPPEDThe struct member offsets. -
OLDSWAPCHAIN
public static final int OLDSWAPCHAINThe struct member offsets.
-
-
Constructor Details
-
VkSwapchainCreateInfoKHR
Creates aVkSwapchainCreateInfoKHR
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<VkSwapchainCreateInfoKHR>
-
sType
public int sType()aVkStructureType
value identifying this structure. -
pNext
public long pNext()NULL
or a pointer to a structure extending this structure. -
flags
public int flags()a bitmask ofVkSwapchainCreateFlagBitsKHR
indicating parameters of the swapchain creation. -
surface
public long surface()the surface onto which the swapchain will present images. If the creation succeeds, the swapchain becomes associated withsurface
. -
minImageCount
public int minImageCount()the minimum number of presentable images that the application needs. The implementation will either create the swapchain with at least that many images, or it will fail to create the swapchain. -
imageFormat
public int imageFormat()aVkFormat
value specifying the format the swapchain image(s) will be created with. -
imageColorSpace
public int imageColorSpace()aVkColorSpaceKHR
value specifying the way the swapchain interprets image data. -
imageExtent
the size (in pixels) of the swapchain image(s). The behavior is platform-dependent if the image extent does not match the surface’scurrentExtent
as returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
.Note
On some platforms, it is normal that
maxImageExtent
may become(0, 0)
, for example when the window is minimized. In such a case, it is not possible to create a swapchain due to the Valid Usage requirements , unless scaling is selected throughVkSwapchainPresentScalingCreateInfoEXT
, if supported . -
imageArrayLayers
public int imageArrayLayers()the number of views in a multiview/stereo surface. For non-stereoscopic-3D applications, this value is 1. -
imageUsage
public int imageUsage()a bitmask ofVkImageUsageFlagBits
describing the intended usage of the (acquired) swapchain images. -
imageSharingMode
public int imageSharingMode()the sharing mode used for the image(s) of the swapchain. -
queueFamilyIndexCount
public int queueFamilyIndexCount()the number of queue families having access to the image(s) of the swapchain whenimageSharingMode
isSHARING_MODE_CONCURRENT
. -
pQueueFamilyIndices
a pointer to an array of queue family indices having access to the images(s) of the swapchain whenimageSharingMode
isSHARING_MODE_CONCURRENT
. -
preTransform
public int preTransform()aVkSurfaceTransformFlagBitsKHR
value describing the transform, relative to the presentation engine’s natural orientation, applied to the image content prior to presentation. If it does not match thecurrentTransform
value returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
, the presentation engine will transform the image content as part of the presentation operation. -
compositeAlpha
public int compositeAlpha()aVkCompositeAlphaFlagBitsKHR
value indicating the alpha compositing mode to use when this surface is composited together with other surfaces on certain window systems. -
presentMode
public int presentMode()the presentation mode the swapchain will use. A swapchain’s present mode determines how incoming present requests will be processed and queued internally. -
clipped
public boolean clipped()specifies whether the Vulkan implementation is allowed to discard rendering operations that affect regions of the surface that are not visible.- If set to
TRUE
, the presentable images associated with the swapchain may not own all of their pixels. Pixels in the presentable images that correspond to regions of the target surface obscured by another window on the desktop, or subject to some other clipping mechanism will have undefined content when read back. Fragment shaders may not execute for these pixels, and thus any side effects they would have had will not occur. SettingTRUE
does not guarantee any clipping will occur, but allows more efficient presentation methods to be used on some platforms. - If set to
FALSE
, presentable images associated with the swapchain will own all of the pixels they contain.Note
Applications should set this value to
TRUE
if they do not expect to read back the content of presentable images before presenting them or after reacquiring them, and if their fragment shaders do not have any side effects that require them to run for all pixels in the presentable image.
- If set to
-
oldSwapchain
public long oldSwapchain()NULL_HANDLE
, or the existing non-retired swapchain currently associated withsurface
. Providing a validoldSwapchain
may aid in the resource reuse, and also allows the application to still present any images that are already acquired from it.Upon calling
vkCreateSwapchainKHR
with anoldSwapchain
that is notNULL_HANDLE
,oldSwapchain
is retired — even if creation of the new swapchain fails. The new swapchain is created in the non-retired state whether or notoldSwapchain
isNULL_HANDLE
.Upon calling
vkCreateSwapchainKHR
with anoldSwapchain
that is notNULL_HANDLE
, any images fromoldSwapchain
that are not acquired by the application may be freed by the implementation, which may occur even if creation of the new swapchain fails. The application can destroyoldSwapchain
to free all memory associated witholdSwapchain
.Note
Multiple retired swapchains can be associated with the same
VkSurfaceKHR
through multiple uses ofoldSwapchain
that outnumber calls toDestroySwapchainKHR
.After
oldSwapchain
is retired, the application can pass toQueuePresentKHR
any images it had already acquired fromoldSwapchain
. E.g., an application may present an image from the old swapchain before an image from the new swapchain is ready to be presented. As usual,QueuePresentKHR
may fail ifoldSwapchain
has entered a state that causesERROR_OUT_OF_DATE_KHR
to be returned.The application can continue to use a shared presentable image obtained from
oldSwapchain
until a presentable image is acquired from the new swapchain, as long as it has not entered a state that causes it to returnERROR_OUT_OF_DATE_KHR
. -
sType
Sets the specified value to thesType()
field. -
sType$Default
Sets theSTRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR
value to thesType()
field. -
pNext
Sets the specified value to thepNext()
field. -
pNext
Prepends the specifiedVkDeviceGroupSwapchainCreateInfoKHR
value to thepNext
chain. -
pNext
Prepends the specifiedVkImageCompressionControlEXT
value to thepNext
chain. -
pNext
Prepends the specifiedVkImageFormatListCreateInfo
value to thepNext
chain. -
pNext
Prepends the specifiedVkImageFormatListCreateInfoKHR
value to thepNext
chain. -
pNext
Prepends the specifiedVkSurfaceFullScreenExclusiveInfoEXT
value to thepNext
chain. -
pNext
Prepends the specifiedVkSurfaceFullScreenExclusiveWin32InfoEXT
value to thepNext
chain. -
pNext
Prepends the specifiedVkSwapchainCounterCreateInfoEXT
value to thepNext
chain. -
pNext
Prepends the specifiedVkSwapchainDisplayNativeHdrCreateInfoAMD
value to thepNext
chain. -
pNext
Prepends the specifiedVkSwapchainLatencyCreateInfoNV
value to thepNext
chain. -
pNext
Prepends the specifiedVkSwapchainPresentBarrierCreateInfoNV
value to thepNext
chain. -
pNext
Prepends the specifiedVkSwapchainPresentModesCreateInfoEXT
value to thepNext
chain. -
pNext
Prepends the specifiedVkSwapchainPresentScalingCreateInfoEXT
value to thepNext
chain. -
flags
Sets the specified value to theflags()
field. -
surface
Sets the specified value to thesurface()
field. -
minImageCount
Sets the specified value to theminImageCount()
field. -
imageFormat
Sets the specified value to theimageFormat()
field. -
imageColorSpace
Sets the specified value to theimageColorSpace()
field. -
imageExtent
Copies the specifiedVkExtent2D
to theimageExtent()
field. -
imageExtent
Passes theimageExtent()
field to the specifiedConsumer
. -
imageArrayLayers
Sets the specified value to theimageArrayLayers()
field. -
imageUsage
Sets the specified value to theimageUsage()
field. -
imageSharingMode
Sets the specified value to theimageSharingMode()
field. -
queueFamilyIndexCount
Sets the specified value to thequeueFamilyIndexCount()
field. -
pQueueFamilyIndices
Sets the address of the specifiedIntBuffer
to thepQueueFamilyIndices()
field. -
preTransform
Sets the specified value to thepreTransform()
field. -
compositeAlpha
Sets the specified value to thecompositeAlpha()
field. -
presentMode
Sets the specified value to thepresentMode()
field. -
clipped
Sets the specified value to theclipped()
field. -
oldSwapchain
Sets the specified value to theoldSwapchain()
field. -
set
public VkSwapchainCreateInfoKHR set(int sType, long pNext, int flags, long surface, int minImageCount, int imageFormat, int imageColorSpace, VkExtent2D imageExtent, int imageArrayLayers, int imageUsage, int imageSharingMode, int queueFamilyIndexCount, @Nullable IntBuffer pQueueFamilyIndices, int preTransform, int compositeAlpha, int presentMode, boolean clipped, long oldSwapchain) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newVkSwapchainCreateInfoKHR
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newVkSwapchainCreateInfoKHR
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newVkSwapchainCreateInfoKHR
instance allocated withBufferUtils
. -
create
Returns a newVkSwapchainCreateInfoKHR
instance for the specified memory address. -
createSafe
-
malloc
Returns a newVkSwapchainCreateInfoKHR.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newVkSwapchainCreateInfoKHR.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newVkSwapchainCreateInfoKHR.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aVkSwapchainCreateInfoKHR.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
@Deprecated public static VkSwapchainCreateInfoKHR.Buffer mallocStack(int capacity, MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
@Deprecated public static VkSwapchainCreateInfoKHR.Buffer callocStack(int capacity, MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newVkSwapchainCreateInfoKHR
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newVkSwapchainCreateInfoKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newVkSwapchainCreateInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newVkSwapchainCreateInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType()
. -
npNext
public static long npNext(long struct) Unsafe version ofpNext()
. -
nflags
public static int nflags(long struct) Unsafe version offlags()
. -
nsurface
public static long nsurface(long struct) Unsafe version ofsurface()
. -
nminImageCount
public static int nminImageCount(long struct) Unsafe version ofminImageCount()
. -
nimageFormat
public static int nimageFormat(long struct) Unsafe version ofimageFormat()
. -
nimageColorSpace
public static int nimageColorSpace(long struct) Unsafe version ofimageColorSpace()
. -
nimageExtent
Unsafe version ofimageExtent()
. -
nimageArrayLayers
public static int nimageArrayLayers(long struct) Unsafe version ofimageArrayLayers()
. -
nimageUsage
public static int nimageUsage(long struct) Unsafe version ofimageUsage()
. -
nimageSharingMode
public static int nimageSharingMode(long struct) Unsafe version ofimageSharingMode()
. -
nqueueFamilyIndexCount
public static int nqueueFamilyIndexCount(long struct) Unsafe version ofqueueFamilyIndexCount()
. -
npQueueFamilyIndices
Unsafe version ofpQueueFamilyIndices
. -
npreTransform
public static int npreTransform(long struct) Unsafe version ofpreTransform()
. -
ncompositeAlpha
public static int ncompositeAlpha(long struct) Unsafe version ofcompositeAlpha()
. -
npresentMode
public static int npresentMode(long struct) Unsafe version ofpresentMode()
. -
nclipped
public static int nclipped(long struct) Unsafe version ofclipped()
. -
noldSwapchain
public static long noldSwapchain(long struct) Unsafe version ofoldSwapchain()
. -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType
. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext
. -
nflags
public static void nflags(long struct, int value) Unsafe version offlags
. -
nsurface
public static void nsurface(long struct, long value) Unsafe version ofsurface
. -
nminImageCount
public static void nminImageCount(long struct, int value) Unsafe version ofminImageCount
. -
nimageFormat
public static void nimageFormat(long struct, int value) Unsafe version ofimageFormat
. -
nimageColorSpace
public static void nimageColorSpace(long struct, int value) Unsafe version ofimageColorSpace
. -
nimageExtent
Unsafe version ofimageExtent
. -
nimageArrayLayers
public static void nimageArrayLayers(long struct, int value) Unsafe version ofimageArrayLayers
. -
nimageUsage
public static void nimageUsage(long struct, int value) Unsafe version ofimageUsage
. -
nimageSharingMode
public static void nimageSharingMode(long struct, int value) Unsafe version ofimageSharingMode
. -
nqueueFamilyIndexCount
public static void nqueueFamilyIndexCount(long struct, int value) Sets the specified value to thequeueFamilyIndexCount
field of the specifiedstruct
. -
npQueueFamilyIndices
Unsafe version ofpQueueFamilyIndices
. -
npreTransform
public static void npreTransform(long struct, int value) Unsafe version ofpreTransform
. -
ncompositeAlpha
public static void ncompositeAlpha(long struct, int value) Unsafe version ofcompositeAlpha
. -
npresentMode
public static void npresentMode(long struct, int value) Unsafe version ofpresentMode
. -
nclipped
public static void nclipped(long struct, int value) Unsafe version ofclipped
. -
noldSwapchain
public static void noldSwapchain(long struct, long value) Unsafe version ofoldSwapchain
.
-