Package org.lwjgl.ovr

Class OVRInitParams

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

    public class OVRInitParams
    extends Struct
    implements 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

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • FLAGS, REQUESTEDMINORVERSION, LOGCALLBACK, USERDATA, CONNECTIONTIMEOUTMS

        The struct member offsets.
    • 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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class 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
      • 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.
      • callocStack

        public static OVRInitParams callocStack​(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
      • nFlags

        public static int nFlags​(long struct)
        Unsafe version of Flags().
      • nRequestedMinorVersion

        public static int nRequestedMinorVersion​(long struct)
        Unsafe version of RequestedMinorVersion().
      • nUserData

        public static long nUserData​(long struct)
        Unsafe version of UserData().
      • nConnectionTimeoutMS

        public static int nConnectionTimeoutMS​(long struct)
        Unsafe version of ConnectionTimeoutMS().
      • nFlags

        public static void nFlags​(long struct,
                                  int value)
        Unsafe version of Flags.
      • nRequestedMinorVersion

        public static void nRequestedMinorVersion​(long struct,
                                                  int value)
        Unsafe version of RequestedMinorVersion.
      • nLogCallback

        public static void nLogCallback​(long struct,
                                        @Nullable
                                        OVRLogCallbackI value)
        Unsafe version of LogCallback.
      • nUserData

        public static void nUserData​(long struct,
                                     long value)
        Unsafe version of UserData.
      • nConnectionTimeoutMS

        public static void nConnectionTimeoutMS​(long struct,
                                                int value)
        Unsafe version of ConnectionTimeoutMS.