Updated Oculus PC SDK to version 1.5

This commit is contained in:
raysan5 2016-07-04 18:34:02 +02:00
commit 8bdd03eeac

View file

@ -493,7 +493,7 @@ typedef enum ovrStatusBits_
/// Specifies the description of a single sensor.
///
/// \see ovrGetTrackerDesc
/// \see ovr_GetTrackerDesc
///
typedef struct OVR_ALIGNAS(OVR_PTR_SIZE) ovrTrackerDesc_
{
@ -665,6 +665,18 @@ typedef enum ovrTextureFormat_
OVR_FORMAT_D32_FLOAT,
OVR_FORMAT_D32_FLOAT_S8X24_UINT,
// Added in 1.5 compressed formats can be used for static layers
OVR_FORMAT_BC1_UNORM,
OVR_FORMAT_BC1_UNORM_SRGB,
OVR_FORMAT_BC2_UNORM,
OVR_FORMAT_BC2_UNORM_SRGB,
OVR_FORMAT_BC3_UNORM,
OVR_FORMAT_BC3_UNORM_SRGB,
OVR_FORMAT_BC6H_UF16,
OVR_FORMAT_BC6H_SF16,
OVR_FORMAT_BC7_UNORM,
OVR_FORMAT_BC7_UNORM_SRGB,
OVR_FORMAT_ENUMSIZE = 0x7fffffff ///< \internal Force type int32_t.
} ovrTextureFormat;
@ -779,18 +791,20 @@ typedef enum ovrTouch_
ovrTouch_A = ovrButton_A,
ovrTouch_B = ovrButton_B,
ovrTouch_RThumb = ovrButton_RThumb,
ovrTouch_RThumbRest = 0x00000008,
ovrTouch_RIndexTrigger = 0x00000010,
// Bit mask of all the button touches on the right controller
ovrTouch_RButtonMask = ovrTouch_A | ovrTouch_B | ovrTouch_RThumb | ovrTouch_RIndexTrigger,
ovrTouch_RButtonMask = ovrTouch_A | ovrTouch_B | ovrTouch_RThumb | ovrTouch_RThumbRest | ovrTouch_RIndexTrigger,
ovrTouch_X = ovrButton_X,
ovrTouch_Y = ovrButton_Y,
ovrTouch_LThumb = ovrButton_LThumb,
ovrTouch_LThumbRest = 0x00000800,
ovrTouch_LIndexTrigger = 0x00001000,
// Bit mask of all the button touches on the left controller
ovrTouch_LButtonMask = ovrTouch_X | ovrTouch_Y | ovrTouch_LThumb | ovrTouch_LIndexTrigger,
ovrTouch_LButtonMask = ovrTouch_X | ovrTouch_Y | ovrTouch_LThumb | ovrTouch_LThumbRest | ovrTouch_LIndexTrigger,
// Finger pose state
// Derived internally based on distance, proximity to sensors and filtering.
@ -959,36 +973,6 @@ extern "C" {
// -----------------------------------------------------------------------------------
// ***** API Interfaces
// Overview of the API
//
// Setup:
// - ovr_Initialize().
// - ovr_Create(&hmd, &graphicsId).
// - Use hmd members and ovr_GetFovTextureSize() to determine graphics configuration
// and ovr_GetRenderDesc() to get per-eye rendering parameters.
// - Allocate texture swap chains with ovr_CreateTextureSwapChainDX() or
// ovr_CreateTextureSwapChainGL(). Create any associated render target views or
// frame buffer objects.
//
// Application Loop:
// - Call ovr_GetPredictedDisplayTime() to get the current frame timing information.
// - Call ovr_GetTrackingState() and ovr_CalcEyePoses() to obtain the predicted
// rendering pose for each eye based on timing.
// - Render the scene content into the current buffer of the texture swapchains
// for each eye and layer you plan to update this frame. If you render into a
// texture swap chain, you must call ovr_CommitTextureSwapChain() on it to commit
// the changes before you reference the chain this frame (otherwise, your latest
// changes won't be picked up).
// - Call ovr_SubmitFrame() to render the distorted layers to and present them on the HMD.
// If ovr_SubmitFrame returns ovrSuccess_NotVisible, there is no need to render the scene
// for the next loop iteration. Instead, just call ovr_SubmitFrame again until it returns
// ovrSuccess.
//
// Shutdown:
// - ovr_Destroy().
// - ovr_Shutdown().
/// Initializes LibOVR
///
/// Initialize LibOVR for application usage. This includes finding and loading the LibOVRRT
@ -1097,6 +1081,35 @@ OVR_PUBLIC_FUNCTION(const char*) ovr_GetVersionString();
OVR_PUBLIC_FUNCTION(int) ovr_TraceMessage(int level, const char* message);
/// Identify client application info.
///
/// The string is one or more newline-delimited lines of optional info
/// indicating engine name, engine version, engine plugin name, engine plugin
/// version, engine editor. The order of the lines is not relevant. Individual
/// lines are optional. A newline is not necessary at the end of the last line.
/// Call after ovr_Initialize and before the first call to ovr_Create.
/// Each value is limited to 20 characters. Key names such as 'EngineName:'
/// 'EngineVersion:' do not count towards this limit.
///
/// \param[in] identity Specifies one or more newline-delimited lines of optional info:
/// EngineName: %s\n
/// EngineVersion: %s\n
/// EnginePluginName: %s\n
/// EnginePluginVersion: %s\n
/// EngineEditor: <boolean> ('true' or 'false')\n
///
/// <b>Example code</b>
/// \code{.cpp}
/// ovr_IdentifyClient("EngineName: Unity\n"
/// "EngineVersion: 5.3.3\n"
/// "EnginePluginName: OVRPlugin\n"
/// "EnginePluginVersion: 1.2.0\n"
/// "EngineEditor: true");
/// \endcode
///
OVR_PUBLIC_FUNCTION(ovrResult) ovr_IdentifyClient(const char* identity);
//-------------------------------------------------------------------------------------
/// @name HMD Management
///
@ -1153,7 +1166,7 @@ OVR_PUBLIC_FUNCTION(ovrTrackerDesc) ovr_GetTrackerDesc(ovrSession session, unsig
/// Creates a handle to a VR session.
///
/// Upon success the returned ovrSession must be eventually freed with ovr_Destroy when it is no longer needed.
/// A second call to ovr_Create will result in an error return value if the previous Hmd has not been destroyed.
/// A second call to ovr_Create will result in an error return value if the previous session has not been destroyed.
///
/// \param[out] pSession Provides a pointer to an ovrSession which will be written to upon success.
/// \param[out] luid Provides a system specific graphics adapter identifier that locates which
@ -1161,7 +1174,7 @@ OVR_PUBLIC_FUNCTION(ovrTrackerDesc) ovr_GetTrackerDesc(ovrSession session, unsig
/// or no rendering output will be possible. This is important for stability on multi-adapter systems. An
/// application that simply chooses the default adapter will not run reliably on multi-adapter systems.
/// \return Returns an ovrResult indicating success or failure. Upon failure
/// the returned pHmd will be NULL.
/// the returned ovrSession will be NULL.
///
/// <b>Example code</b>
/// \code{.cpp}
@ -1177,7 +1190,7 @@ OVR_PUBLIC_FUNCTION(ovrTrackerDesc) ovr_GetTrackerDesc(ovrSession session, unsig
OVR_PUBLIC_FUNCTION(ovrResult) ovr_Create(ovrSession* pSession, ovrGraphicsLuid* pLuid);
/// Destroys the HMD.
/// Destroys the session.
///
/// \param[in] session Specifies an ovrSession previously returned by ovr_Create.
/// \see ovr_Create
@ -1304,7 +1317,7 @@ OVR_PUBLIC_FUNCTION(void) ovr_ClearShouldRecenterFlag(ovrSession session);
/// ovrTrackingState value. Use 0 to request the most recent tracking state.
/// \param[in] latencyMarker Specifies that this call is the point in time where
/// the "App-to-Mid-Photon" latency timer starts from. If a given ovrLayer
/// provides "SensorSampleTimestamp", that will override the value stored here.
/// provides "SensorSampleTime", that will override the value stored here.
/// \return Returns the ovrTrackingState that is predicted for the given absTime.
///
/// \see ovrTrackingState, ovr_GetEyePoses, ovr_GetTimeInSeconds
@ -1363,12 +1376,11 @@ OVR_PUBLIC_FUNCTION(unsigned int) ovr_GetConnectedControllerTypes(ovrSession ses
///
/// \see ovrControllerType
///
OVR_PUBLIC_FUNCTION(ovrResult) ovr_SetControllerVibration(ovrSession session, ovrControllerType controllerType,
float frequency, float amplitude);
OVR_PUBLIC_FUNCTION(ovrResult) ovr_SetControllerVibration(ovrSession session, ovrControllerType controllerType, float frequency, float amplitude);
///@}
//-------------------------------------------------------------------------------------
// @name Layers
//
@ -1768,7 +1780,7 @@ OVR_PUBLIC_FUNCTION(ovrEyeRenderDesc) ovr_GetRenderDesc(ovrSession session,
/// ovrLayerQuad layer1;
/// ...
/// ovrLayerHeader* layers[2] = { &layer0.Header, &layer1.Header };
/// ovrResult result = ovr_SubmitFrame(hmd, frameIndex, nullptr, layers, 2);
/// ovrResult result = ovr_SubmitFrame(session, frameIndex, nullptr, layers, 2);
/// \endcode
///
/// \return Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true
@ -1844,7 +1856,7 @@ OVR_PUBLIC_FUNCTION(double) ovr_GetTimeInSeconds();
/// App can toggle performance HUD modes as such:
/// \code{.cpp}
/// ovrPerfHudMode PerfHudMode = ovrPerfHud_LatencyTiming;
/// ovr_SetInt(Hmd, OVR_PERF_HUD_MODE, (int)PerfHudMode);
/// ovr_SetInt(session, OVR_PERF_HUD_MODE, (int)PerfHudMode);
/// \endcode
///
typedef enum ovrPerfHudMode_
@ -1864,7 +1876,7 @@ typedef enum ovrPerfHudMode_
/// App can toggle layer HUD modes as such:
/// \code{.cpp}
/// ovrLayerHudMode LayerHudMode = ovrLayerHud_Info;
/// ovr_SetInt(Hmd, OVR_LAYER_HUD_MODE, (int)LayerHudMode);
/// ovr_SetInt(session, OVR_LAYER_HUD_MODE, (int)LayerHudMode);
/// \endcode
///
typedef enum ovrLayerHudMode_
@ -1885,7 +1897,7 @@ typedef enum ovrLayerHudMode_
/// App can toggle the debug HUD modes as such:
/// \code{.cpp}
/// ovrDebugHudStereoMode DebugHudMode = ovrDebugHudStereo_QuadWithCrosshair;
/// ovr_SetInt(Hmd, OVR_DEBUG_HUD_STEREO_MODE, (int)DebugHudMode);
/// ovr_SetInt(session, OVR_DEBUG_HUD_STEREO_MODE, (int)DebugHudMode);
/// \endcode
///
/// The app can modify the visual properties of the stereo guide (i.e. quad, crosshair)
@ -2004,7 +2016,7 @@ OVR_PUBLIC_FUNCTION(ovrBool) ovr_SetFloatArray(ovrSession session, const char* p
/// \param[in] defaultVal Specifes the value to return if the property couldn't be read.
/// \return Returns the string property if it exists. Otherwise returns defaultVal, which can be specified as NULL.
/// The return memory is guaranteed to be valid until next call to ovr_GetString or
/// until the HMD is destroyed, whichever occurs first.
/// until the session is destroyed, whichever occurs first.
OVR_PUBLIC_FUNCTION(const char*) ovr_GetString(ovrSession session, const char* propertyName,
const char* defaultVal);