API reference
API reference
Select your platform
No SDKs available
No versions available

OVR_Platform.h File

Macros

Wrapper for ovr_Platform_InitializeStandaloneOculusEx that automatically passes the key version information as defined in this header package. This is used to ensure that the version in your headers matches the version of the static library.
#define ovr_PlatformInitializeWithAccessToken
Wrapper for ovr_PlatformInitializeWindowsEx that automatically passes the key version information as defined in this header package. This is used to ensure that the version in your headers matches the version of the static library.
Wrapper for ovr_PlatformInitializeWindowsAsynchronousEx that automatically passes the key version information as defined in this header package. This is used to ensure that the version in your headers matches the version of the static library.outResult will contain the result of attempting to load the DLL. If that fails, the returning ovrRequest will be 0.NOTE: Just because the DLL is loaded successfully does NOT mean that the initialization was successful, you still need to check the message queue for the result in ovrMessage_PlatformInitializeWindowsAsynchronous

Enumeration Types

Enumeration ovrPlatformStructureType_

This enum describes the type of versionable structs in the Oculus Platform API. Older versions of structs will not be declared here, but they will be seamlessly updated for all supported older versions of the SDK.
ovrPlatformStructureType_Unknown
= 0
ovrPlatformStructureType_OculusInitParams
= 1

Enumeration ovrInitConfigOption_

ovrInitConfigOption_DisableP2pNetworking
Disables the initialization of the WebRTC networking stack, when you don't need to use any of the ovr_Voip_* or ovr_Net_* functions.
valid options are true and false
ovrInitConfigOption_EnableCowatching
Enables the initialization of cowatching stack to use ovr_Cowatching_* functions.
valid options are true and false

Typedefs

This enum describes the type of versionable structs in the Oculus Platform API. Older versions of structs will not be declared here, but they will be seamlessly updated for all supported older versions of the SDK.
enum ovrInitConfigOption_ ovrInitConfigOption

Functions

bool ovr_IsPlatformInitialized ( )
ovrKeyValuePair ovr_InitConfigOption_CreateBool
bool value )
const char * ovrInitConfigOption_toString
( ovrInitConfigOption configOption )
Initializes the SDK in Standalone mode and doesn't try to connect to a locally running Oculus Service process. Not all functionality will work when when the SDK is initialized this way. In particular: IAP, Cloud Storage, Parties, Events, Live Streaming. Listen for the message ovrMessage_Platform_InitializeStandaloneOculus to detect when the platform has finished initializing.
Parameters
params
non-nullptr to a struct with the required Oculus Authentication data.
(BETA) For use on platforms where the Oculus service isn't running. You'll need to know how to get an access token for the user to use this. While the platform is in an initializing state, it's not fully functional. [Requests]: will queue up and run once platform is initialized. For example: ovr_User_GetLoggedInUser() can be called immediately after asynchronous init and once platform is initialized, this request will run [Synchronous Methods]: will return the default value; For example: ovr_GetLoggedInUserID() will return 0 until platform is fully initializedoutResult will contain the result of attempting to load the DLL. If that fails, the returning ovrRequest will be 0.NOTE: Just because the DLL is loaded successfully does NOT mean that the initialization was successful. Listen for the message ovrMessage_PlatformInitializeWithAccessToken to detect when the platform has finished initializing.Not all functionality will work when when the SDK is initialized this way. In particular: In-App Purchases, Cloud Storage, Parties, Events, Live Streaming will not work.
Performs the initialization of the platform for use on Windows. Requires your app ID (not access token). This call may fail for a variety of reasons, and will return an error code in that case. It is critical to respect this error code and either exit or make no further platform calls.
Performs the initialization of the platform for use on Windows. Requires your app ID (not access token). This call may fail for a variety of reasons, and will return an error code in that case. It is critical to respect this error code and either exit or make no further platform calls.outResult will contain the result of attempting to load the DLL. If that fails, the returning ovrRequest will be 0.NOTE: Just because the DLL is loaded successfully does NOT mean that the initialization was successful, you still need to check the message queue for the result in ovrMessage_PlatformInitializeWindowsAsynchronous
Returns the id of the currently logged in user, or a 0 id if there is none.
Returns the currently logged-in user's locale as a string, or empty string on error. Return value format conforms to BCP47: https://tools.ietf.org/html/bcp47 The return value is borrowed, and should not be freed
Return the next message in the queue (FIFO order), or null if none is available. Safe to call on any thread. Each returned message should eventually be freed with ovr_FreeMessage.TODO: comment on whether it's safe to process messages out of order.
void ovr_FreeMessage
void ovr_SetDeveloperAccessToken
( const char * accessToken )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon