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.NativeResourceStructure specifying application info.Description
Vulkan 1.0 implementations were required to return
ERROR_INCOMPATIBLE_DRIVERifapiVersionwas larger than 1.0. Implementations that support Vulkan 1.1 or later must not returnERROR_INCOMPATIBLE_DRIVERfor 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 theGetInstanceProcAddrreturnsNULLforEnumerateInstanceVersion, it is a Vulkan 1.0 implementation. Otherwise, the application can callEnumerateInstanceVersionto 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
apiVersionas 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
apiVersionto 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
apiVersionto 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
NULLVkInstanceCreateInfo::pApplicationInfoor providing anapiVersionof 0 is equivalent to providing anapiVersionofVK_MAKE_VERSION(1,0,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
Member documentation
sType– the type of this structure.pNext–NULLor a pointer to an extension-specific structure.pApplicationName–NULLor 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–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– 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 inapiVersionis 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 classVkApplicationInfo.BufferAn array ofVkApplicationInfostructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intAPIVERSION
APPLICATIONVERSION
ENGINEVERSION
PAPPLICATIONNAME
PENGINENAME
PNEXTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkApplicationInfo(java.nio.ByteBuffer container)Creates aVkApplicationInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intapiVersion()Returns the value of theapiVersionfield.VkApplicationInfoapiVersion(int value)Sets the specified value to theapiVersionfield.intapplicationVersion()Returns the value of theapplicationVersionfield.VkApplicationInfoapplicationVersion(int value)Sets the specified value to theapplicationVersionfield.static VkApplicationInfocalloc()Returns a newVkApplicationInfoinstance allocated withmemCalloc.static VkApplicationInfo.Buffercalloc(int capacity)Returns a newVkApplicationInfo.Bufferinstance allocated withmemCalloc.static VkApplicationInfocallocStack()Returns a newVkApplicationInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkApplicationInfo.BuffercallocStack(int capacity)Returns a newVkApplicationInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkApplicationInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkApplicationInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkApplicationInfocallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkApplicationInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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 VkApplicationInfocreateSafe(long address)static VkApplicationInfo.BuffercreateSafe(long address, int capacity)intengineVersion()Returns the value of theengineVersionfield.VkApplicationInfoengineVersion(int value)Sets the specified value to theengineVersionfield.static VkApplicationInfomalloc()Returns a newVkApplicationInfoinstance allocated withmemAlloc.static VkApplicationInfo.Buffermalloc(int capacity)Returns a newVkApplicationInfo.Bufferinstance allocated withmemAlloc.static VkApplicationInfomallocStack()Returns a newVkApplicationInfoinstance allocated on the thread-localMemoryStack.static VkApplicationInfo.BuffermallocStack(int capacity)Returns a newVkApplicationInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkApplicationInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkApplicationInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkApplicationInfomallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkApplicationInfoinstance allocated on the specifiedMemoryStack.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 java.nio.ByteBuffernpApplicationName(long struct)Unsafe version ofpApplicationName().static voidnpApplicationName(long struct, java.nio.ByteBuffer value)Unsafe version ofpApplicationName.static java.lang.StringnpApplicationNameString(long struct)Unsafe version ofpApplicationNameString().static java.nio.ByteBuffernpEngineName(long struct)Unsafe version ofpEngineName().static voidnpEngineName(long struct, java.nio.ByteBuffer value)Unsafe version ofpEngineName.static java.lang.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.java.nio.ByteBufferpApplicationName()Returns aByteBufferview of the null-terminated string pointed to by thepApplicationNamefield.VkApplicationInfopApplicationName(java.nio.ByteBuffer value)Sets the address of the specified encoded string to thepApplicationNamefield.java.lang.StringpApplicationNameString()Decodes the null-terminated string pointed to by thepApplicationNamefield.java.nio.ByteBufferpEngineName()Returns aByteBufferview of the null-terminated string pointed to by thepEngineNamefield.VkApplicationInfopEngineName(java.nio.ByteBuffer value)Sets the address of the specified encoded string to thepEngineNamefield.java.lang.StringpEngineNameString()Decodes the null-terminated string pointed to by thepEngineNamefield.longpNext()Returns the value of thepNextfield.VkApplicationInfopNext(long value)Sets the specified value to thepNextfield.VkApplicationInfoset(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.VkApplicationInfoset(VkApplicationInfo src)Copies the specified struct data to this struct.intsizeof()intsType()Returns the value of thesTypefield.VkApplicationInfosType(int value)Sets the specified value to thesTypefield.
-
-
-
Constructor Detail
-
VkApplicationInfo
public VkApplicationInfo(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
pApplicationName
@Nullable public java.nio.ByteBuffer pApplicationName()
Returns aByteBufferview of the null-terminated string pointed to by thepApplicationNamefield.
-
pApplicationNameString
@Nullable public java.lang.String pApplicationNameString()
Decodes the null-terminated string pointed to by thepApplicationNamefield.
-
applicationVersion
public int applicationVersion()
Returns the value of theapplicationVersionfield.
-
pEngineName
@Nullable public java.nio.ByteBuffer pEngineName()
Returns aByteBufferview of the null-terminated string pointed to by thepEngineNamefield.
-
pEngineNameString
@Nullable public java.lang.String pEngineNameString()
Decodes the null-terminated string pointed to by thepEngineNamefield.
-
engineVersion
public int engineVersion()
Returns the value of theengineVersionfield.
-
apiVersion
public int apiVersion()
Returns the value of theapiVersionfield.
-
sType
public VkApplicationInfo sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkApplicationInfo pNext(long value)
Sets the specified value to thepNextfield.
-
pApplicationName
public VkApplicationInfo pApplicationName(@Nullable java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thepApplicationNamefield.
-
applicationVersion
public VkApplicationInfo applicationVersion(int value)
Sets the specified value to theapplicationVersionfield.
-
pEngineName
public VkApplicationInfo pEngineName(@Nullable java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thepEngineNamefield.
-
engineVersion
public VkApplicationInfo engineVersion(int value)
Sets the specified value to theengineVersionfield.
-
apiVersion
public VkApplicationInfo apiVersion(int value)
Sets the specified value to theapiVersionfield.
-
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 newVkApplicationInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkApplicationInfo calloc()
Returns a newVkApplicationInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkApplicationInfo create()
Returns a newVkApplicationInfoinstance allocated withBufferUtils.
-
create
public static VkApplicationInfo create(long address)
Returns a newVkApplicationInfoinstance for the specified memory address.
-
createSafe
@Nullable public static VkApplicationInfo createSafe(long address)
-
malloc
public static VkApplicationInfo.Buffer malloc(int capacity)
Returns a newVkApplicationInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkApplicationInfo.Buffer calloc(int capacity)
Returns a newVkApplicationInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkApplicationInfo.Buffer create(int capacity)
Returns a newVkApplicationInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkApplicationInfo.Buffer create(long address, int capacity)
Create aVkApplicationInfo.Bufferinstance 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 newVkApplicationInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkApplicationInfo callocStack()
Returns a newVkApplicationInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkApplicationInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkApplicationInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkApplicationInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkApplicationInfoinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkApplicationInfo.Buffer callocStack(int capacity)
Returns a newVkApplicationInfo.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.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().
-
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.
-
-