Class VkApplicationInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkApplicationInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkApplicationInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying application info.Description
Vulkan 1.0 implementations were required to return
ERROR_INCOMPATIBLE_DRIVER
ifapiVersion
was larger than 1.0. Implementations that support Vulkan 1.1 or later must not returnERROR_INCOMPATIBLE_DRIVER
for any value ofapiVersion
.Note
Because Vulkan 1.0 implementations may fail with
ERROR_INCOMPATIBLE_DRIVER
, applications should determine the version of Vulkan available before callingCreateInstance
. If theGetInstanceProcAddr
returnsNULL
forEnumerateInstanceVersion
, it is a Vulkan 1.0 implementation. Otherwise, the application can callEnumerateInstanceVersion
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 a hypothetical 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.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.Note
Providing a
NULL
VkInstanceCreateInfo
::pApplicationInfo
or providing anapiVersion
of 0 is equivalent to providing anapiVersion
ofVK_MAKE_VERSION(1,0,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
Member documentation
sType
– 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 inapiVersion
is ignored when creating an instance object. Only the major and minor versions of the instance must match those requested inapiVersion
.
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 Modifier and Type Class Description static class
VkApplicationInfo.Buffer
An array ofVkApplicationInfo
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
APIVERSION
APPLICATIONVERSION
ENGINEVERSION
PAPPLICATIONNAME
PENGINENAME
PNEXTThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STYPE
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkApplicationInfo(java.nio.ByteBuffer container)
Creates aVkApplicationInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
apiVersion()
Returns the value of theapiVersion
field.VkApplicationInfo
apiVersion(int value)
Sets the specified value to theapiVersion
field.int
applicationVersion()
Returns the value of theapplicationVersion
field.VkApplicationInfo
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
callocStack()
Returns a newVkApplicationInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkApplicationInfo.Buffer
callocStack(int capacity)
Returns a newVkApplicationInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkApplicationInfo.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkApplicationInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkApplicationInfo
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkApplicationInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.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
engineVersion()
Returns the value of theengineVersion
field.VkApplicationInfo
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
mallocStack()
Returns a newVkApplicationInfo
instance allocated on the thread-localMemoryStack
.static VkApplicationInfo.Buffer
mallocStack(int capacity)
Returns a newVkApplicationInfo.Buffer
instance allocated on the thread-localMemoryStack
.static VkApplicationInfo.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkApplicationInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkApplicationInfo
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkApplicationInfo
instance allocated on the specifiedMemoryStack
.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 java.nio.ByteBuffer
npApplicationName(long struct)
Unsafe version ofpApplicationName()
.static void
npApplicationName(long struct, java.nio.ByteBuffer value)
Unsafe version ofpApplicationName
.static java.lang.String
npApplicationNameString(long struct)
Unsafe version ofpApplicationNameString()
.static java.nio.ByteBuffer
npEngineName(long struct)
Unsafe version ofpEngineName()
.static void
npEngineName(long struct, java.nio.ByteBuffer value)
Unsafe version ofpEngineName
.static java.lang.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
.java.nio.ByteBuffer
pApplicationName()
Returns aByteBuffer
view of the null-terminated string pointed to by thepApplicationName
field.VkApplicationInfo
pApplicationName(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thepApplicationName
field.java.lang.String
pApplicationNameString()
Decodes the null-terminated string pointed to by thepApplicationName
field.java.nio.ByteBuffer
pEngineName()
Returns aByteBuffer
view of the null-terminated string pointed to by thepEngineName
field.VkApplicationInfo
pEngineName(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thepEngineName
field.java.lang.String
pEngineNameString()
Decodes the null-terminated string pointed to by thepEngineName
field.long
pNext()
Returns the value of thepNext
field.VkApplicationInfo
pNext(long value)
Sets the specified value to thepNext
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 thesType
field.VkApplicationInfo
sType(int value)
Sets the specified value to thesType
field.
-
-
-
Constructor Detail
-
VkApplicationInfo
public VkApplicationInfo(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
pApplicationName
@Nullable public java.nio.ByteBuffer pApplicationName()
Returns aByteBuffer
view of the null-terminated string pointed to by thepApplicationName
field.
-
pApplicationNameString
@Nullable public java.lang.String pApplicationNameString()
Decodes the null-terminated string pointed to by thepApplicationName
field.
-
applicationVersion
public int applicationVersion()
Returns the value of theapplicationVersion
field.
-
pEngineName
@Nullable public java.nio.ByteBuffer pEngineName()
Returns aByteBuffer
view of the null-terminated string pointed to by thepEngineName
field.
-
pEngineNameString
@Nullable public java.lang.String pEngineNameString()
Decodes the null-terminated string pointed to by thepEngineName
field.
-
engineVersion
public int engineVersion()
Returns the value of theengineVersion
field.
-
apiVersion
public int apiVersion()
Returns the value of theapiVersion
field.
-
sType
public VkApplicationInfo sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkApplicationInfo pNext(long value)
Sets the specified value to thepNext
field.
-
pApplicationName
public VkApplicationInfo pApplicationName(@Nullable java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thepApplicationName
field.
-
applicationVersion
public VkApplicationInfo applicationVersion(int value)
Sets the specified value to theapplicationVersion
field.
-
pEngineName
public VkApplicationInfo pEngineName(@Nullable java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thepEngineName
field.
-
engineVersion
public VkApplicationInfo engineVersion(int value)
Sets the specified value to theengineVersion
field.
-
apiVersion
public VkApplicationInfo apiVersion(int value)
Sets the specified value to theapiVersion
field.
-
set
public VkApplicationInfo set(int sType, long pNext, @Nullable java.nio.ByteBuffer pApplicationName, int applicationVersion, @Nullable java.nio.ByteBuffer pEngineName, int engineVersion, int apiVersion)
Initializes this struct with the specified values.
-
set
public VkApplicationInfo set(VkApplicationInfo src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkApplicationInfo malloc()
Returns a newVkApplicationInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkApplicationInfo calloc()
Returns a newVkApplicationInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkApplicationInfo create()
Returns a newVkApplicationInfo
instance allocated withBufferUtils
.
-
create
public static VkApplicationInfo create(long address)
Returns a newVkApplicationInfo
instance for the specified memory address.
-
createSafe
@Nullable public static VkApplicationInfo createSafe(long address)
-
malloc
public static VkApplicationInfo.Buffer malloc(int capacity)
Returns a newVkApplicationInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkApplicationInfo.Buffer calloc(int capacity)
Returns a newVkApplicationInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkApplicationInfo.Buffer create(int capacity)
Returns a newVkApplicationInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkApplicationInfo.Buffer create(long address, int capacity)
Create aVkApplicationInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkApplicationInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkApplicationInfo mallocStack()
Returns a newVkApplicationInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkApplicationInfo callocStack()
Returns a newVkApplicationInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkApplicationInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkApplicationInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkApplicationInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkApplicationInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkApplicationInfo.Buffer mallocStack(int capacity)
Returns a newVkApplicationInfo.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkApplicationInfo.Buffer callocStack(int capacity)
Returns a newVkApplicationInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkApplicationInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkApplicationInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkApplicationInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkApplicationInfo.Buffer
instance allocated on the specifiedMemoryStack
and 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()
.
-
npApplicationName
@Nullable public static java.nio.ByteBuffer npApplicationName(long struct)
Unsafe version ofpApplicationName()
.
-
npApplicationNameString
@Nullable public static java.lang.String npApplicationNameString(long struct)
Unsafe version ofpApplicationNameString()
.
-
napplicationVersion
public static int napplicationVersion(long struct)
Unsafe version ofapplicationVersion()
.
-
npEngineName
@Nullable public static java.nio.ByteBuffer npEngineName(long struct)
Unsafe version ofpEngineName()
.
-
npEngineNameString
@Nullable public static java.lang.String npEngineNameString(long struct)
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
public static void npApplicationName(long struct, @Nullable java.nio.ByteBuffer value)
Unsafe version ofpApplicationName
.
-
napplicationVersion
public static void napplicationVersion(long struct, int value)
Unsafe version ofapplicationVersion
.
-
npEngineName
public static void npEngineName(long struct, @Nullable java.nio.ByteBuffer value)
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
.
-
-