Package org.lwjgl.ovr
Class OVRInitParams
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.ovr.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 forInitialize
.Member documentation
Flags
– flags fromovrInitFlags
to override default behavior. Use 0 for the defaults.RequestedMinorVersion
– requests a specific minor version of the LibOVR runtime. Flags must includeInit_RequestVersion
or this will be ignored andMINOR_VERSION
will be used. If you are directly calling the LibOVRRT version ofInitialize
in the LibOVRRT DLL then this must be valid and includeInit_RequestVersion
.LogCallback
– user-supplied log callback function, which may be called at any time asynchronously from multiple threads untilShutdown
completes. UseNULL
to specify no log callback.UserData
– user-supplied data which is passed as-is toLogCallback
. 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; }
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
CONNECTIONTIMEOUTMS
FLAGS
LOGCALLBACK
REQUESTEDMINORVERSIONThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
USERDATA
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description OVRInitParams(java.nio.ByteBuffer container)
Creates aOVRInitParams
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OVRInitParams
calloc()
Returns a newOVRInitParams
instance allocated withmemCalloc
.static OVRInitParams
callocStack()
Returns a newOVRInitParams
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static OVRInitParams
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRInitParams
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
ConnectionTimeoutMS()
Returns the value of theConnectionTimeoutMS
field.OVRInitParams
ConnectionTimeoutMS(int value)
Sets the specified value to theConnectionTimeoutMS
field.static OVRInitParams
create()
Returns a newOVRInitParams
instance allocated withBufferUtils
.static OVRInitParams
create(long address)
Returns a newOVRInitParams
instance for the specified memory address.static OVRInitParams
createSafe(long address)
int
Flags()
Returns the value of theFlags
field.OVRInitParams
Flags(int value)
Sets the specified value to theFlags
field.OVRLogCallback
LogCallback()
Returns the value of theLogCallback
field.OVRInitParams
LogCallback(OVRLogCallbackI value)
Sets the specified value to theLogCallback
field.static OVRInitParams
malloc()
Returns a newOVRInitParams
instance allocated withmemAlloc
.static OVRInitParams
mallocStack()
Returns a newOVRInitParams
instance allocated on the thread-localMemoryStack
.static OVRInitParams
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRInitParams
instance allocated on the specifiedMemoryStack
.static int
nConnectionTimeoutMS(long struct)
Unsafe version ofConnectionTimeoutMS()
.static void
nConnectionTimeoutMS(long struct, int value)
Unsafe version ofConnectionTimeoutMS
.static int
nFlags(long struct)
Unsafe version ofFlags()
.static void
nFlags(long struct, int value)
Unsafe version ofFlags
.static OVRLogCallback
nLogCallback(long struct)
Unsafe version ofLogCallback()
.static void
nLogCallback(long struct, OVRLogCallbackI value)
Unsafe version ofLogCallback
.static int
nRequestedMinorVersion(long struct)
Unsafe version ofRequestedMinorVersion()
.static void
nRequestedMinorVersion(long struct, int value)
Unsafe version ofRequestedMinorVersion
.static long
nUserData(long struct)
Unsafe version ofUserData()
.static void
nUserData(long struct, long value)
Unsafe version ofUserData
.int
RequestedMinorVersion()
Returns the value of theRequestedMinorVersion
field.OVRInitParams
RequestedMinorVersion(int value)
Sets the specified value to theRequestedMinorVersion
field.OVRInitParams
set(int Flags, int RequestedMinorVersion, OVRLogCallbackI LogCallback, long UserData, int ConnectionTimeoutMS)
Initializes this struct with the specified values.OVRInitParams
set(OVRInitParams src)
Copies the specified struct data to this struct.int
sizeof()
long
UserData()
Returns the value of theUserData
field.OVRInitParams
UserData(long value)
Sets the specified value to theUserData
field.
-
-
-
Constructor Detail
-
OVRInitParams
public OVRInitParams(java.nio.ByteBuffer container)
Creates aOVRInitParams
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
Flags
public int Flags()
Returns the value of theFlags
field.
-
RequestedMinorVersion
public int RequestedMinorVersion()
Returns the value of theRequestedMinorVersion
field.
-
LogCallback
@Nullable public OVRLogCallback LogCallback()
Returns the value of theLogCallback
field.
-
UserData
public long UserData()
Returns the value of theUserData
field.
-
ConnectionTimeoutMS
public int ConnectionTimeoutMS()
Returns the value of theConnectionTimeoutMS
field.
-
Flags
public OVRInitParams Flags(int value)
Sets the specified value to theFlags
field.
-
RequestedMinorVersion
public OVRInitParams RequestedMinorVersion(int value)
Sets the specified value to theRequestedMinorVersion
field.
-
LogCallback
public OVRInitParams LogCallback(@Nullable OVRLogCallbackI value)
Sets the specified value to theLogCallback
field.
-
UserData
public OVRInitParams UserData(long value)
Sets the specified value to theUserData
field.
-
ConnectionTimeoutMS
public OVRInitParams ConnectionTimeoutMS(int value)
Sets the specified value to theConnectionTimeoutMS
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 newOVRInitParams
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static OVRInitParams calloc()
Returns a newOVRInitParams
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static OVRInitParams create()
Returns a newOVRInitParams
instance allocated withBufferUtils
.
-
create
public static OVRInitParams create(long address)
Returns a newOVRInitParams
instance for the specified memory address.
-
createSafe
@Nullable public static OVRInitParams createSafe(long address)
-
mallocStack
public static OVRInitParams mallocStack()
Returns a newOVRInitParams
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static OVRInitParams callocStack()
Returns a newOVRInitParams
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static OVRInitParams mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRInitParams
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static OVRInitParams callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRInitParams
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
nFlags
public static int nFlags(long struct)
Unsafe version ofFlags()
.
-
nRequestedMinorVersion
public static int nRequestedMinorVersion(long struct)
Unsafe version ofRequestedMinorVersion()
.
-
nLogCallback
@Nullable public static OVRLogCallback nLogCallback(long struct)
Unsafe version ofLogCallback()
.
-
nUserData
public static long nUserData(long struct)
Unsafe version ofUserData()
.
-
nConnectionTimeoutMS
public static int nConnectionTimeoutMS(long struct)
Unsafe version ofConnectionTimeoutMS()
.
-
nFlags
public static void nFlags(long struct, int value)
Unsafe version ofFlags
.
-
nRequestedMinorVersion
public static void nRequestedMinorVersion(long struct, int value)
Unsafe version ofRequestedMinorVersion
.
-
nLogCallback
public static void nLogCallback(long struct, @Nullable OVRLogCallbackI value)
Unsafe version ofLogCallback
.
-
nUserData
public static void nUserData(long struct, long value)
Unsafe version ofUserData
.
-
nConnectionTimeoutMS
public static void nConnectionTimeoutMS(long struct, int value)
Unsafe version ofConnectionTimeoutMS
.
-
-