public class VkApplicationInfo
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
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.
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.
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 a hypothetical Vulkan 1.2, respectively, and if the application sets apiVersion to 1.2, the application can use the following versions of Vulkan:
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.
Implicit layers must be disabled if they do not support a version at least as high as apiVersion. See the Vulkan Loader Specification and Architecture Overview document for additional information.
Providing a NULL VkInstanceCreateInfo::pApplicationInfo or providing an apiVersion of 0 is equivalent to providing an apiVersion of VK_MAKE_VERSION(1,0,0).
sType must be STRUCTURE_TYPE_APPLICATION_INFOpNext must be NULLpApplicationName is not NULL, pApplicationName must be a null-terminated UTF-8 stringpEngineName is not NULL, pEngineName must be a null-terminated UTF-8 stringsType – the type of this structure.pNext – NULL or a pointer to an extension-specific structure.pApplicationName – NULL or is a pointer to a null-terminated UTF-8 string containing the name of the application.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.engineVersion – an unsigned integer variable containing the developer-supplied version number of the engine used to create the application.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 in apiVersion is ignored when creating an instance object. Only the major and minor versions of the instance must match those requested in apiVersion.
struct VkApplicationInfo {
VkStructureType sType;
void const * pNext;
char const * pApplicationName;
uint32_t applicationVersion;
char const * pEngineName;
uint32_t engineVersion;
uint32_t apiVersion;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkApplicationInfo.Buffer
An array of
VkApplicationInfo structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
APIVERSION
The struct member offsets.
|
static int |
APPLICATIONVERSION
The struct member offsets.
|
static int |
ENGINEVERSION
The struct member offsets.
|
static int |
PAPPLICATIONNAME
The struct member offsets.
|
static int |
PENGINENAME
The struct member offsets.
|
static int |
PNEXT
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STYPE
The struct member offsets.
|
| Constructor and Description |
|---|
VkApplicationInfo(java.nio.ByteBuffer container)
Creates a
VkApplicationInfo instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
int |
apiVersion()
Returns the value of the
apiVersion field. |
VkApplicationInfo |
apiVersion(int value)
Sets the specified value to the
apiVersion field. |
int |
applicationVersion()
Returns the value of the
applicationVersion field. |
VkApplicationInfo |
applicationVersion(int value)
Sets the specified value to the
applicationVersion field. |
static VkApplicationInfo |
calloc()
Returns a new
VkApplicationInfo instance allocated with memCalloc. |
static VkApplicationInfo.Buffer |
calloc(int capacity)
Returns a new
VkApplicationInfo.Buffer instance allocated with memCalloc. |
static VkApplicationInfo |
callocStack()
Returns a new
VkApplicationInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkApplicationInfo.Buffer |
callocStack(int capacity)
Returns a new
VkApplicationInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkApplicationInfo.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkApplicationInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkApplicationInfo |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkApplicationInfo instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkApplicationInfo |
create()
Returns a new
VkApplicationInfo instance allocated with BufferUtils. |
static VkApplicationInfo.Buffer |
create(int capacity)
Returns a new
VkApplicationInfo.Buffer instance allocated with BufferUtils. |
static VkApplicationInfo |
create(long address)
Returns a new
VkApplicationInfo instance for the specified memory address. |
static VkApplicationInfo.Buffer |
create(long address,
int capacity)
Create a
VkApplicationInfo.Buffer instance at the specified memory. |
static VkApplicationInfo |
createSafe(long address)
|
static VkApplicationInfo.Buffer |
createSafe(long address,
int capacity)
|
int |
engineVersion()
Returns the value of the
engineVersion field. |
VkApplicationInfo |
engineVersion(int value)
Sets the specified value to the
engineVersion field. |
static VkApplicationInfo |
malloc()
Returns a new
VkApplicationInfo instance allocated with memAlloc. |
static VkApplicationInfo.Buffer |
malloc(int capacity)
Returns a new
VkApplicationInfo.Buffer instance allocated with memAlloc. |
static VkApplicationInfo |
mallocStack()
Returns a new
VkApplicationInfo instance allocated on the thread-local MemoryStack. |
static VkApplicationInfo.Buffer |
mallocStack(int capacity)
Returns a new
VkApplicationInfo.Buffer instance allocated on the thread-local MemoryStack. |
static VkApplicationInfo.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkApplicationInfo.Buffer instance allocated on the specified MemoryStack. |
static VkApplicationInfo |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkApplicationInfo instance allocated on the specified MemoryStack. |
static int |
napiVersion(long struct)
Unsafe version of
apiVersion(). |
static void |
napiVersion(long struct,
int value)
Unsafe version of
apiVersion. |
static int |
napplicationVersion(long struct)
Unsafe version of
applicationVersion(). |
static void |
napplicationVersion(long struct,
int value)
Unsafe version of
applicationVersion. |
static int |
nengineVersion(long struct)
Unsafe version of
engineVersion(). |
static void |
nengineVersion(long struct,
int value)
Unsafe version of
engineVersion. |
static java.nio.ByteBuffer |
npApplicationName(long struct)
Unsafe version of
pApplicationName(). |
static void |
npApplicationName(long struct,
java.nio.ByteBuffer value)
Unsafe version of
pApplicationName. |
static java.lang.String |
npApplicationNameString(long struct)
Unsafe version of
pApplicationNameString(). |
static java.nio.ByteBuffer |
npEngineName(long struct)
Unsafe version of
pEngineName(). |
static void |
npEngineName(long struct,
java.nio.ByteBuffer value)
Unsafe version of
pEngineName. |
static java.lang.String |
npEngineNameString(long struct)
Unsafe version of
pEngineNameString(). |
static long |
npNext(long struct)
Unsafe version of
pNext(). |
static void |
npNext(long struct,
long value)
Unsafe version of
pNext. |
static int |
nsType(long struct)
Unsafe version of
sType(). |
static void |
nsType(long struct,
int value)
Unsafe version of
sType. |
java.nio.ByteBuffer |
pApplicationName()
Returns a
ByteBuffer view of the null-terminated string pointed to by the pApplicationName field. |
VkApplicationInfo |
pApplicationName(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to the
pApplicationName field. |
java.lang.String |
pApplicationNameString()
Decodes the null-terminated string pointed to by the
pApplicationName field. |
java.nio.ByteBuffer |
pEngineName()
Returns a
ByteBuffer view of the null-terminated string pointed to by the pEngineName field. |
VkApplicationInfo |
pEngineName(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to the
pEngineName field. |
java.lang.String |
pEngineNameString()
Decodes the null-terminated string pointed to by the
pEngineName field. |
long |
pNext()
Returns the value of the
pNext field. |
VkApplicationInfo |
pNext(long value)
Sets the specified value to the
pNext field. |
VkApplicationInfo |
set(int sType,
long pNext,
java.nio.ByteBuffer pApplicationName,
int applicationVersion,
java.nio.ByteBuffer pEngineName,
int engineVersion,
int apiVersion)
Initializes this struct with the specified values.
|
VkApplicationInfo |
set(VkApplicationInfo src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
sType()
Returns the value of the
sType field. |
VkApplicationInfo |
sType(int value)
Sets the specified value to the
sType field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int STYPE
public static final int PNEXT
public static final int PAPPLICATIONNAME
public static final int APPLICATIONVERSION
public static final int PENGINENAME
public static final int ENGINEVERSION
public static final int APIVERSION
public VkApplicationInfo(java.nio.ByteBuffer container)
VkApplicationInfo 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 sType()
sType field.public long pNext()
pNext field.@Nullable public java.nio.ByteBuffer pApplicationName()
ByteBuffer view of the null-terminated string pointed to by the pApplicationName field.@Nullable public java.lang.String pApplicationNameString()
pApplicationName field.public int applicationVersion()
applicationVersion field.@Nullable public java.nio.ByteBuffer pEngineName()
ByteBuffer view of the null-terminated string pointed to by the pEngineName field.@Nullable public java.lang.String pEngineNameString()
pEngineName field.public int engineVersion()
engineVersion field.public int apiVersion()
apiVersion field.public VkApplicationInfo sType(int value)
sType field.public VkApplicationInfo pNext(long value)
pNext field.public VkApplicationInfo pApplicationName(@Nullable java.nio.ByteBuffer value)
pApplicationName field.public VkApplicationInfo applicationVersion(int value)
applicationVersion field.public VkApplicationInfo pEngineName(@Nullable java.nio.ByteBuffer value)
pEngineName field.public VkApplicationInfo engineVersion(int value)
engineVersion field.public VkApplicationInfo apiVersion(int value)
apiVersion field.public VkApplicationInfo set(int sType, long pNext, @Nullable java.nio.ByteBuffer pApplicationName, int applicationVersion, @Nullable java.nio.ByteBuffer pEngineName, int engineVersion, int apiVersion)
public VkApplicationInfo set(VkApplicationInfo src)
src - the source structpublic static VkApplicationInfo malloc()
VkApplicationInfo instance allocated with memAlloc. The instance must be explicitly freed.public static VkApplicationInfo calloc()
VkApplicationInfo instance allocated with memCalloc. The instance must be explicitly freed.public static VkApplicationInfo create()
VkApplicationInfo instance allocated with BufferUtils.public static VkApplicationInfo create(long address)
VkApplicationInfo instance for the specified memory address.@Nullable public static VkApplicationInfo createSafe(long address)
public static VkApplicationInfo.Buffer malloc(int capacity)
VkApplicationInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkApplicationInfo.Buffer calloc(int capacity)
VkApplicationInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkApplicationInfo.Buffer create(int capacity)
VkApplicationInfo.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkApplicationInfo.Buffer create(long address, int capacity)
VkApplicationInfo.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkApplicationInfo.Buffer createSafe(long address, int capacity)
public static VkApplicationInfo mallocStack()
VkApplicationInfo instance allocated on the thread-local MemoryStack.public static VkApplicationInfo callocStack()
VkApplicationInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkApplicationInfo mallocStack(org.lwjgl.system.MemoryStack stack)
VkApplicationInfo instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkApplicationInfo callocStack(org.lwjgl.system.MemoryStack stack)
VkApplicationInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkApplicationInfo.Buffer mallocStack(int capacity)
VkApplicationInfo.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkApplicationInfo.Buffer callocStack(int capacity)
VkApplicationInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkApplicationInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkApplicationInfo.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkApplicationInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkApplicationInfo.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 nsType(long struct)
sType().public static long npNext(long struct)
pNext().@Nullable public static java.nio.ByteBuffer npApplicationName(long struct)
pApplicationName().@Nullable public static java.lang.String npApplicationNameString(long struct)
pApplicationNameString().public static int napplicationVersion(long struct)
applicationVersion().@Nullable public static java.nio.ByteBuffer npEngineName(long struct)
pEngineName().@Nullable public static java.lang.String npEngineNameString(long struct)
pEngineNameString().public static int nengineVersion(long struct)
engineVersion().public static int napiVersion(long struct)
apiVersion().public static void nsType(long struct,
int value)
sType.public static void npNext(long struct,
long value)
pNext.public static void npApplicationName(long struct,
@Nullable
java.nio.ByteBuffer value)
pApplicationName.public static void napplicationVersion(long struct,
int value)
applicationVersion.public static void npEngineName(long struct,
@Nullable
java.nio.ByteBuffer value)
pEngineName.public static void nengineVersion(long struct,
int value)
engineVersion.public static void napiVersion(long struct,
int value)
apiVersion.Copyright LWJGL. All Rights Reserved. License terms.