Package org.lwjgl.ovr

Class OVRInitParams

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


    public class OVRInitParams
    extends Struct
    Parameters for OVR.ovr_Initialize(org.lwjgl.ovr.OVRInitParams).

    Member documentation

    • Flags – flags from ovrInitFlags to override default behavior. Use 0 for the defaults.
    • RequestedMinorVersion – requests a specific minimum minor version of the LibOVR runtime. Flags must include OVR.ovrInit_RequestVersion or this will be ignored and OVRVersion.OVR_MINOR_VERSION will be used.
    • LogCallback – user-supplied log callback function, which may be called at any time asynchronously from multiple threads until OVR.ovr_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()
        Description copied from class: Struct
        Returns the 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

        public OVRLogCallback LogCallback()
        Returns the OVRLogCallback instance at 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 or null if the address is NULL.
      • 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
      • 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