Class XrApplicationInfo
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
Useful values for apiVersion include API_VERSION_1_0 and API_VERSION_1_1.
Valid Usage (Implicit)
applicationNamemust be a null-terminated UTF-8 string whose length is less than or equal toMAX_APPLICATION_NAME_SIZEengineNamemust be a null-terminated UTF-8 string whose length is less than or equal toMAX_ENGINE_NAME_SIZE
Note
When using the OpenXR API to implement a reusable engine that will be used by many applications, engineName should be set to a unique string that identifies the engine, and engineVersion should encode a representation of the engine’s version. This way, all applications that share this engine version will provide the same engineName and engineVersion to the runtime. The engine should then enable individual applications to choose their specific applicationName and applicationVersion, enabling one application to be distinguished from another application.
When using the OpenXR API to implement an individual application without a shared engine, the input engineName should be left empty and engineVersion should be set to 0. The applicationName should then be filled in with a unique string that identifies the app and the applicationVersion should encode a representation of the application’s version.
See Also
API_VERSION_1_0, API_VERSION_1_1, XrInstanceCreateInfo, CreateInstance
Layout
struct XrApplicationInfo {
char applicationName()[XR_MAX_APPLICATION_NAME_SIZE];
uint32_t applicationVersion();
char engineName()[XR_MAX_ENGINE_NAME_SIZE];
uint32_t engineVersion();
XrVersion 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 size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionXrApplicationInfo(ByteBuffer container) Creates aXrApplicationInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionlongthe version of this API against which the application will run, encoded as described in the API Version Numbers and Semantics section.apiVersion(long value) Sets the specified value to theapiVersion()field.a non-empty string containing the name of the application.applicationName(ByteBuffer value) Copies the specified encoded string to theapplicationName()field.a non-empty string containing the name of the application.intan unsigned integer variable containing the developer-supplied version number of the application.applicationVersion(int value) Sets the specified value to theapplicationVersion()field.static XrApplicationInfocalloc()Returns a newXrApplicationInfoinstance allocated withmemCalloc.static XrApplicationInfo.Buffercalloc(int capacity) Returns a newXrApplicationInfo.Bufferinstance allocated withmemCalloc.static XrApplicationInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrApplicationInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrApplicationInfocalloc(org.lwjgl.system.MemoryStack stack) Returns a newXrApplicationInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrApplicationInfocreate()Returns a newXrApplicationInfoinstance allocated withBufferUtils.static XrApplicationInfo.Buffercreate(int capacity) Returns a newXrApplicationInfo.Bufferinstance allocated withBufferUtils.static XrApplicationInfocreate(long address) Returns a newXrApplicationInfoinstance for the specified memory address.static XrApplicationInfo.Buffercreate(long address, int capacity) Create aXrApplicationInfo.Bufferinstance at the specified memory.static @Nullable XrApplicationInfocreateSafe(long address) static @Nullable XrApplicationInfo.BuffercreateSafe(long address, int capacity) a string containing the name of the engine (if any) used to create the application.engineName(ByteBuffer value) Copies the specified encoded string to theengineName()field.a string containing the name of the engine (if any) used to create the application.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 XrApplicationInfomalloc()Returns a newXrApplicationInfoinstance allocated withmemAlloc.static XrApplicationInfo.Buffermalloc(int capacity) Returns a newXrApplicationInfo.Bufferinstance allocated withmemAlloc.static XrApplicationInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrApplicationInfo.Bufferinstance allocated on the specifiedMemoryStack.static XrApplicationInfomalloc(org.lwjgl.system.MemoryStack stack) Returns a newXrApplicationInfoinstance allocated on the specifiedMemoryStack.static longnapiVersion(long struct) Unsafe version ofapiVersion().static voidnapiVersion(long struct, long value) Unsafe version ofapiVersion.static ByteBuffernapplicationName(long struct) Unsafe version ofapplicationName().static voidnapplicationName(long struct, ByteBuffer value) Unsafe version ofapplicationName.static StringnapplicationNameString(long struct) Unsafe version ofapplicationNameString().static intnapplicationVersion(long struct) Unsafe version ofapplicationVersion().static voidnapplicationVersion(long struct, int value) Unsafe version ofapplicationVersion.static ByteBuffernengineName(long struct) Unsafe version ofengineName().static voidnengineName(long struct, ByteBuffer value) Unsafe version ofengineName.static StringnengineNameString(long struct) Unsafe version ofengineNameString().static intnengineVersion(long struct) Unsafe version ofengineVersion().static voidnengineVersion(long struct, int value) Unsafe version ofengineVersion.set(ByteBuffer applicationName, int applicationVersion, ByteBuffer engineName, int engineVersion, long apiVersion) Initializes this struct with the specified values.set(XrApplicationInfo src) Copies the specified struct data to this struct.intsizeof()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. -
APPLICATIONNAME
public static final int APPLICATIONNAMEThe struct member offsets. -
APPLICATIONVERSION
public static final int APPLICATIONVERSIONThe struct member offsets. -
ENGINENAME
public static final int ENGINENAMEThe struct member offsets. -
ENGINEVERSION
public static final int ENGINEVERSIONThe struct member offsets. -
APIVERSION
public static final int APIVERSIONThe struct member offsets.
-
-
Constructor Details
-
XrApplicationInfo
Creates aXrApplicationInfoinstance 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<XrApplicationInfo>
-
applicationName
a non-empty string containing the name of the application. -
applicationNameString
a non-empty string containing the name of the application. -
applicationVersion
public int applicationVersion()an unsigned integer variable containing the developer-supplied version number of the application. -
engineName
a string containing the name of the engine (if any) used to create the application. It may be empty to indicate no specified engine. -
engineNameString
a string containing the name of the engine (if any) used to create the application. It may be empty to indicate no specified engine. -
engineVersion
public int engineVersion()an unsigned integer variable containing the developer-supplied version number of the engine used to create the application. May be zero to indicate no specified engine. -
apiVersion
public long apiVersion()the version of this API against which the application will run, encoded as described in the API Version Numbers and Semantics section. If the runtime does not support the requestedapiVersionit must returnERROR_API_VERSION_UNSUPPORTED. -
applicationName
Copies the specified encoded string to theapplicationName()field. -
applicationVersion
Sets the specified value to theapplicationVersion()field. -
engineName
Copies the specified encoded string to theengineName()field. -
engineVersion
Sets the specified value to theengineVersion()field. -
apiVersion
Sets the specified value to theapiVersion()field. -
set
public XrApplicationInfo set(ByteBuffer applicationName, int applicationVersion, ByteBuffer engineName, int engineVersion, long 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 newXrApplicationInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newXrApplicationInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newXrApplicationInfoinstance allocated withBufferUtils. -
create
Returns a newXrApplicationInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newXrApplicationInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newXrApplicationInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newXrApplicationInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aXrApplicationInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newXrApplicationInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newXrApplicationInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newXrApplicationInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newXrApplicationInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
napplicationName
Unsafe version ofapplicationName(). -
napplicationNameString
Unsafe version ofapplicationNameString(). -
napplicationVersion
public static int napplicationVersion(long struct) Unsafe version ofapplicationVersion(). -
nengineName
Unsafe version ofengineName(). -
nengineNameString
Unsafe version ofengineNameString(). -
nengineVersion
public static int nengineVersion(long struct) Unsafe version ofengineVersion(). -
napiVersion
public static long napiVersion(long struct) Unsafe version ofapiVersion(). -
napplicationName
Unsafe version ofapplicationName. -
napplicationVersion
public static void napplicationVersion(long struct, int value) Unsafe version ofapplicationVersion. -
nengineName
Unsafe version ofengineName. -
nengineVersion
public static void nengineVersion(long struct, int value) Unsafe version ofengineVersion. -
napiVersion
public static void napiVersion(long struct, long value) Unsafe version ofapiVersion.
-