Top Description Inners Fields Constructors Methods
org.lwjgl.openxr

public Class XrApplicationInfo

extends Struct<XrApplicationInfo>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Structure specifying application info.
Valid Usage (Implicit)
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

XrInstanceCreateInfo

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 and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
APIVERSION

The struct member offsets.

public static final int
APPLICATIONNAME

The struct member offsets.

public static final int
APPLICATIONVERSION

The struct member offsets.

public static final int
ENGINENAME

The struct member offsets.

public static final int
ENGINEVERSION

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
XrApplicationInfo(long address, ByteBuffer container)

public
XrApplicationInfo(ByteBuffer container)

Creates a XrApplicationInfo instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
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.

public XrApplicationInfo
apiVersion(long value)

Sets the specified value to the apiVersion field.

public ByteBuffer
applicationName()

a non-empty string containing the name of the application.

public XrApplicationInfo
applicationName(ByteBuffer value)

Copies the specified encoded string to the applicationName field.

public String
applicationNameString()

a non-empty string containing the name of the application.

public int
applicationVersion()

an unsigned integer variable containing the developer-supplied version number of the application.

public XrApplicationInfo
applicationVersion(int value)

Sets the specified value to the applicationVersion field.

public static XrApplicationInfo
calloc()

Returns a new XrApplicationInfo instance allocated with memCalloc.

public static XrApplicationInfo.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new XrApplicationInfo.Buffer instance allocated with memCalloc.

public static XrApplicationInfo
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new XrApplicationInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static XrApplicationInfo.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new XrApplicationInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

protected XrApplicationInfo
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static XrApplicationInfo
create()

Returns a new XrApplicationInfo instance allocated with BufferUtils.

public static XrApplicationInfo
create(long address)

Returns a new XrApplicationInfo instance for the specified memory address.

public static XrApplicationInfo.Buffer
create(int
the buffer capacity
capacity
)

Returns a new XrApplicationInfo.Buffer instance allocated with BufferUtils.

public static XrApplicationInfo.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a XrApplicationInfo.Buffer instance at the specified memory.

public static XrApplicationInfo
createSafe(long address)

Like create, but returns null if address is NULL.

public static XrApplicationInfo.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public ByteBuffer
engineName()

a string containing the name of the engine (if any) used to create the application.

public XrApplicationInfo
engineName(ByteBuffer value)

Copies the specified encoded string to the engineName field.

public String
engineNameString()

a string containing the name of the engine (if any) used to create the application.

public int
engineVersion()

an unsigned integer variable containing the developer-supplied version number of the engine used to create the application.

public XrApplicationInfo
engineVersion(int value)

Sets the specified value to the engineVersion field.

public static XrApplicationInfo
malloc()

Returns a new XrApplicationInfo instance allocated with memAlloc.

public static XrApplicationInfo.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new XrApplicationInfo.Buffer instance allocated with memAlloc.

public static XrApplicationInfo
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new XrApplicationInfo instance allocated on the specified MemoryStack.

public static XrApplicationInfo.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new XrApplicationInfo.Buffer instance allocated on the specified MemoryStack.

public static long
napiVersion(long struct)

Unsafe version of apiVersion.

public static void
napiVersion(long struct, long value)

Unsafe version of apiVersion.

public static ByteBuffer
napplicationName(long struct)

Unsafe version of applicationName.

public static void
napplicationName(long struct, ByteBuffer value)

Unsafe version of applicationName.

public static String
napplicationNameString(long struct)

Unsafe version of applicationNameString.

public static int
napplicationVersion(long struct)

Unsafe version of applicationVersion.

public static void
napplicationVersion(long struct, int value)

Unsafe version of applicationVersion.

public static ByteBuffer
nengineName(long struct)

Unsafe version of engineName.

public static void
nengineName(long struct, ByteBuffer value)

Unsafe version of engineName.

public static String
nengineNameString(long struct)

Unsafe version of engineNameString.

public static int
nengineVersion(long struct)

Unsafe version of engineVersion.

public static void
nengineVersion(long struct, int value)

Unsafe version of engineVersion.

public XrApplicationInfo
set(ByteBuffer applicationName, int applicationVersion, ByteBuffer engineName, int engineVersion, long apiVersion)

Initializes this struct with the specified values.

public XrApplicationInfo

Returns:

this struct
set
(XrApplicationInfo
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

APIVERSIONback to summary
public static final int APIVERSION

The struct member offsets.

APPLICATIONNAMEback to summary
public static final int APPLICATIONNAME

The struct member offsets.

APPLICATIONVERSIONback to summary
public static final int APPLICATIONVERSION

The struct member offsets.

ENGINENAMEback to summary
public static final int ENGINENAME

The struct member offsets.

ENGINEVERSIONback to summary
public static final int ENGINEVERSION

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

XrApplicationInfoback to summary
protected XrApplicationInfo(long address, ByteBuffer container)
XrApplicationInfoback to summary
public XrApplicationInfo(ByteBuffer container)

Creates a XrApplicationInfo 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.

Method Detail

apiVersionback to summary
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 requested apiVersion it must return ERROR_API_VERSION_UNSUPPORTED.

Annotations
@NativeType:XrVersion
apiVersionback to summary
public XrApplicationInfo apiVersion(long value)

Sets the specified value to the apiVersion field.

applicationNameback to summary
public ByteBuffer applicationName()

a non-empty string containing the name of the application.

Annotations
@NativeType:char[XR_MAX_APPLICATION_NAME_SIZE]
applicationNameback to summary
public XrApplicationInfo applicationName(ByteBuffer value)

Copies the specified encoded string to the applicationName field.

applicationNameStringback to summary
public String applicationNameString()

a non-empty string containing the name of the application.

Annotations
@NativeType:char[XR_MAX_APPLICATION_NAME_SIZE]
applicationVersionback to summary
public int applicationVersion()

an unsigned integer variable containing the developer-supplied version number of the application.

Annotations
@NativeType:uint32_t
applicationVersionback to summary
public XrApplicationInfo applicationVersion(int value)

Sets the specified value to the applicationVersion field.

callocback to summary
public static XrApplicationInfo calloc()

Returns a new XrApplicationInfo instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static XrApplicationInfo.Buffer calloc(int capacity)

Returns a new XrApplicationInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static XrApplicationInfo calloc(MemoryStack stack)

Returns a new XrApplicationInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static XrApplicationInfo.Buffer calloc(int capacity, MemoryStack stack)

Returns a new XrApplicationInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

createback to summary
protected XrApplicationInfo create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static XrApplicationInfo create()

Returns a new XrApplicationInfo instance allocated with BufferUtils.

createback to summary
public static XrApplicationInfo create(long address)

Returns a new XrApplicationInfo instance for the specified memory address.

createback to summary
public static XrApplicationInfo.Buffer create(int capacity)

Returns a new XrApplicationInfo.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static XrApplicationInfo.Buffer create(long address, int capacity)

Create a XrApplicationInfo.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static XrApplicationInfo createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static XrApplicationInfo.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
engineNameback to summary
public ByteBuffer 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.

Annotations
@NativeType:char[XR_MAX_ENGINE_NAME_SIZE]
engineNameback to summary
public XrApplicationInfo engineName(ByteBuffer value)

Copies the specified encoded string to the engineName field.

engineNameStringback to summary
public 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.

Annotations
@NativeType:char[XR_MAX_ENGINE_NAME_SIZE]
engineVersionback to summary
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.

Annotations
@NativeType:uint32_t
engineVersionback to summary
public XrApplicationInfo engineVersion(int value)

Sets the specified value to the engineVersion field.

mallocback to summary
public static XrApplicationInfo malloc()

Returns a new XrApplicationInfo instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static XrApplicationInfo.Buffer malloc(int capacity)

Returns a new XrApplicationInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static XrApplicationInfo malloc(MemoryStack stack)

Returns a new XrApplicationInfo instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static XrApplicationInfo.Buffer malloc(int capacity, MemoryStack stack)

Returns a new XrApplicationInfo.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

napiVersionback to summary
public static long napiVersion(long struct)

Unsafe version of apiVersion.

napiVersionback to summary
public static void napiVersion(long struct, long value)

Unsafe version of apiVersion.

napplicationNameback to summary
public static ByteBuffer napplicationName(long struct)

Unsafe version of applicationName.

napplicationNameback to summary
public static void napplicationName(long struct, ByteBuffer value)

Unsafe version of applicationName.

napplicationNameStringback to summary
public static String napplicationNameString(long struct)

Unsafe version of applicationNameString.

napplicationVersionback to summary
public static int napplicationVersion(long struct)

Unsafe version of applicationVersion.

napplicationVersionback to summary
public static void napplicationVersion(long struct, int value)

Unsafe version of applicationVersion.

nengineNameback to summary
public static ByteBuffer nengineName(long struct)

Unsafe version of engineName.

nengineNameback to summary
public static void nengineName(long struct, ByteBuffer value)

Unsafe version of engineName.

nengineNameStringback to summary
public static String nengineNameString(long struct)

Unsafe version of engineNameString.

nengineVersionback to summary
public static int nengineVersion(long struct)

Unsafe version of engineVersion.

nengineVersionback to summary
public static void nengineVersion(long struct, int value)

Unsafe version of engineVersion.

setback to summary
public XrApplicationInfo set(ByteBuffer applicationName, int applicationVersion, ByteBuffer engineName, int engineVersion, long apiVersion)

Initializes this struct with the specified values.

setback to summary
public XrApplicationInfo set(XrApplicationInfo src)

Copies the specified struct data to this struct.

Parameters
src:XrApplicationInfo

the source struct

Returns:XrApplicationInfo

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
org.lwjgl.openxr back to summary

public Class XrApplicationInfo.Buffer

extends StructBuffer<XrApplicationInfo, XrApplicationInfo.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of XrApplicationInfo structs.

Field Summary

Modifier and TypeField and Description
private static final XrApplicationInfo

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new XrApplicationInfo.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

the value of the XrApplicationInfo#apiVersion field.
apiVersion
()

public XrApplicationInfo.Buffer
apiVersion(long value)

Sets the specified value to the XrApplicationInfo#apiVersion field.

public ByteBuffer
public XrApplicationInfo.Buffer
applicationName(ByteBuffer value)

Copies the specified encoded string to the XrApplicationInfo#applicationName field.

public String

Returns:

the null-terminated string stored in the XrApplicationInfo#applicationName field.
applicationNameString
()

public int

Returns:

the value of the XrApplicationInfo#applicationVersion field.
applicationVersion
()

public XrApplicationInfo.Buffer
applicationVersion(int value)

Sets the specified value to the XrApplicationInfo#applicationVersion field.

public ByteBuffer

Returns:

a ByteBuffer view of the XrApplicationInfo#engineName field.
engineName
()

public XrApplicationInfo.Buffer
engineName(ByteBuffer value)

Copies the specified encoded string to the XrApplicationInfo#engineName field.

public String

Returns:

the null-terminated string stored in the XrApplicationInfo#engineName field.
engineNameString
()

public int

Returns:

the value of the XrApplicationInfo#engineVersion field.
engineVersion
()

public XrApplicationInfo.Buffer
engineVersion(int value)

Sets the specified value to the XrApplicationInfo#engineVersion field.

protected XrApplicationInfo
protected XrApplicationInfo.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final XrApplicationInfo ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new XrApplicationInfo.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by XrApplicationInfo#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

apiVersionback to summary
public long apiVersion()
Returns:long

the value of the XrApplicationInfo#apiVersion field.

Annotations
@NativeType:XrVersion
apiVersionback to summary
public XrApplicationInfo.Buffer apiVersion(long value)

Sets the specified value to the XrApplicationInfo#apiVersion field.

applicationNameback to summary
public ByteBuffer applicationName()
Returns:ByteBuffer

a ByteBuffer view of the XrApplicationInfo#applicationName field.

Annotations
@NativeType:char[XR_MAX_APPLICATION_NAME_SIZE]
applicationNameback to summary
public XrApplicationInfo.Buffer applicationName(ByteBuffer value)

Copies the specified encoded string to the XrApplicationInfo#applicationName field.

applicationNameStringback to summary
public String applicationNameString()
Returns:String

the null-terminated string stored in the XrApplicationInfo#applicationName field.

Annotations
@NativeType:char[XR_MAX_APPLICATION_NAME_SIZE]
applicationVersionback to summary
public int applicationVersion()
Returns:int

the value of the XrApplicationInfo#applicationVersion field.

Annotations
@NativeType:uint32_t
applicationVersionback to summary
public XrApplicationInfo.Buffer applicationVersion(int value)

Sets the specified value to the XrApplicationInfo#applicationVersion field.

engineNameback to summary
public ByteBuffer engineName()
Returns:ByteBuffer

a ByteBuffer view of the XrApplicationInfo#engineName field.

Annotations
@NativeType:char[XR_MAX_ENGINE_NAME_SIZE]
engineNameback to summary
public XrApplicationInfo.Buffer engineName(ByteBuffer value)

Copies the specified encoded string to the XrApplicationInfo#engineName field.

engineNameStringback to summary
public String engineNameString()
Returns:String

the null-terminated string stored in the XrApplicationInfo#engineName field.

Annotations
@NativeType:char[XR_MAX_ENGINE_NAME_SIZE]
engineVersionback to summary
public int engineVersion()
Returns:int

the value of the XrApplicationInfo#engineVersion field.

Annotations
@NativeType:uint32_t
engineVersionback to summary
public XrApplicationInfo.Buffer engineVersion(int value)

Sets the specified value to the XrApplicationInfo#engineVersion field.

getElementFactoryback to summary
protected XrApplicationInfo getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
selfback to summary
protected XrApplicationInfo.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override