Class VkApplicationInfo
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,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
apiVersion
is not 0, then it must be greater than or equal toAPI_VERSION_1_0
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_APPLICATION_INFO
pNext
must beNULL
- If
pApplicationName
is notNULL
,pApplicationName
must be a null-terminated UTF-8 string - If
pEngineName
is notNULL
,pEngineName
must 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 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 size in bytes.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
ConstructorDescriptionVkApplicationInfo
(ByteBuffer container) Creates aVkApplicationInfo
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionint
must 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.int
an unsigned integer variable containing the developer-supplied version number of the application.applicationVersion
(int value) Sets the specified value to theapplicationVersion()
field.static VkApplicationInfo
calloc()
Returns a newVkApplicationInfo
instance allocated withmemCalloc
.static VkApplicationInfo.Buffer
calloc
(int capacity) Returns a newVkApplicationInfo.Buffer
instance allocated withmemCalloc
.static VkApplicationInfo.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newVkApplicationInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkApplicationInfo
calloc
(MemoryStack stack) Returns a newVkApplicationInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkApplicationInfo
Deprecated.static VkApplicationInfo.Buffer
callocStack
(int capacity) Deprecated.static VkApplicationInfo.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static VkApplicationInfo
callocStack
(MemoryStack stack) Deprecated.static VkApplicationInfo
create()
Returns a newVkApplicationInfo
instance allocated withBufferUtils
.static VkApplicationInfo.Buffer
create
(int capacity) Returns a newVkApplicationInfo.Buffer
instance allocated withBufferUtils
.static VkApplicationInfo
create
(long address) Returns a newVkApplicationInfo
instance for the specified memory address.static VkApplicationInfo.Buffer
create
(long address, int capacity) Create aVkApplicationInfo.Buffer
instance at the specified memory.static VkApplicationInfo
createSafe
(long address) static VkApplicationInfo.Buffer
createSafe
(long address, int capacity) int
an 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 VkApplicationInfo
malloc()
Returns a newVkApplicationInfo
instance allocated withmemAlloc
.static VkApplicationInfo.Buffer
malloc
(int capacity) Returns a newVkApplicationInfo.Buffer
instance allocated withmemAlloc
.static VkApplicationInfo.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newVkApplicationInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkApplicationInfo
malloc
(MemoryStack stack) Returns a newVkApplicationInfo
instance allocated on the specifiedMemoryStack
.static VkApplicationInfo
Deprecated.static VkApplicationInfo.Buffer
mallocStack
(int capacity) Deprecated.static VkApplicationInfo.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static VkApplicationInfo
mallocStack
(MemoryStack stack) Deprecated.static int
napiVersion
(long struct) Unsafe version ofapiVersion()
.static void
napiVersion
(long struct, int value) Unsafe version ofapiVersion
.static int
napplicationVersion
(long struct) Unsafe version ofapplicationVersion()
.static void
napplicationVersion
(long struct, int value) Unsafe version ofapplicationVersion
.static int
nengineVersion
(long struct) Unsafe version ofengineVersion()
.static void
nengineVersion
(long struct, int value) Unsafe version ofengineVersion
.static ByteBuffer
npApplicationName
(long struct) Unsafe version ofpApplicationName()
.static void
npApplicationName
(long struct, ByteBuffer value) Unsafe version ofpApplicationName
.static String
npApplicationNameString
(long struct) Unsafe version ofpApplicationNameString()
.static ByteBuffer
npEngineName
(long struct) Unsafe version ofpEngineName()
.static void
npEngineName
(long struct, ByteBuffer value) Unsafe version ofpEngineName
.static String
npEngineNameString
(long struct) Unsafe version ofpEngineNameString()
.static long
npNext
(long struct) Unsafe version ofpNext()
.static void
npNext
(long struct, long value) Unsafe version ofpNext
.static int
nsType
(long struct) Unsafe version ofsType()
.static void
nsType
(long struct, int value) Unsafe version ofsType
.NULL
or is a pointer to a null-terminated UTF-8 string containing the name of the application.pApplicationName
(ByteBuffer value) Sets the address of the specified encoded string to thepApplicationName()
field.NULL
or is a pointer to a null-terminated UTF-8 string containing the name of the application.NULL
or is a pointer to a null-terminated UTF-8 string containing the name of the engine (if any) used to create the application.pEngineName
(ByteBuffer value) Sets the address of the specified encoded string to thepEngineName()
field.NULL
or is a pointer to a null-terminated UTF-8 string containing the name of the engine (if any) used to create the application.long
pNext()
NULL
or a pointer to a structure extending this structure.pNext
(long value) Sets the specified value to thepNext()
field.set
(int sType, long pNext, ByteBuffer pApplicationName, int applicationVersion, ByteBuffer pEngineName, int engineVersion, int apiVersion) Initializes this struct with the specified values.set
(VkApplicationInfo src) 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_APPLICATION_INFO
value to thesType()
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. -
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 aVkApplicationInfo
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<VkApplicationInfo>
-
sType
public int sType()aVkStructureType
value identifying this structure. -
pNext
public long pNext()NULL
or a pointer to a structure extending this structure. -
pApplicationName
NULL
or is a pointer to a null-terminated UTF-8 string containing the name of the application. -
pApplicationNameString
NULL
or 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
NULL
or is a pointer to a null-terminated UTF-8 string containing the name of the engine (if any) used to create the application. -
pEngineNameString
NULL
or 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 inapiVersion
is 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_INFO
value 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 newVkApplicationInfo
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newVkApplicationInfo
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newVkApplicationInfo
instance allocated withBufferUtils
. -
create
Returns a newVkApplicationInfo
instance for the specified memory address. -
createSafe
-
malloc
Returns a newVkApplicationInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newVkApplicationInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newVkApplicationInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aVkApplicationInfo.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.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newVkApplicationInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newVkApplicationInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newVkApplicationInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newVkApplicationInfo.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()
. -
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
.
-