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.NativeResourceParameters forInitialize.Member documentation
Flags– flags fromovrInitFlagsto override default behavior. Use 0 for the defaults.RequestedMinorVersion– requests a specific minor version of the LibOVR runtime. Flags must includeInit_RequestVersionor this will be ignored andMINOR_VERSIONwill be used. If you are directly calling the LibOVRRT version ofInitializein 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 untilShutdowncompletes. UseNULLto 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;ovrLogCallbackLogCallback; uintptr_t UserData; uint32_t ConnectionTimeoutMS; }
-
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCONNECTIONTIMEOUTMS
FLAGS
LOGCALLBACK
REQUESTEDMINORVERSIONThe struct member offsets.static intSIZEOFThe struct size in bytes.static intUSERDATAThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description OVRInitParams(java.nio.ByteBuffer container)Creates aOVRInitParamsinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OVRInitParamscalloc()Returns a newOVRInitParamsinstance allocated withmemCalloc.static OVRInitParamscallocStack()Returns a newOVRInitParamsinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRInitParamscallocStack(org.lwjgl.system.MemoryStack stack)Returns a newOVRInitParamsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intConnectionTimeoutMS()Returns the value of theConnectionTimeoutMSfield.OVRInitParamsConnectionTimeoutMS(int value)Sets the specified value to theConnectionTimeoutMSfield.static OVRInitParamscreate()Returns a newOVRInitParamsinstance allocated withBufferUtils.static OVRInitParamscreate(long address)Returns a newOVRInitParamsinstance for the specified memory address.static OVRInitParamscreateSafe(long address)intFlags()Returns the value of theFlagsfield.OVRInitParamsFlags(int value)Sets the specified value to theFlagsfield.OVRLogCallbackLogCallback()Returns the value of theLogCallbackfield.OVRInitParamsLogCallback(OVRLogCallbackI value)Sets the specified value to theLogCallbackfield.static OVRInitParamsmalloc()Returns a newOVRInitParamsinstance allocated withmemAlloc.static OVRInitParamsmallocStack()Returns a newOVRInitParamsinstance allocated on the thread-localMemoryStack.static OVRInitParamsmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newOVRInitParamsinstance allocated on the specifiedMemoryStack.static intnConnectionTimeoutMS(long struct)Unsafe version ofConnectionTimeoutMS().static voidnConnectionTimeoutMS(long struct, int value)Unsafe version ofConnectionTimeoutMS.static intnFlags(long struct)Unsafe version ofFlags().static voidnFlags(long struct, int value)Unsafe version ofFlags.static OVRLogCallbacknLogCallback(long struct)Unsafe version ofLogCallback().static voidnLogCallback(long struct, OVRLogCallbackI value)Unsafe version ofLogCallback.static intnRequestedMinorVersion(long struct)Unsafe version ofRequestedMinorVersion().static voidnRequestedMinorVersion(long struct, int value)Unsafe version ofRequestedMinorVersion.static longnUserData(long struct)Unsafe version ofUserData().static voidnUserData(long struct, long value)Unsafe version ofUserData.intRequestedMinorVersion()Returns the value of theRequestedMinorVersionfield.OVRInitParamsRequestedMinorVersion(int value)Sets the specified value to theRequestedMinorVersionfield.OVRInitParamsset(int Flags, int RequestedMinorVersion, OVRLogCallbackI LogCallback, long UserData, int ConnectionTimeoutMS)Initializes this struct with the specified values.OVRInitParamsset(OVRInitParams src)Copies the specified struct data to this struct.intsizeof()longUserData()Returns the value of theUserDatafield.OVRInitParamsUserData(long value)Sets the specified value to theUserDatafield.
-
-
-
Constructor Detail
-
OVRInitParams
public OVRInitParams(java.nio.ByteBuffer container)
Creates aOVRInitParamsinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
Flags
public int Flags()
Returns the value of theFlagsfield.
-
RequestedMinorVersion
public int RequestedMinorVersion()
Returns the value of theRequestedMinorVersionfield.
-
LogCallback
@Nullable public OVRLogCallback LogCallback()
Returns the value of theLogCallbackfield.
-
UserData
public long UserData()
Returns the value of theUserDatafield.
-
ConnectionTimeoutMS
public int ConnectionTimeoutMS()
Returns the value of theConnectionTimeoutMSfield.
-
Flags
public OVRInitParams Flags(int value)
Sets the specified value to theFlagsfield.
-
RequestedMinorVersion
public OVRInitParams RequestedMinorVersion(int value)
Sets the specified value to theRequestedMinorVersionfield.
-
LogCallback
public OVRInitParams LogCallback(@Nullable OVRLogCallbackI value)
Sets the specified value to theLogCallbackfield.
-
UserData
public OVRInitParams UserData(long value)
Sets the specified value to theUserDatafield.
-
ConnectionTimeoutMS
public OVRInitParams ConnectionTimeoutMS(int value)
Sets the specified value to theConnectionTimeoutMSfield.
-
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 newOVRInitParamsinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static OVRInitParams calloc()
Returns a newOVRInitParamsinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static OVRInitParams create()
Returns a newOVRInitParamsinstance allocated withBufferUtils.
-
create
public static OVRInitParams create(long address)
Returns a newOVRInitParamsinstance for the specified memory address.
-
createSafe
@Nullable public static OVRInitParams createSafe(long address)
-
mallocStack
public static OVRInitParams mallocStack()
Returns a newOVRInitParamsinstance allocated on the thread-localMemoryStack.
-
callocStack
public static OVRInitParams callocStack()
Returns a newOVRInitParamsinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static OVRInitParams mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRInitParamsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static OVRInitParams callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRInitParamsinstance allocated on the specifiedMemoryStackand 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.
-
-