Package org.lwjgl.vulkan
Class VkInstanceCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkInstanceCreateInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkInstanceCreateInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying parameters of a newly created instance.Description
To capture events that occur while creating or destroying an instance, an application can link a
VkDebugReportCallbackCreateInfoEXTstructure or aVkDebugUtilsMessengerCreateInfoEXTstructure to thepNextelement of theVkInstanceCreateInfostructure given tovkCreateInstance. This callback is only valid for the duration of theCreateInstanceand theDestroyInstancecall. UseCreateDebugReportCallbackEXTorCreateDebugUtilsMessengerEXTto create persistent callback objects.Valid Usage
- If the
pNextchain ofVkInstanceCreateInfoincludes aVkDebugReportCallbackCreateInfoEXTstructure, the list of enabled extensions inppEnabledExtensionNamesmust containVK_EXT_debug_report - If the
pNextchain ofVkInstanceCreateInfoincludes aVkDebugUtilsMessengerCreateInfoEXTstructure, the list of enabled extensions inppEnabledExtensionNamesmust containVK_EXT_debug_utils
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_INSTANCE_CREATE_INFO- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkDebugReportCallbackCreateInfoEXT,VkDebugUtilsMessengerCreateInfoEXT,VkValidationFeaturesEXT, orVkValidationFlagsEXT - The
sTypevalue of each struct in thepNextchain must be unique, with the exception of structures of typeVkDebugUtilsMessengerCreateInfoEXT flagsmust be 0- If
pApplicationInfois notNULL,pApplicationInfomust be a valid pointer to a validVkApplicationInfostructure - If
enabledLayerCountis not 0,ppEnabledLayerNamesmust be a valid pointer to an array ofenabledLayerCountnull-terminated UTF-8 strings - If
enabledExtensionCountis not 0,ppEnabledExtensionNamesmust be a valid pointer to an array ofenabledExtensionCountnull-terminated UTF-8 strings
See Also
VkApplicationInfo,CreateInstanceLayout
struct VkInstanceCreateInfo { VkStructureTypesType(); void const *pNext(); VkInstanceCreateFlagsflags();VkApplicationInfoconst *pApplicationInfo(); uint32_tenabledLayerCount(); char const * const *ppEnabledLayerNames(); uint32_tenabledExtensionCount(); char const * const *ppEnabledExtensionNames(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkInstanceCreateInfo.BufferAn array ofVkInstanceCreateInfostructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intENABLEDEXTENSIONCOUNT
ENABLEDLAYERCOUNT
FLAGS
PAPPLICATIONINFO
PNEXT
PPENABLEDEXTENSIONNAMES
PPENABLEDLAYERNAMESThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkInstanceCreateInfo(java.nio.ByteBuffer container)Creates aVkInstanceCreateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static VkInstanceCreateInfocalloc()Returns a newVkInstanceCreateInfoinstance allocated withmemCalloc.static VkInstanceCreateInfo.Buffercalloc(int capacity)Returns a newVkInstanceCreateInfo.Bufferinstance allocated withmemCalloc.static VkInstanceCreateInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkInstanceCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkInstanceCreateInfocalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkInstanceCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkInstanceCreateInfocallocStack()Deprecated.static VkInstanceCreateInfo.BuffercallocStack(int capacity)Deprecated.static VkInstanceCreateInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkInstanceCreateInfocallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VkInstanceCreateInfocreate()Returns a newVkInstanceCreateInfoinstance allocated withBufferUtils.static VkInstanceCreateInfo.Buffercreate(int capacity)Returns a newVkInstanceCreateInfo.Bufferinstance allocated withBufferUtils.static VkInstanceCreateInfocreate(long address)Returns a newVkInstanceCreateInfoinstance for the specified memory address.static VkInstanceCreateInfo.Buffercreate(long address, int capacity)Create aVkInstanceCreateInfo.Bufferinstance at the specified memory.static VkInstanceCreateInfocreateSafe(long address)static VkInstanceCreateInfo.BuffercreateSafe(long address, int capacity)intenabledExtensionCount()the number of global extensions to enable.intenabledLayerCount()the number of global layers to enable.intflags()reserved for future use.VkInstanceCreateInfoflags(int value)Sets the specified value to theflags()field.static VkInstanceCreateInfomalloc()Returns a newVkInstanceCreateInfoinstance allocated withmemAlloc.static VkInstanceCreateInfo.Buffermalloc(int capacity)Returns a newVkInstanceCreateInfo.Bufferinstance allocated withmemAlloc.static VkInstanceCreateInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkInstanceCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkInstanceCreateInfomalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkInstanceCreateInfoinstance allocated on the specifiedMemoryStack.static VkInstanceCreateInfomallocStack()Deprecated.static VkInstanceCreateInfo.BuffermallocStack(int capacity)Deprecated.static VkInstanceCreateInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkInstanceCreateInfomallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static intnenabledExtensionCount(long struct)Unsafe version ofenabledExtensionCount().static voidnenabledExtensionCount(long struct, int value)Sets the specified value to theenabledExtensionCountfield of the specifiedstruct.static intnenabledLayerCount(long struct)Unsafe version ofenabledLayerCount().static voidnenabledLayerCount(long struct, int value)Sets the specified value to theenabledLayerCountfield of the specifiedstruct.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static VkApplicationInfonpApplicationInfo(long struct)Unsafe version ofpApplicationInfo().static voidnpApplicationInfo(long struct, VkApplicationInfo value)Unsafe version ofpApplicationInfo.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static org.lwjgl.PointerBuffernppEnabledExtensionNames(long struct)Unsafe version ofppEnabledExtensionNames.static voidnppEnabledExtensionNames(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofppEnabledExtensionNames.static org.lwjgl.PointerBuffernppEnabledLayerNames(long struct)Unsafe version ofppEnabledLayerNames.static voidnppEnabledLayerNames(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofppEnabledLayerNames.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.VkApplicationInfopApplicationInfo()NULLor a pointer to aVkApplicationInfostructure.VkInstanceCreateInfopApplicationInfo(VkApplicationInfo value)Sets the address of the specifiedVkApplicationInfoto thepApplicationInfo()field.longpNext()NULLor a pointer to a structure extending this structure.VkInstanceCreateInfopNext(long value)Sets the specified value to thepNext()field.VkInstanceCreateInfopNext(VkDebugReportCallbackCreateInfoEXT value)Prepends the specifiedVkDebugReportCallbackCreateInfoEXTvalue to thepNextchain.VkInstanceCreateInfopNext(VkDebugUtilsMessengerCreateInfoEXT value)Prepends the specifiedVkDebugUtilsMessengerCreateInfoEXTvalue to thepNextchain.VkInstanceCreateInfopNext(VkValidationFeaturesEXT value)Prepends the specifiedVkValidationFeaturesEXTvalue to thepNextchain.VkInstanceCreateInfopNext(VkValidationFlagsEXT value)Prepends the specifiedVkValidationFlagsEXTvalue to thepNextchain.org.lwjgl.PointerBufferppEnabledExtensionNames()a pointer to an array ofenabledExtensionCountnull-terminated UTF-8 strings containing the names of extensions to enable.VkInstanceCreateInfoppEnabledExtensionNames(org.lwjgl.PointerBuffer value)Sets the address of the specifiedPointerBufferto theppEnabledExtensionNames()field.org.lwjgl.PointerBufferppEnabledLayerNames()a pointer to an array ofenabledLayerCountnull-terminated UTF-8 strings containing the names of layers to enable for the created instance.VkInstanceCreateInfoppEnabledLayerNames(org.lwjgl.PointerBuffer value)Sets the address of the specifiedPointerBufferto theppEnabledLayerNames()field.VkInstanceCreateInfoset(int sType, long pNext, int flags, VkApplicationInfo pApplicationInfo, org.lwjgl.PointerBuffer ppEnabledLayerNames, org.lwjgl.PointerBuffer ppEnabledExtensionNames)Initializes this struct with the specified values.VkInstanceCreateInfoset(VkInstanceCreateInfo src)Copies the specified struct data to this struct.intsizeof()intsType()the type of this structure.VkInstanceCreateInfosType(int value)Sets the specified value to thesType()field.VkInstanceCreateInfosType$Default()Sets theSTRUCTURE_TYPE_INSTANCE_CREATE_INFOvalue to thesType()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
VkInstanceCreateInfo
public VkInstanceCreateInfo(java.nio.ByteBuffer container)
Creates aVkInstanceCreateInfoinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
flags
public int flags()
reserved for future use.
-
pApplicationInfo
@Nullable public VkApplicationInfo pApplicationInfo()
NULLor a pointer to aVkApplicationInfostructure. If notNULL, this information helps implementations recognize behavior inherent to classes of applications.VkApplicationInfois defined in detail below.
-
enabledLayerCount
public int enabledLayerCount()
the number of global layers to enable.
-
ppEnabledLayerNames
@Nullable public org.lwjgl.PointerBuffer ppEnabledLayerNames()
a pointer to an array ofenabledLayerCountnull-terminated UTF-8 strings containing the names of layers to enable for the created instance. The layers are loaded in the order they are listed in this array, with the first array element being the closest to the application, and the last array element being the closest to the driver. See the Layers section for further details.
-
enabledExtensionCount
public int enabledExtensionCount()
the number of global extensions to enable.
-
ppEnabledExtensionNames
@Nullable public org.lwjgl.PointerBuffer ppEnabledExtensionNames()
a pointer to an array ofenabledExtensionCountnull-terminated UTF-8 strings containing the names of extensions to enable.
-
sType
public VkInstanceCreateInfo sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkInstanceCreateInfo sType$Default()
Sets theSTRUCTURE_TYPE_INSTANCE_CREATE_INFOvalue to thesType()field.
-
pNext
public VkInstanceCreateInfo pNext(long value)
Sets the specified value to thepNext()field.
-
pNext
public VkInstanceCreateInfo pNext(VkDebugReportCallbackCreateInfoEXT value)
Prepends the specifiedVkDebugReportCallbackCreateInfoEXTvalue to thepNextchain.
-
pNext
public VkInstanceCreateInfo pNext(VkDebugUtilsMessengerCreateInfoEXT value)
Prepends the specifiedVkDebugUtilsMessengerCreateInfoEXTvalue to thepNextchain.
-
pNext
public VkInstanceCreateInfo pNext(VkValidationFeaturesEXT value)
Prepends the specifiedVkValidationFeaturesEXTvalue to thepNextchain.
-
pNext
public VkInstanceCreateInfo pNext(VkValidationFlagsEXT value)
Prepends the specifiedVkValidationFlagsEXTvalue to thepNextchain.
-
flags
public VkInstanceCreateInfo flags(int value)
Sets the specified value to theflags()field.
-
pApplicationInfo
public VkInstanceCreateInfo pApplicationInfo(@Nullable VkApplicationInfo value)
Sets the address of the specifiedVkApplicationInfoto thepApplicationInfo()field.
-
ppEnabledLayerNames
public VkInstanceCreateInfo ppEnabledLayerNames(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBufferto theppEnabledLayerNames()field.
-
ppEnabledExtensionNames
public VkInstanceCreateInfo ppEnabledExtensionNames(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBufferto theppEnabledExtensionNames()field.
-
set
public VkInstanceCreateInfo set(int sType, long pNext, int flags, @Nullable VkApplicationInfo pApplicationInfo, @Nullable org.lwjgl.PointerBuffer ppEnabledLayerNames, @Nullable org.lwjgl.PointerBuffer ppEnabledExtensionNames)
Initializes this struct with the specified values.
-
set
public VkInstanceCreateInfo set(VkInstanceCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkInstanceCreateInfo malloc()
Returns a newVkInstanceCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkInstanceCreateInfo calloc()
Returns a newVkInstanceCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkInstanceCreateInfo create()
Returns a newVkInstanceCreateInfoinstance allocated withBufferUtils.
-
create
public static VkInstanceCreateInfo create(long address)
Returns a newVkInstanceCreateInfoinstance for the specified memory address.
-
createSafe
@Nullable public static VkInstanceCreateInfo createSafe(long address)
-
malloc
public static VkInstanceCreateInfo.Buffer malloc(int capacity)
Returns a newVkInstanceCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkInstanceCreateInfo.Buffer calloc(int capacity)
Returns a newVkInstanceCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkInstanceCreateInfo.Buffer create(int capacity)
Returns a newVkInstanceCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkInstanceCreateInfo.Buffer create(long address, int capacity)
Create aVkInstanceCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkInstanceCreateInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkInstanceCreateInfo mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkInstanceCreateInfo callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkInstanceCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkInstanceCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkInstanceCreateInfo.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkInstanceCreateInfo.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkInstanceCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkInstanceCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkInstanceCreateInfo malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkInstanceCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkInstanceCreateInfo calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkInstanceCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkInstanceCreateInfo.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkInstanceCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkInstanceCreateInfo.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkInstanceCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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().
-
npApplicationInfo
@Nullable public static VkApplicationInfo npApplicationInfo(long struct)
Unsafe version ofpApplicationInfo().
-
nenabledLayerCount
public static int nenabledLayerCount(long struct)
Unsafe version ofenabledLayerCount().
-
nppEnabledLayerNames
@Nullable public static org.lwjgl.PointerBuffer nppEnabledLayerNames(long struct)
Unsafe version ofppEnabledLayerNames.
-
nenabledExtensionCount
public static int nenabledExtensionCount(long struct)
Unsafe version ofenabledExtensionCount().
-
nppEnabledExtensionNames
@Nullable public static org.lwjgl.PointerBuffer nppEnabledExtensionNames(long struct)
Unsafe version ofppEnabledExtensionNames.
-
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.
-
npApplicationInfo
public static void npApplicationInfo(long struct, @Nullable VkApplicationInfo value)Unsafe version ofpApplicationInfo.
-
nenabledLayerCount
public static void nenabledLayerCount(long struct, int value)Sets the specified value to theenabledLayerCountfield of the specifiedstruct.
-
nppEnabledLayerNames
public static void nppEnabledLayerNames(long struct, @Nullable org.lwjgl.PointerBuffer value)Unsafe version ofppEnabledLayerNames.
-
nenabledExtensionCount
public static void nenabledExtensionCount(long struct, int value)Sets the specified value to theenabledExtensionCountfield of the specifiedstruct.
-
nppEnabledExtensionNames
public static void nppEnabledExtensionNames(long struct, @Nullable org.lwjgl.PointerBuffer value)Unsafe version ofppEnabledExtensionNames.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-