Class XrApplicationInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrApplicationInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrApplicationInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying application info.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,
engineNameshould be set to a unique string that identifies the engine, andengineVersionshould encode a representation of the engine’s version. This way, all applications that share this engine version will provide the sameengineNameandengineVersionto the runtime. The engine should then enable individual applications to choose their specificapplicationNameandapplicationVersion, 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
engineNameshould be left empty andengineVersionshould be set to 0. TheapplicationNameshould then be filled in with a unique string that identifies the app and theapplicationVersionshould encode a representation of the application’s version.See Also
Layout
struct XrApplicationInfo { charapplicationName()[XR_MAX_APPLICATION_NAME_SIZE]; uint32_tapplicationVersion(); charengineName()[XR_MAX_ENGINE_NAME_SIZE]; uint32_tengineVersion(); XrVersionapiVersion(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrApplicationInfo.BufferAn array ofXrApplicationInfostructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intAPIVERSION
APPLICATIONNAME
APPLICATIONVERSION
ENGINENAME
ENGINEVERSIONThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description XrApplicationInfo(java.nio.ByteBuffer container)Creates aXrApplicationInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longapiVersion()the version of this API against which the application will run, encoded as described in the API Version Numbers and Semantics section.XrApplicationInfoapiVersion(long value)Sets the specified value to theapiVersion()field.java.nio.ByteBufferapplicationName()a non-empty string containing the name of the application.XrApplicationInfoapplicationName(java.nio.ByteBuffer value)Copies the specified encoded string to theapplicationName()field.java.lang.StringapplicationNameString()a non-empty string containing the name of the application.intapplicationVersion()an unsigned integer variable containing the developer-supplied version number of the application.XrApplicationInfoapplicationVersion(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 XrApplicationInfocreateSafe(long address)static XrApplicationInfo.BuffercreateSafe(long address, int capacity)java.nio.ByteBufferengineName()a string containing the name of the engine (if any) used to create the application.XrApplicationInfoengineName(java.nio.ByteBuffer value)Copies the specified encoded string to theengineName()field.java.lang.StringengineNameString()a string containing the name of the engine (if any) used to create the application.intengineVersion()an unsigned integer variable containing the developer-supplied version number of the engine used to create the application.XrApplicationInfoengineVersion(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 java.nio.ByteBuffernapplicationName(long struct)Unsafe version ofapplicationName().static voidnapplicationName(long struct, java.nio.ByteBuffer value)Unsafe version ofapplicationName.static java.lang.StringnapplicationNameString(long struct)Unsafe version ofapplicationNameString().static intnapplicationVersion(long struct)Unsafe version ofapplicationVersion().static voidnapplicationVersion(long struct, int value)Unsafe version ofapplicationVersion.static java.nio.ByteBuffernengineName(long struct)Unsafe version ofengineName().static voidnengineName(long struct, java.nio.ByteBuffer value)Unsafe version ofengineName.static java.lang.StringnengineNameString(long struct)Unsafe version ofengineNameString().static intnengineVersion(long struct)Unsafe version ofengineVersion().static voidnengineVersion(long struct, int value)Unsafe version ofengineVersion.XrApplicationInfoset(java.nio.ByteBuffer applicationName, int applicationVersion, java.nio.ByteBuffer engineName, int engineVersion, long apiVersion)Initializes this struct with the specified values.XrApplicationInfoset(XrApplicationInfo src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
XrApplicationInfo
public XrApplicationInfo(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
applicationName, applicationNameString
public java.nio.ByteBuffer applicationName() public java.lang.String 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, engineNameString
public java.nio.ByteBuffer engineName() public java.lang.String 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
public XrApplicationInfo applicationName(java.nio.ByteBuffer value)
Copies the specified encoded string to theapplicationName()field.
-
applicationVersion
public XrApplicationInfo applicationVersion(int value)
Sets the specified value to theapplicationVersion()field.
-
engineName
public XrApplicationInfo engineName(java.nio.ByteBuffer value)
Copies the specified encoded string to theengineName()field.
-
engineVersion
public XrApplicationInfo engineVersion(int value)
Sets the specified value to theengineVersion()field.
-
apiVersion
public XrApplicationInfo apiVersion(long value)
Sets the specified value to theapiVersion()field.
-
set
public XrApplicationInfo set(java.nio.ByteBuffer applicationName, int applicationVersion, java.nio.ByteBuffer engineName, int engineVersion, long apiVersion)
Initializes this struct with the specified values.
-
set
public XrApplicationInfo set(XrApplicationInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrApplicationInfo malloc()
Returns a newXrApplicationInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrApplicationInfo calloc()
Returns a newXrApplicationInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrApplicationInfo create()
Returns a newXrApplicationInfoinstance allocated withBufferUtils.
-
create
public static XrApplicationInfo create(long address)
Returns a newXrApplicationInfoinstance for the specified memory address.
-
createSafe
@Nullable public static XrApplicationInfo createSafe(long address)
-
malloc
public static XrApplicationInfo.Buffer malloc(int capacity)
Returns a newXrApplicationInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrApplicationInfo.Buffer calloc(int capacity)
Returns a newXrApplicationInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrApplicationInfo.Buffer create(int capacity)
Returns a newXrApplicationInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrApplicationInfo.Buffer create(long address, int capacity)
Create aXrApplicationInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrApplicationInfo.Buffer createSafe(long address, int capacity)
-
malloc
public static XrApplicationInfo malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrApplicationInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrApplicationInfo calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrApplicationInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrApplicationInfo.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrApplicationInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrApplicationInfo.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrApplicationInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
napplicationName
public static java.nio.ByteBuffer napplicationName(long struct)
Unsafe version ofapplicationName().
-
napplicationNameString
public static java.lang.String napplicationNameString(long struct)
Unsafe version ofapplicationNameString().
-
napplicationVersion
public static int napplicationVersion(long struct)
Unsafe version ofapplicationVersion().
-
nengineName
public static java.nio.ByteBuffer nengineName(long struct)
Unsafe version ofengineName().
-
nengineNameString
public static java.lang.String nengineNameString(long struct)
Unsafe version ofengineNameString().
-
nengineVersion
public static int nengineVersion(long struct)
Unsafe version ofengineVersion().
-
napiVersion
public static long napiVersion(long struct)
Unsafe version ofapiVersion().
-
napplicationName
public static void napplicationName(long struct, java.nio.ByteBuffer value)Unsafe version ofapplicationName.
-
napplicationVersion
public static void napplicationVersion(long struct, int value)Unsafe version ofapplicationVersion.
-
nengineName
public static void nengineName(long struct, java.nio.ByteBuffer value)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.
-
-