Package org.lwjgl.ovr

Class OVRInitParams

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class OVRInitParams extends Struct<OVRInitParams> implements NativeResource
Parameters for Initialize.

Layout


 struct ovrInitParams {
     uint32_t Flags();
     uint32_t RequestedMinorVersion();
     ovrLogCallback LogCallback();
     uintptr_t UserData();
     uint32_t ConnectionTimeoutMS();
 }
  • Field Details

    • SIZEOF

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

      public static final int ALIGNOF
      The struct alignment in bytes.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • REQUESTEDMINORVERSION

      public static final int REQUESTEDMINORVERSION
      The struct member offsets.
    • LOGCALLBACK

      public static final int LOGCALLBACK
      The struct member offsets.
    • USERDATA

      public static final int USERDATA
      The struct member offsets.
    • CONNECTIONTIMEOUTMS

      public static final int CONNECTIONTIMEOUTMS
      The struct member offsets.
  • Constructor Details

    • OVRInitParams

      public OVRInitParams(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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<OVRInitParams>
    • Flags

      public int Flags()
      flags from ovrInitFlags to override default behavior. Use 0 for the defaults.
    • RequestedMinorVersion

      public int 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

      @Nullable public OVRLogCallback 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

      public long 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

      public int ConnectionTimeoutMS()
      relative number of milliseconds to wait for a connection to the server before failing. Use 0 for the default timeout.
    • 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.
    • LogCallback

      public OVRInitParams LogCallback(@Nullable OVRLogCallbackI value)
      Sets the specified value to the LogCallback() 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()
      Returns a new OVRInitParams instance allocated with BufferUtils.
    • 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.
    • mallocStack

      @Deprecated public static OVRInitParams mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRInitParams callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVRInitParams mallocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRInitParams callocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • malloc

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

      public static OVRInitParams calloc(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().
    • nLogCallback

      @Nullable public static OVRLogCallback nLogCallback(long struct)
      Unsafe version of LogCallback().
    • 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.