Class VkApplicationInfo
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
Vulkan 1.0 implementations were required to return ERROR_INCOMPATIBLE_DRIVER if apiVersion was larger than 1.0. Implementations that support Vulkan 1.1 or later must not return ERROR_INCOMPATIBLE_DRIVER for any value of apiVersion .
Note
Because Vulkan 1.0 implementations may fail with ERROR_INCOMPATIBLE_DRIVER, applications should determine the version of Vulkan available before calling CreateInstance. If the GetInstanceProcAddr returns NULL for EnumerateInstanceVersion, it is a Vulkan 1.0 implementation. Otherwise, the application can call EnumerateInstanceVersion to determine the version of Vulkan.
As long as the instance supports at least Vulkan 1.1, an application can use different versions of Vulkan with an instance than it does with a device or physical device.
Note
The Khronos validation layers will treat apiVersion as the highest API version the application targets, and will validate API usage against the minimum of that version and the implementation version (instance or device, depending on context). If an application tries to use functionality from a greater version than this, a validation error will be triggered.
For example, if the instance supports Vulkan 1.1 and three physical devices support Vulkan 1.0, Vulkan 1.1, and Vulkan 1.2, respectively, and if the application sets apiVersion to 1.2, the application can use the following versions of Vulkan:
- Vulkan 1.0 can be used with the instance and with all physical devices.
- Vulkan 1.1 can be used with the instance and with the physical devices that support Vulkan 1.1 and Vulkan 1.2.
- Vulkan 1.2 can be used with the physical device that supports Vulkan 1.2.
If we modify the above example so that the application sets apiVersion to 1.1, then the application must not use Vulkan 1.2 functionality on the physical device that supports Vulkan 1.2.
Note
Providing a NULL VkInstanceCreateInfo::pApplicationInfo or providing an apiVersion of 0 is equivalent to providing an apiVersion of VK_MAKE_API_VERSION(0,1,0,0).
Valid Usage
- If
apiVersionis not 0, then it must be greater than or equal toAPI_VERSION_1_0
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_APPLICATION_INFOpNextmust beNULL- If
pApplicationNameis notNULL,pApplicationNamemust be a null-terminated UTF-8 string - If
pEngineNameis notNULL,pEngineNamemust be a null-terminated UTF-8 string
See Also
Layout
struct VkApplicationInfo {
VkStructureType sType();
void const * pNext();
char const * pApplicationName();
uint32_t applicationVersion();
char const * pEngineName();
uint32_t engineVersion();
uint32_t apiVersion();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkApplicationInfo(ByteBuffer container) Creates aVkApplicationInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintmust be the highest version of Vulkan that the application is designed to use, encoded as described in Version Numbers.apiVersion(int value) Sets the specified value to theapiVersion()field.intan unsigned integer variable containing the developer-supplied version number of the application.applicationVersion(int value) Sets the specified value to theapplicationVersion()field.static VkApplicationInfocalloc()Returns a newVkApplicationInfoinstance allocated withmemCalloc.static VkApplicationInfo.Buffercalloc(int capacity) Returns a newVkApplicationInfo.Bufferinstance allocated withmemCalloc.static VkApplicationInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkApplicationInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkApplicationInfocalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkApplicationInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkApplicationInfoDeprecated.static VkApplicationInfo.BuffercallocStack(int capacity) Deprecated.static VkApplicationInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkApplicationInfocallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static VkApplicationInfocreate()Returns a newVkApplicationInfoinstance allocated withBufferUtils.static VkApplicationInfo.Buffercreate(int capacity) Returns a newVkApplicationInfo.Bufferinstance allocated withBufferUtils.static VkApplicationInfocreate(long address) Returns a newVkApplicationInfoinstance for the specified memory address.static VkApplicationInfo.Buffercreate(long address, int capacity) Create aVkApplicationInfo.Bufferinstance at the specified memory.static @Nullable VkApplicationInfocreateSafe(long address) static @Nullable VkApplicationInfo.BuffercreateSafe(long address, int capacity) intan unsigned integer variable containing the developer-supplied version number of the engine used to create the application.engineVersion(int value) Sets the specified value to theengineVersion()field.static VkApplicationInfomalloc()Returns a newVkApplicationInfoinstance allocated withmemAlloc.static VkApplicationInfo.Buffermalloc(int capacity) Returns a newVkApplicationInfo.Bufferinstance allocated withmemAlloc.static VkApplicationInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkApplicationInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkApplicationInfomalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkApplicationInfoinstance allocated on the specifiedMemoryStack.static VkApplicationInfoDeprecated.static VkApplicationInfo.BuffermallocStack(int capacity) Deprecated.static VkApplicationInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkApplicationInfomallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static intnapiVersion(long struct) Unsafe version ofapiVersion().static voidnapiVersion(long struct, int value) Unsafe version ofapiVersion.static intnapplicationVersion(long struct) Unsafe version ofapplicationVersion().static voidnapplicationVersion(long struct, int value) Unsafe version ofapplicationVersion.static intnengineVersion(long struct) Unsafe version ofengineVersion().static voidnengineVersion(long struct, int value) Unsafe version ofengineVersion.static @Nullable ByteBuffernpApplicationName(long struct) Unsafe version ofpApplicationName().static voidnpApplicationName(long struct, @Nullable ByteBuffer value) Unsafe version ofpApplicationName.static @Nullable StringnpApplicationNameString(long struct) Unsafe version ofpApplicationNameString().static @Nullable ByteBuffernpEngineName(long struct) Unsafe version ofpEngineName().static voidnpEngineName(long struct, @Nullable ByteBuffer value) Unsafe version ofpEngineName.static @Nullable StringnpEngineNameString(long struct) Unsafe version ofpEngineNameString().static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.@Nullable ByteBufferNULLor is a pointer to a null-terminated UTF-8 string containing the name of the application.pApplicationName(@Nullable ByteBuffer value) Sets the address of the specified encoded string to thepApplicationName()field.@Nullable StringNULLor is a pointer to a null-terminated UTF-8 string containing the name of the application.@Nullable ByteBufferNULLor is a pointer to a null-terminated UTF-8 string containing the name of the engine (if any) used to create the application.pEngineName(@Nullable ByteBuffer value) Sets the address of the specified encoded string to thepEngineName()field.@Nullable StringNULLor is a pointer to a null-terminated UTF-8 string containing the name of the engine (if any) used to create the application.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.set(int sType, long pNext, @Nullable ByteBuffer pApplicationName, int applicationVersion, @Nullable ByteBuffer pEngineName, int engineVersion, int apiVersion) Initializes this struct with the specified values.set(VkApplicationInfo src) Copies the specified struct data to this struct.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_APPLICATION_INFOvalue to thesType()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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. -
PAPPLICATIONNAME
public static final int PAPPLICATIONNAMEThe struct member offsets. -
APPLICATIONVERSION
public static final int APPLICATIONVERSIONThe struct member offsets. -
PENGINENAME
public static final int PENGINENAMEThe struct member offsets. -
ENGINEVERSION
public static final int ENGINEVERSIONThe struct member offsets. -
APIVERSION
public static final int APIVERSIONThe struct member offsets.
-
-
Constructor Details
-
VkApplicationInfo
Creates aVkApplicationInfoinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkApplicationInfo>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
pApplicationName
NULLor is a pointer to a null-terminated UTF-8 string containing the name of the application. -
pApplicationNameString
NULLor is a pointer to a null-terminated UTF-8 string containing the name of the application. -
applicationVersion
public int applicationVersion()an unsigned integer variable containing the developer-supplied version number of the application. -
pEngineName
NULLor is a pointer to a null-terminated UTF-8 string containing the name of the engine (if any) used to create the application. -
pEngineNameString
NULLor is a pointer to a null-terminated UTF-8 string containing the name of the engine (if any) used to create the application. -
engineVersion
public int engineVersion()an unsigned integer variable containing the developer-supplied version number of the engine used to create the application. -
apiVersion
public int apiVersion()must be the highest version of Vulkan that the application is designed to use, encoded as described in Version Numbers. The patch version number specified inapiVersionis ignored when creating an instance object. The variant version of the instance must match that requested inapiVersion. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_APPLICATION_INFOvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
pApplicationName
Sets the address of the specified encoded string to thepApplicationName()field. -
applicationVersion
Sets the specified value to theapplicationVersion()field. -
pEngineName
Sets the address of the specified encoded string to thepEngineName()field. -
engineVersion
Sets the specified value to theengineVersion()field. -
apiVersion
Sets the specified value to theapiVersion()field. -
set
public VkApplicationInfo set(int sType, long pNext, @Nullable ByteBuffer pApplicationName, int applicationVersion, @Nullable ByteBuffer pEngineName, int engineVersion, int apiVersion) 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 newVkApplicationInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkApplicationInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkApplicationInfoinstance allocated withBufferUtils. -
create
Returns a newVkApplicationInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkApplicationInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkApplicationInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkApplicationInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkApplicationInfo.Bufferinstance 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 VkApplicationInfo.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 VkApplicationInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newVkApplicationInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkApplicationInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkApplicationInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkApplicationInfo.Bufferinstance allocated on the specifiedMemoryStackand 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(). -
npApplicationName
Unsafe version ofpApplicationName(). -
npApplicationNameString
Unsafe version ofpApplicationNameString(). -
napplicationVersion
public static int napplicationVersion(long struct) Unsafe version ofapplicationVersion(). -
npEngineName
Unsafe version ofpEngineName(). -
npEngineNameString
Unsafe version ofpEngineNameString(). -
nengineVersion
public static int nengineVersion(long struct) Unsafe version ofengineVersion(). -
napiVersion
public static int napiVersion(long struct) Unsafe version ofapiVersion(). -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
npApplicationName
Unsafe version ofpApplicationName. -
napplicationVersion
public static void napplicationVersion(long struct, int value) Unsafe version ofapplicationVersion. -
npEngineName
Unsafe version ofpEngineName. -
nengineVersion
public static void nengineVersion(long struct, int value) Unsafe version ofengineVersion. -
napiVersion
public static void napiVersion(long struct, int value) Unsafe version ofapiVersion.
-