Package org.lwjgl.ovr

Class OVRInitParams

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer


    public class OVRInitParams
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Parameters for Initialize.

    Member documentation

    • Flags – flags from ovrInitFlags to override default behavior. Use 0 for the defaults.
    • RequestedMinorVersion – requests a specific minor version of the LibOVR runtime. Flags must include Init_RequestVersion or this will be ignored and MINOR_VERSION will be used. If you are directly calling the LibOVRRT version of Initialize in the LibOVRRT DLL then this must be valid and include Init_RequestVersion.
    • LogCallback – user-supplied log callback function, which may be called at any time asynchronously from multiple threads until Shutdown completes. Use NULL to specify no log callback.
    • UserData – user-supplied data which is passed as-is to LogCallback. Typically this is used to store an application-specific pointer which is read in the callback function.
    • ConnectionTimeoutMS – relative number of milliseconds to wait for a connection to the server before failing. Use 0 for the default timeout.

    Layout

     struct ovrInitParams {
         uint32_t Flags;
         uint32_t RequestedMinorVersion;
         ovrLogCallback LogCallback;
         uintptr_t UserData;
         uint32_t ConnectionTimeoutMS;
         char[4];
     }
    • Field Detail

      • SIZEOF

        public static final int SIZEOF
        The struct size in bytes.
    • Constructor Detail

      • OVRInitParams

        public OVRInitParams(java.nio.ByteBuffer container)
        Creates a OVRInitParams 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
      • Flags

        public int Flags()
        Returns the value of the Flags field.
      • RequestedMinorVersion

        public int RequestedMinorVersion()
        Returns the value of the RequestedMinorVersion field.
      • LogCallback

        @Nullable
        public OVRLogCallback LogCallback()
        Returns the value of the LogCallback field.
      • UserData

        public long UserData()
        Returns the value of the UserData field.
      • ConnectionTimeoutMS

        public int ConnectionTimeoutMS()
        Returns the value of the ConnectionTimeoutMS field.
      • Flags

        public OVRInitParams Flags(int value)
        Sets the specified value to the Flags field.
      • RequestedMinorVersion

        public OVRInitParams RequestedMinorVersion(int value)
        Sets the specified value to the RequestedMinorVersion field.
      • UserData

        public OVRInitParams UserData(long value)
        Sets the specified value to the UserData field.
      • ConnectionTimeoutMS

        public OVRInitParams ConnectionTimeoutMS(int value)
        Sets the specified value to the ConnectionTimeoutMS field.
      • set

        public OVRInitParams set(int Flags,
                                 int RequestedMinorVersion,
                                 OVRLogCallbackI LogCallback,
                                 long UserData,
                                 int ConnectionTimeoutMS)
        Initializes this struct with the specified values.
      • set

        public OVRInitParams set(OVRInitParams src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

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

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

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

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

        public static OVRInitParams.Buffer malloc(int capacity)
        Returns a new OVRInitParams.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • calloc

        public static OVRInitParams.Buffer calloc(int capacity)
        Returns a new OVRInitParams.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • create

        public static OVRInitParams.Buffer create(long address,
                                                  int capacity)
        Create a OVRInitParams.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

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

        public static OVRInitParams mallocStack()
        Returns a new OVRInitParams instance allocated on the thread-local MemoryStack.
      • callocStack

        public static OVRInitParams callocStack()
        Returns a new OVRInitParams instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static OVRInitParams mallocStack(org.lwjgl.system.MemoryStack stack)
        Returns a new OVRInitParams instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static OVRInitParams callocStack(org.lwjgl.system.MemoryStack stack)
        Returns a new OVRInitParams instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • mallocStack

        public static OVRInitParams.Buffer mallocStack(int capacity)
        Returns a new OVRInitParams.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static OVRInitParams.Buffer callocStack(int capacity)
        Returns a new OVRInitParams.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

        public static OVRInitParams.Buffer mallocStack(int capacity,
                                                       org.lwjgl.system.MemoryStack stack)
        Returns a new OVRInitParams.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

        public static OVRInitParams.Buffer callocStack(int capacity,
                                                       org.lwjgl.system.MemoryStack stack)
        Returns a new OVRInitParams.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