Class 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.NativeResource
    Structure specifying application info.
    Valid Usage (Implicit)
    • applicationName must be a null-terminated UTF-8 string whose length is less than or equal to MAX_APPLICATION_NAME_SIZE
    • engineName must be a null-terminated UTF-8 string whose length is less than or equal to MAX_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

    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();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • APPLICATIONNAME, APPLICATIONVERSION, ENGINENAME, ENGINEVERSION, APIVERSION

        The struct member offsets.
    • Constructor Detail

      • XrApplicationInfo

        public XrApplicationInfo​(java.nio.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

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.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.
      • 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.
      • malloc

        public static XrApplicationInfo malloc()
        Returns a new XrApplicationInfo instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static XrApplicationInfo calloc()
        Returns a new XrApplicationInfo instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static XrApplicationInfo create()
        Returns a new XrApplicationInfo instance allocated with BufferUtils.
      • create

        public static XrApplicationInfo create​(long address)
        Returns a new XrApplicationInfo instance for the specified memory address.
      • createSafe

        @Nullable
        public static XrApplicationInfo createSafe​(long address)
        Like create, but returns null if address is NULL.
      • createSafe

        @Nullable
        public static XrApplicationInfo.Buffer createSafe​(long address,
                                                          int capacity)
        Like create, but returns null if address is NULL.
      • malloc

        public static XrApplicationInfo malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new XrApplicationInfo instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

        public static XrApplicationInfo calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new XrApplicationInfo instance allocated on the specified MemoryStack and 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 new XrApplicationInfo.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static XrApplicationInfo.Buffer calloc​(int capacity,
                                                      org.lwjgl.system.MemoryStack stack)
        Returns a new XrApplicationInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • napplicationName

        public static java.nio.ByteBuffer napplicationName​(long struct)
        Unsafe version of applicationName().
      • napplicationNameString

        public static java.lang.String napplicationNameString​(long struct)
        Unsafe version of applicationNameString().
      • napplicationVersion

        public static int napplicationVersion​(long struct)
        Unsafe version of applicationVersion().
      • nengineName

        public static java.nio.ByteBuffer nengineName​(long struct)
        Unsafe version of engineName().
      • nengineNameString

        public static java.lang.String nengineNameString​(long struct)
        Unsafe version of engineNameString().
      • nengineVersion

        public static int nengineVersion​(long struct)
        Unsafe version of engineVersion().
      • napiVersion

        public static long napiVersion​(long struct)
        Unsafe version of apiVersion().
      • napplicationName

        public static void napplicationName​(long struct,
                                            java.nio.ByteBuffer value)
        Unsafe version of applicationName.
      • napplicationVersion

        public static void napplicationVersion​(long struct,
                                               int value)
        Unsafe version of applicationVersion.
      • nengineName

        public static void nengineName​(long struct,
                                       java.nio.ByteBuffer value)
        Unsafe version of engineName.
      • nengineVersion

        public static void nengineVersion​(long struct,
                                          int value)
        Unsafe version of engineVersion.
      • napiVersion

        public static void napiVersion​(long struct,
                                       long value)
        Unsafe version of apiVersion.