From 0d0f306fc2f6bed7526df2044263698753811d0a Mon Sep 17 00:00:00 2001 From: raysan5 Date: Tue, 14 Jun 2016 17:15:00 +0200 Subject: Add Oculus SDK LibOVR library to external deps. --- .../OculusSDK/LibOVR/Include/OVR_CAPI_GL.h | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h (limited to 'src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h') diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h new file mode 100644 index 00000000..1658ca57 --- /dev/null +++ b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h @@ -0,0 +1,99 @@ +/********************************************************************************//** +\file OVR_CAPI_GL.h +\brief OpenGL-specific structures used by the CAPI interface. +\copyright Copyright 2015 Oculus VR, LLC. All Rights reserved. +************************************************************************************/ + +#ifndef OVR_CAPI_GL_h +#define OVR_CAPI_GL_h + +#include "OVR_CAPI.h" + +/// Creates a TextureSwapChain suitable for use with OpenGL. +/// +/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. +/// \param[in] desc Specifies the requested texture properties. See notes for more info about texture format. +/// \param[out] out_TextureSwapChain Returns the created ovrTextureSwapChain, which will be valid upon +/// a successful return value, else it will be NULL. This texture swap chain must be eventually +/// destroyed via ovr_DestroyTextureSwapChain before destroying the HMD with ovr_Destroy. +/// +/// \return Returns an ovrResult indicating success or failure. In the case of failure, use +/// ovr_GetLastErrorInfo to get more information. +/// +/// \note The \a format provided should be thought of as the format the distortion compositor will use when reading +/// the contents of the texture. To that end, it is highly recommended that the application requests texture swap chain +/// formats that are in sRGB-space (e.g. OVR_FORMAT_R8G8B8A8_UNORM_SRGB) as the distortion compositor does sRGB-correct +/// rendering. Furthermore, the app should then make sure "glEnable(GL_FRAMEBUFFER_SRGB);" is called before rendering +/// into these textures. Even though it is not recommended, if the application would like to treat the texture as a linear +/// format and do linear-to-gamma conversion in GLSL, then the application can avoid calling "glEnable(GL_FRAMEBUFFER_SRGB);", +/// but should still pass in an sRGB variant for the \a format. Failure to do so will cause the distortion compositor +/// to apply incorrect gamma conversions leading to gamma-curve artifacts. +/// +/// \see ovr_GetTextureSwapChainLength +/// \see ovr_GetTextureSwapChainCurrentIndex +/// \see ovr_GetTextureSwapChainDesc +/// \see ovr_GetTextureSwapChainBufferGL +/// \see ovr_DestroyTextureSwapChain +/// +OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateTextureSwapChainGL(ovrSession session, + const ovrTextureSwapChainDesc* desc, + ovrTextureSwapChain* out_TextureSwapChain); + +/// Get a specific buffer within the chain as a GL texture name +/// +/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. +/// \param[in] chain Specifies an ovrTextureSwapChain previously returned by ovr_CreateTextureSwapChainGL +/// \param[in] index Specifies the index within the chain to retrieve. Must be between 0 and length (see ovr_GetTextureSwapChainLength) +/// or may pass -1 to get the buffer at the CurrentIndex location. (Saving a call to GetTextureSwapChainCurrentIndex) +/// \param[out] out_TexId Returns the GL texture object name associated with the specific index requested +/// +/// \return Returns an ovrResult indicating success or failure. In the case of failure, use +/// ovr_GetLastErrorInfo to get more information. +/// +OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainBufferGL(ovrSession session, + ovrTextureSwapChain chain, + int index, + unsigned int* out_TexId); + + +/// Creates a Mirror Texture which is auto-refreshed to mirror Rift contents produced by this application. +/// +/// A second call to ovr_CreateMirrorTextureGL for a given ovrSession before destroying the first one +/// is not supported and will result in an error return. +/// +/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. +/// \param[in] desc Specifies the requested mirror texture description. +/// \param[out] out_MirrorTexture Specifies the created ovrMirrorTexture, which will be valid upon a successful return value, else it will be NULL. +/// This texture must be eventually destroyed via ovr_DestroyMirrorTexture before destroying the HMD with ovr_Destroy. +/// +/// \return Returns an ovrResult indicating success or failure. In the case of failure, use +/// ovr_GetLastErrorInfo to get more information. +/// +/// \note The \a format provided should be thought of as the format the distortion compositor will use when writing into the mirror +/// texture. It is highly recommended that mirror textures are requested as sRGB formats because the distortion compositor +/// does sRGB-correct rendering. If the application requests a non-sRGB format (e.g. R8G8B8A8_UNORM) as the mirror texture, +/// then the application might have to apply a manual linear-to-gamma conversion when reading from the mirror texture. +/// Failure to do so can result in incorrect gamma conversions leading to gamma-curve artifacts and color banding. +/// +/// \see ovr_GetMirrorTextureBufferGL +/// \see ovr_DestroyMirrorTexture +/// +OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureGL(ovrSession session, + const ovrMirrorTextureDesc* desc, + ovrMirrorTexture* out_MirrorTexture); + +/// Get a the underlying buffer as a GL texture name +/// +/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. +/// \param[in] mirrorTexture Specifies an ovrMirrorTexture previously returned by ovr_CreateMirrorTextureGL +/// \param[out] out_TexId Specifies the GL texture object name associated with the mirror texture +/// +/// \return Returns an ovrResult indicating success or failure. In the case of failure, use +/// ovr_GetLastErrorInfo to get more information. +/// +OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetMirrorTextureBufferGL(ovrSession session, + ovrMirrorTexture mirrorTexture, + unsigned int* out_TexId); + + +#endif // OVR_CAPI_GL_h -- cgit v1.2.3 From 8bdd03eeac8cf91eb8eb9a5a0a1c434135a3c9a6 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Mon, 4 Jul 2016 18:34:02 +0200 Subject: Updated Oculus PC SDK to version 1.5 --- .../OculusSDK/LibOVR/Include/Extras/OVR_Math.h | 21 ++++- src/external/OculusSDK/LibOVR/Include/OVR_CAPI.h | 102 ++++++++++++--------- .../OculusSDK/LibOVR/Include/OVR_CAPI_Audio.h | 4 + .../OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h | 4 +- .../OculusSDK/LibOVR/Include/OVR_CAPI_GL.h | 4 +- .../OculusSDK/LibOVR/Include/OVR_ErrorCode.h | 80 ++-------------- .../OculusSDK/LibOVR/Include/OVR_Version.h | 2 +- src/external/OculusSDK/LibOVR/LibOVRRT32_1.dll | Bin 964048 -> 1018320 bytes 8 files changed, 95 insertions(+), 122 deletions(-) (limited to 'src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h') diff --git a/src/external/OculusSDK/LibOVR/Include/Extras/OVR_Math.h b/src/external/OculusSDK/LibOVR/Include/Extras/OVR_Math.h index c182ed5b..718c21cb 100644 --- a/src/external/OculusSDK/LibOVR/Include/Extras/OVR_Math.h +++ b/src/external/OculusSDK/LibOVR/Include/Extras/OVR_Math.h @@ -1487,6 +1487,25 @@ public: } } + // Decompose a quat into quat = swing * twist, where twist is a rotation about axis, + // and swing is a rotation perpendicular to axis. + Quat GetSwingTwist(const Vector3& axis, Quat* twist) const + { + OVR_MATH_ASSERT(twist); + OVR_MATH_ASSERT(axis.IsNormalized()); + + // Create a normalized quaternion from projection of (x,y,z) onto axis + T d = axis.Dot(Vector3(x, y, z)); + *twist = Quat(axis.x*d, axis.y*d, axis.z*d, w); + T len = twist->Length(); + if (len == 0) + twist->w = T(1); // identity + else + twist /= len; // normalize + + return *this * twist.Inverted(); + } + // Normalized linear interpolation of quaternions // NOTE: This function is a bad approximation of Slerp() // when the angle between the *this and b is large. @@ -1500,7 +1519,7 @@ public: Quat Slerp(const Quat& b, T s) const { Vector3 delta = (b * this->Inverted()).ToRotationVector(); - return FromRotationVector(delta * s) * *this; + return (FromRotationVector(delta * s) * *this).Normalized(); // normalize so errors don't accumulate } // Spherical linear interpolation: much faster for small rotations, accurate for large rotations. See FastTo/FromRotationVector diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI.h b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI.h index b1ec3cc0..cf7aab62 100644 --- a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI.h +++ b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI.h @@ -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: ('true' or 'false')\n +/// +/// Example code +/// \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. /// /// Example code /// \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,11 +1376,10 @@ 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); diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_Audio.h b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_Audio.h index c5344813..930dfcbe 100644 --- a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_Audio.h +++ b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_Audio.h @@ -9,6 +9,10 @@ #define OVR_CAPI_Audio_h #ifdef _WIN32 +// Prevents from defining min() and max() macro symbols. +#ifndef NOMINMAX +#define NOMINMAX +#endif #include #include "OVR_CAPI.h" #define OVR_AUDIO_MAX_DEVICE_STR_SIZE 128 diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h index 50806bca..982af8f0 100644 --- a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h +++ b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h @@ -25,7 +25,7 @@ /// \param[in] desc Specifies requested texture properties. See notes for more info about texture format. /// \param[in] bindFlags Specifies what ovrTextureBindFlags the application requires for this texture chain. /// \param[out] out_TextureSwapChain Returns the created ovrTextureSwapChain, which will be valid upon a successful return value, else it will be NULL. -/// This texture chain must be eventually destroyed via ovr_DestroyTextureSwapChain before destroying the HMD with ovr_Destroy. +/// This texture chain must be eventually destroyed via ovr_DestroyTextureSwapChain before destroying the session with ovr_Destroy. /// /// \return Returns an ovrResult indicating success or failure. In the case of failure, use /// ovr_GetLastErrorInfo to get more information. @@ -88,7 +88,7 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainBufferDX(ovrSession sessio /// which must be the same one the application renders to the textures with. /// \param[in] desc Specifies requested texture properties. See notes for more info about texture format. /// \param[out] out_MirrorTexture Returns the created ovrMirrorTexture, which will be valid upon a successful return value, else it will be NULL. -/// This texture must be eventually destroyed via ovr_DestroyMirrorTexture before destroying the HMD with ovr_Destroy. +/// This texture must be eventually destroyed via ovr_DestroyMirrorTexture before destroying the session with ovr_Destroy. /// /// \return Returns an ovrResult indicating success or failure. In the case of failure, use /// ovr_GetLastErrorInfo to get more information. diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h index 1658ca57..81487947 100644 --- a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h +++ b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h @@ -15,7 +15,7 @@ /// \param[in] desc Specifies the requested texture properties. See notes for more info about texture format. /// \param[out] out_TextureSwapChain Returns the created ovrTextureSwapChain, which will be valid upon /// a successful return value, else it will be NULL. This texture swap chain must be eventually -/// destroyed via ovr_DestroyTextureSwapChain before destroying the HMD with ovr_Destroy. +/// destroyed via ovr_DestroyTextureSwapChain before destroying the session with ovr_Destroy. /// /// \return Returns an ovrResult indicating success or failure. In the case of failure, use /// ovr_GetLastErrorInfo to get more information. @@ -64,7 +64,7 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainBufferGL(ovrSession sessio /// \param[in] session Specifies an ovrSession previously returned by ovr_Create. /// \param[in] desc Specifies the requested mirror texture description. /// \param[out] out_MirrorTexture Specifies the created ovrMirrorTexture, which will be valid upon a successful return value, else it will be NULL. -/// This texture must be eventually destroyed via ovr_DestroyMirrorTexture before destroying the HMD with ovr_Destroy. +/// This texture must be eventually destroyed via ovr_DestroyMirrorTexture before destroying the session with ovr_Destroy. /// /// \return Returns an ovrResult indicating success or failure. In the case of failure, use /// ovr_GetLastErrorInfo to get more information. diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_ErrorCode.h b/src/external/OculusSDK/LibOVR/Include/OVR_ErrorCode.h index ed0be0e7..9fc527c7 100644 --- a/src/external/OculusSDK/LibOVR/Include/OVR_ErrorCode.h +++ b/src/external/OculusSDK/LibOVR/Include/OVR_ErrorCode.h @@ -14,9 +14,6 @@ - - - #ifndef OVR_RESULT_DEFINED #define OVR_RESULT_DEFINED ///< Allows ovrResult to be independently defined. /// API call results are represented at the highest level by a single ovrResult. @@ -59,27 +56,26 @@ typedef enum ovrSuccessType_ { /// This is a general success result. Use OVR_SUCCESS to test for success. ovrSuccess = 0, +} ovrSuccessType; +#endif +// Public success types +// Success is a value greater or equal to 0, while all error types are negative values. +typedef enum ovrSuccessTypes_ +{ /// Returned from a call to SubmitFrame. The call succeeded, but what the app /// rendered will not be visible on the HMD. Ideally the app should continue /// calling SubmitFrame, but not do any rendering. When the result becomes /// ovrSuccess, rendering should continue as usual. ovrSuccess_NotVisible = 1000, - ovrSuccess_HMDFirmwareMismatch = 4100, ///< The HMD Firmware is out of date but is acceptable. - ovrSuccess_TrackerFirmwareMismatch = 4101, ///< The Tracker Firmware is out of date but is acceptable. - ovrSuccess_ControllerFirmwareMismatch = 4104, ///< The controller firmware is out of date but is acceptable. - ovrSuccess_TrackerDriverNotFound = 4105, ///< The tracker driver interface was not found. Can be a temporary error - -} ovrSuccessType; -#endif - +} ovrSuccessTypes; +// Public error types typedef enum ovrErrorType_ { /* General errors */ ovrError_MemoryAllocationFailure = -1000, ///< Failure to allocate memory. - ovrError_SocketCreationFailure = -1001, ///< Failure to create a socket. ovrError_InvalidSession = -1002, ///< Invalid ovrSession parameter provided. ovrError_Timeout = -1003, ///< The operation timed out. ovrError_NotInitialized = -1004, ///< The system or component has not been initialized. @@ -94,10 +90,8 @@ typedef enum ovrErrorType_ ovrError_ServiceDeadlockDetected = -1014, ///< The service watchdog discovered a deadlock. /* Audio error range, reserved for Audio errors. */ - ovrError_AudioReservedBegin = -2000, ///< First Audio error. ovrError_AudioDeviceNotFound = -2001, ///< Failure to find the specified audio device. ovrError_AudioComError = -2002, ///< Generic COM error. - ovrError_AudioReservedEnd = -2999, ///< Last Audio error. /* Initialization errors. */ ovrError_Initialize = -3000, ///< Generic initialization error. @@ -122,51 +116,6 @@ typedef enum ovrErrorType_ ovrError_DisplayManagerInit = -3019, ///< Initialization of the DisplayManager failed. ovrError_TrackerDriverInit = -3020, ///< Failed to get the interface for an attached tracker - /* Hardware errors */ - ovrError_InvalidBundleAdjustment = -4000, ///< Headset has no bundle adjustment data. - ovrError_USBBandwidth = -4001, ///< The USB hub cannot handle the camera frame bandwidth. - ovrError_USBEnumeratedSpeed = -4002, ///< The USB camera is not enumerating at the correct device speed. - ovrError_ImageSensorCommError = -4003, ///< Unable to communicate with the image sensor. - ovrError_GeneralTrackerFailure = -4004, ///< We use this to report various sensor issues that don't fit in an easily classifiable bucket. - ovrError_ExcessiveFrameTruncation = -4005, ///< A more than acceptable number of frames are coming back truncated. - ovrError_ExcessiveFrameSkipping = -4006, ///< A more than acceptable number of frames have been skipped. - ovrError_SyncDisconnected = -4007, ///< The sensor is not receiving the sync signal (cable disconnected?). - ovrError_TrackerMemoryReadFailure = -4008, ///< Failed to read memory from the sensor. - ovrError_TrackerMemoryWriteFailure = -4009, ///< Failed to write memory from the sensor. - ovrError_TrackerFrameTimeout = -4010, ///< Timed out waiting for a camera frame. - ovrError_TrackerTruncatedFrame = -4011, ///< Truncated frame returned from sensor. - ovrError_TrackerDriverFailure = -4012, ///< The sensor driver has encountered a problem. - ovrError_TrackerNRFFailure = -4013, ///< The sensor wireless subsystem has encountered a problem. - ovrError_HardwareGone = -4014, ///< The hardware has been unplugged - ovrError_NordicEnabledNoSync = -4015, ///< The nordic indicates that sync is enabled but it is not sending sync pulses - ovrError_NordicSyncNoFrames = -4016, ///< It looks like we're getting a sync signal, but no camera frames have been received - ovrError_CatastrophicFailure = -4017, ///< A catastrophic failure has occurred. We will attempt to recover by resetting the device - ovrError_CatastrophicTimeout = -4018, ///< The catastrophic recovery has timed out. - ovrError_RepeatCatastrophicFail = -4019, ///< Catastrophic failure has repeated too many times. - ovrError_USBOpenDeviceFailure = -4020, ///< Could not open handle for Rift device (likely already in use by another process). - ovrError_HMDGeneralFailure = -4021, ///< Unexpected HMD issues that don't fit a specific bucket. - - ovrError_HMDFirmwareMismatch = -4100, ///< The HMD Firmware is out of date and is unacceptable. - ovrError_TrackerFirmwareMismatch = -4101, ///< The sensor Firmware is out of date and is unacceptable. - ovrError_BootloaderDeviceDetected = -4102, ///< A bootloader HMD is detected by the service. - ovrError_TrackerCalibrationError = -4103, ///< The sensor calibration is missing or incorrect. - ovrError_ControllerFirmwareMismatch = -4104, ///< The controller firmware is out of date and is unacceptable. - ovrError_DevManDeviceDetected = -4105, ///< A DeviceManagement mode HMD is detected by the service. - ovrError_RebootedBootloaderDevice = -4106, ///< Had to reboot bootloader device, which succeeded. - ovrError_FailedRebootBootloaderDev = -4107, ///< Had to reboot bootloader device, which failed. Device is stuck in bootloader mode. - - ovrError_IMUTooManyLostSamples = -4200, ///< Too many lost IMU samples. - ovrError_IMURateError = -4201, ///< IMU rate is outside of the expected range. - ovrError_FeatureReportFailure = -4202, ///< A feature report has failed. - ovrError_HMDWirelessTimeout = -4203, ///< HMD wireless interface never returned from busy state. - - ovrError_BootloaderAssertLog = -4300, ///< HMD Bootloader Assert Log was not empty. - ovrError_AppAssertLog = -4301, ///< HMD App Assert Log was not empty. - - /* Synchronization errors */ - ovrError_Incomplete = -5000, ///< Requested async work not yet complete. - ovrError_Abandoned = -5001, ///< Requested async work was abandoned and result is incomplete. - /* Rendering errors */ ovrError_DisplayLost = -6000, ///< In the event of a system-wide graphics reset or cable unplug this is returned to the app. ovrError_TextureSwapChainFull = -6001, ///< ovr_CommitTextureSwapChain was called too many times on a texture swapchain without calling submit to use the chain. @@ -182,18 +131,6 @@ typedef enum ovrErrorType_ ovrError_RuntimeException = -7000, ///< A runtime exception occurred. The application is required to shutdown LibOVR and re-initialize it before this error state will be cleared. - ovrError_MetricsUnknownApp = -90000, - ovrError_MetricsDuplicateApp = -90001, - ovrError_MetricsNoEvents = -90002, - ovrError_MetricsRuntime = -90003, - ovrError_MetricsFile = -90004, - ovrError_MetricsNoClientInfo = -90005, - ovrError_MetricsNoAppMetaData = -90006, - ovrError_MetricsNoApp = -90007, - ovrError_MetricsOafFailure = -90008, - ovrError_MetricsSessionAlreadyActive = -90009, - ovrError_MetricsSessionNotActive = -90010, - } ovrErrorType; @@ -206,4 +143,5 @@ typedef struct ovrErrorInfo_ char ErrorString[512]; ///< A UTF8-encoded null-terminated English string describing the problem. The format of this string is subject to change in future versions. } ovrErrorInfo; + #endif /* OVR_ErrorCode_h */ diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_Version.h b/src/external/OculusSDK/LibOVR/Include/OVR_Version.h index dbfe4deb..376fa7d5 100644 --- a/src/external/OculusSDK/LibOVR/Include/OVR_Version.h +++ b/src/external/OculusSDK/LibOVR/Include/OVR_Version.h @@ -19,7 +19,7 @@ // Master version numbers #define OVR_PRODUCT_VERSION 1 // Product version doesn't participate in semantic versioning. #define OVR_MAJOR_VERSION 1 // If you change these values then you need to also make sure to change LibOVR/Projects/Windows/LibOVR.props in parallel. -#define OVR_MINOR_VERSION 4 // +#define OVR_MINOR_VERSION 5 // #define OVR_PATCH_VERSION 0 #define OVR_BUILD_NUMBER 0 diff --git a/src/external/OculusSDK/LibOVR/LibOVRRT32_1.dll b/src/external/OculusSDK/LibOVR/LibOVRRT32_1.dll index 70f63f70..8553ce11 100644 Binary files a/src/external/OculusSDK/LibOVR/LibOVRRT32_1.dll and b/src/external/OculusSDK/LibOVR/LibOVRRT32_1.dll differ -- cgit v1.2.3 From c5bf9623d155efc94325b1ecc311d66a8ee2a704 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Tue, 20 Sep 2016 20:16:19 +0200 Subject: Updated LibOVR to SDK version 1.8 Weird, OVR_Version.h still points to 1.7, probably a typo... --- src/external/OculusSDK/LibOVR/Include/OVR_CAPI.h | 151 +++++++++++++-------- .../OculusSDK/LibOVR/Include/OVR_CAPI_Audio.h | 4 + .../OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h | 3 + .../OculusSDK/LibOVR/Include/OVR_CAPI_GL.h | 3 + .../OculusSDK/LibOVR/Include/OVR_ErrorCode.h | 9 ++ .../OculusSDK/LibOVR/Include/OVR_Version.h | 2 +- src/external/OculusSDK/LibOVR/LibOVRRT32_1.dll | Bin 1023952 -> 1044944 bytes 7 files changed, 114 insertions(+), 58 deletions(-) (limited to 'src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h') diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI.h b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI.h index 53340478..eaabcf59 100644 --- a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI.h +++ b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI.h @@ -271,6 +271,12 @@ typedef char ovrBool; ///< Boolean type //----------------------------------------------------------------------------------- // ***** Simple Math Structures +/// A RGBA color with normalized float components. +typedef struct OVR_ALIGNAS(4) ovrColorf_ +{ + float r, g, b, a; +} ovrColorf; + /// A 2D vector with integer components. typedef struct OVR_ALIGNAS(4) ovrVector2i_ { @@ -326,7 +332,7 @@ typedef struct OVR_ALIGNAS(4) ovrPosef_ /// A full pose (rigid body) configuration with first and second derivatives. /// /// Body refers to any object for which ovrPoseStatef is providing data. -/// It can be the HMD, Touch controller, sensor or something else. The context +/// It can be the HMD, Touch controller, sensor or something else. The context /// depends on the usage of the struct. typedef struct OVR_ALIGNAS(8) ovrPoseStatef_ { @@ -687,7 +693,7 @@ typedef enum ovrTextureFormat_ /// typedef enum ovrTextureMiscFlags_ { - ovrTextureMisc_None, + ovrTextureMisc_None, /// DX only: The underlying texture is created with a TYPELESS equivalent of the /// format specified in the texture desc. The SDK will still access the @@ -745,12 +751,12 @@ typedef struct ovrMirrorTextureData* ovrMirrorTexture; //----------------------------------------------------------------------------------- /// Describes button input types. -/// Button inputs are combined; that is they will be reported as pressed if they are +/// Button inputs are combined; that is they will be reported as pressed if they are /// pressed on either one of the two devices. /// The ovrButton_Up/Down/Left/Right map to both XBox D-Pad and directional buttons. /// The ovrButton_Enter and ovrButton_Return map to Start and Back controller buttons, respectively. typedef enum ovrButton_ -{ +{ ovrButton_A = 0x00000001, ovrButton_B = 0x00000002, ovrButton_RThumb = 0x00000004, @@ -758,7 +764,7 @@ typedef enum ovrButton_ ovrButton_X = 0x00000100, ovrButton_Y = 0x00000200, - ovrButton_LThumb = 0x00000400, + ovrButton_LThumb = 0x00000400, ovrButton_LShoulder = 0x00000800, // Navigation through DPad. @@ -770,7 +776,7 @@ typedef enum ovrButton_ ovrButton_Back = 0x00200000, // Back on Xbox controller. ovrButton_VolUp = 0x00400000, // only supported by Remote. ovrButton_VolDown = 0x00800000, // only supported by Remote. - ovrButton_Home = 0x01000000, + ovrButton_Home = 0x01000000, ovrButton_Private = ovrButton_VolUp | ovrButton_VolDown | ovrButton_Home, // Bit mask of all buttons on the right Touch controller @@ -807,7 +813,7 @@ typedef enum ovrTouch_ // Bit mask of all the button touches on the left controller ovrTouch_LButtonMask = ovrTouch_X | ovrTouch_Y | ovrTouch_LThumb | ovrTouch_LThumbRest | ovrTouch_LIndexTrigger, - // Finger pose state + // Finger pose state // Derived internally based on distance, proximity to sensors and filtering. ovrTouch_RIndexPointing = 0x00000020, ovrTouch_RThumbUp = 0x00000040, @@ -883,11 +889,20 @@ typedef struct ovrHapticsPlaybackState_ int SamplesQueued; } ovrHapticsPlaybackState; +/// Position tracked devices +typedef enum ovrTrackedDeviceType_ +{ + ovrTrackedDevice_HMD = 0x0001, + ovrTrackedDevice_LTouch = 0x0002, + ovrTrackedDevice_RTouch = 0x0004, + ovrTrackedDevice_Touch = 0x0006, + ovrTrackedDevice_All = 0xFFFF, +} ovrTrackedDeviceType; /// Provides names for the left and right hand array indexes. /// /// \see ovrInputState, ovrTrackingState -/// +/// typedef enum ovrHandType_ { ovrHand_Left = 0, @@ -903,27 +918,43 @@ typedef enum ovrHandType_ /// their inputs are combined. typedef struct ovrInputState_ { - // System type when the controller state was last updated. + /// System type when the controller state was last updated. double TimeInSeconds; - // Values for buttons described by ovrButton. + /// Values for buttons described by ovrButton. unsigned int Buttons; - // Touch values for buttons and sensors as described by ovrTouch. + /// Touch values for buttons and sensors as described by ovrTouch. unsigned int Touches; - - // Left and right finger trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. + + /// Left and right finger trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. + /// Returns 0 if the value would otherwise be less than 0.1176, for ovrControllerType_XBox float IndexTrigger[ovrHand_Count]; - - // Left and right hand trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. + + /// Left and right hand trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. float HandTrigger[ovrHand_Count]; - // Horizontal and vertical thumbstick axis values (ovrHand_Left and ovrHand_Right), in the range -1.0f to 1.0f. + /// Horizontal and vertical thumbstick axis values (ovrHand_Left and ovrHand_Right), in the range -1.0f to 1.0f. + /// Returns a deadzone (value 0) per each axis if the value on that axis would otherwise have been between -.2746 to +.2746, for ovrControllerType_XBox ovrVector2f Thumbstick[ovrHand_Count]; - // The type of the controller this state is for. + /// The type of the controller this state is for. ovrControllerType ControllerType; - + + /// Left and right finger trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. + /// Does not apply a deadzone + /// Added in 1.7 + float IndexTriggerNoDeadzone[ovrHand_Count]; + + /// Left and right hand trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. + /// Does not apply a deadzone + /// Added in 1.7 + float HandTriggerNoDeadzone[ovrHand_Count]; + + /// Horizontal and vertical thumbstick axis values (ovrHand_Left and ovrHand_Right), in the range -1.0f to 1.0f + /// Does not apply a deadzone + /// Added in 1.7 + ovrVector2f ThumbstickNoDeadzone[ovrHand_Count]; } ovrInputState; @@ -996,8 +1027,8 @@ typedef struct OVR_ALIGNAS(8) ovrInitParams_ /// Use NULL to specify no log callback. ovrLogCallback LogCallback; - /// 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 + /// 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. uintptr_t UserData; @@ -1014,6 +1045,7 @@ typedef struct OVR_ALIGNAS(8) ovrInitParams_ extern "C" { #endif +#if !defined(OVR_EXPORTING_CAPI) // ----------------------------------------------------------------------------------- // ***** API Interfaces @@ -1026,7 +1058,7 @@ extern "C" { /// followed by a call to ovr_Shutdown. ovr_Initialize calls are idempotent. /// Calling ovr_Initialize twice does not require two matching calls to ovr_Shutdown. /// If already initialized, the return value is ovr_Success. -/// +/// /// LibOVRRT shared library search order: /// -# Current working directory (often the same as the application directory). /// -# Module directory (usually the same as the application directory, @@ -1166,21 +1198,21 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_IdentifyClient(const char* identity); /// /// ovr_Initialize must have first been called in order for this to succeed, otherwise ovrHmdDesc::Type /// will be reported as ovrHmd_None. -/// +/// /// \param[in] session Specifies an ovrSession previously returned by ovr_Create, else NULL in which /// case this function detects whether an HMD is present and returns its info if so. /// -/// \return Returns an ovrHmdDesc. If the hmd is NULL and ovrHmdDesc::Type is ovrHmd_None then +/// \return Returns an ovrHmdDesc. If the hmd is NULL and ovrHmdDesc::Type is ovrHmd_None then /// no HMD is present. /// OVR_PUBLIC_FUNCTION(ovrHmdDesc) ovr_GetHmdDesc(ovrSession session); -/// Returns the number of sensors. +/// Returns the number of sensors. /// -/// The number of sensors may change at any time, so this function should be called before use +/// The number of sensors may change at any time, so this function should be called before use /// as opposed to once on startup. -/// +/// /// \param[in] session Specifies an ovrSession previously returned by ovr_Create. /// /// \return Returns unsigned int count. @@ -1190,15 +1222,15 @@ OVR_PUBLIC_FUNCTION(unsigned int) ovr_GetTrackerCount(ovrSession session); /// Returns a given sensor description. /// -/// It's possible that sensor desc [0] may indicate a unconnnected or non-pose tracked sensor, but +/// It's possible that sensor desc [0] may indicate a unconnnected or non-pose tracked sensor, but /// sensor desc [1] may be connected. /// /// ovr_Initialize must have first been called in order for this to succeed, otherwise the returned /// trackerDescArray will be zero-initialized. The data returned by this function can change at runtime. -/// +/// /// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// -/// \param[in] trackerDescIndex Specifies a sensor index. The valid indexes are in the range of 0 to +/// +/// \param[in] trackerDescIndex Specifies a sensor index. The valid indexes are in the range of 0 to /// the sensor count returned by ovr_GetTrackerCount. /// /// \return Returns ovrTrackerDesc. An empty ovrTrackerDesc will be returned if trackerDescIndex is out of range. @@ -1242,6 +1274,7 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_Create(ovrSession* pSession, ovrGraphicsLuid* /// OVR_PUBLIC_FUNCTION(void) ovr_Destroy(ovrSession session); +#endif // !defined(OVR_EXPORTING_CAPI) /// Specifies status information for the current session. /// @@ -1253,10 +1286,11 @@ typedef struct ovrSessionStatus_ ovrBool HmdPresent; ///< True if an HMD is present. ovrBool HmdMounted; ///< True if the HMD is on the user's head. ovrBool DisplayLost; ///< True if the session is in a display-lost state. See ovr_SubmitFrame. - ovrBool ShouldQuit; ///< True if the application should initiate shutdown. + ovrBool ShouldQuit; ///< True if the application should initiate shutdown. ovrBool ShouldRecenter; ///< True if UX has requested re-centering. Must call ovr_ClearShouldRecenterFlag or ovr_RecenterTrackingOrigin. }ovrSessionStatus; +#if !defined(OVR_EXPORTING_CAPI) /// Returns status information for the application. /// @@ -1293,7 +1327,7 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetSessionStatus(ovrSession session, ovrSessi /// /// When the tracking origin is changed, all of the calls that either provide /// or accept ovrPosef will use the new tracking origin provided. -/// +/// /// \param[in] session Specifies an ovrSession previously returned by ovr_Create. /// \param[in] origin Specifies an ovrTrackingOrigin to be used for all ovrPosef /// @@ -1305,7 +1339,7 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_SetTrackingOriginType(ovrSession session, ovr /// Gets the tracking origin state -/// +/// /// \param[in] session Specifies an ovrSession previously returned by ovr_Create. /// /// \return Returns the ovrTrackingOrigin that was either set by default, or previous set by the application. @@ -1319,9 +1353,9 @@ OVR_PUBLIC_FUNCTION(ovrTrackingOrigin) ovr_GetTrackingOriginType(ovrSession sess /// This resets the (x,y,z) positional components and the yaw orientation component. /// The Roll and pitch orientation components are always determined by gravity and cannot /// be redefined. All future tracking will report values relative to this new reference position. -/// If you are using ovrTrackerPoses then you will need to call ovr_GetTrackerPose after +/// If you are using ovrTrackerPoses then you will need to call ovr_GetTrackerPose after /// this, because the sensor position(s) will change as a result of this. -/// +/// /// The headset cannot be facing vertically upward or downward but rather must be roughly /// level otherwise this function will fail with ovrError_InvalidHeadsetOrientation. /// @@ -1343,7 +1377,7 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_RecenterTrackingOrigin(ovrSession session); /// Clears the ShouldRecenter status bit in ovrSessionStatus. /// -/// Clears the ShouldRecenter status bit in ovrSessionStatus, allowing further recenter +/// Clears the ShouldRecenter status bit in ovrSessionStatus, allowing further recenter /// requests to be detected. Since this is automatically done by ovr_RecenterTrackingOrigin, /// this is only needs to be called when application is doing its own re-centering. OVR_PUBLIC_FUNCTION(void) ovr_ClearShouldRecenterFlag(ovrSession session); @@ -1444,11 +1478,11 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_SubmitControllerVibration(ovrSession session, /// \param[in] outState State of the haptics engine. /// \return Returns ovrSuccess upon success. /// \see ovrHapticsPlaybackState -/// +/// OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetControllerVibrationState(ovrSession session, ovrControllerType controllerType, ovrHapticsPlaybackState* outState); -///@} +#endif // !defined(OVR_EXPORTING_CAPI) //------------------------------------------------------------------------------------- // @name Layers @@ -1672,7 +1706,7 @@ typedef union ovrLayer_Union_ //@} - +#if !defined(OVR_EXPORTING_CAPI) /// @name SDK Distortion Rendering /// @@ -1695,7 +1729,7 @@ typedef union ovrLayer_Union_ /// \param[in] chain Specifies the ovrTextureSwapChain for which the length should be retrieved. /// \param[out] out_Length Returns the number of buffers in the specified chain. /// -/// \return Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. +/// \return Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. /// /// \see ovr_CreateTextureSwapChainDX, ovr_CreateTextureSwapChainGL /// @@ -1707,7 +1741,7 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainLength(ovrSession session, /// \param[in] chain Specifies the ovrTextureSwapChain for which the index should be retrieved. /// \param[out] out_Index Returns the current (free) index in specified chain. /// -/// \return Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. +/// \return Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. /// /// \see ovr_CreateTextureSwapChainDX, ovr_CreateTextureSwapChainGL /// @@ -1719,7 +1753,7 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainCurrentIndex(ovrSession se /// \param[in] chain Specifies the ovrTextureSwapChain for which the description should be retrieved. /// \param[out] out_Desc Returns the description of the specified chain. /// -/// \return Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. +/// \return Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. /// /// \see ovr_CreateTextureSwapChainDX, ovr_CreateTextureSwapChainGL /// @@ -1736,7 +1770,7 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainDesc(ovrSession session, o /// it will synchronize with the app's graphics context and pick up the submitted index, opening up /// room in the swap chain for further commits. /// -/// \return Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. +/// \return Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. /// Failures include but aren't limited to: /// - ovrError_TextureSwapChainFull: ovr_CommitTextureSwapChain was called too many times on a texture swapchain without calling submit to use the chain. /// @@ -1864,7 +1898,7 @@ OVR_PUBLIC_FUNCTION(ovrEyeRenderDesc) ovr_GetRenderDesc(ovrSession session, /// destroyed (ovr_Destroy) and recreated (ovr_Create), and new resources need to be created /// (ovr_CreateTextureSwapChainXXX). The application's existing private graphics resources do not /// need to be recreated unless the new ovr_Create call returns a different GraphicsLuid. -/// - ovrError_TextureSwapChainInvalid: The ovrTextureSwapChain is in an incomplete or inconsistent state. +/// - ovrError_TextureSwapChainInvalid: The ovrTextureSwapChain is in an incomplete or inconsistent state. /// Ensure ovr_CommitTextureSwapChain was called at least once first. /// /// \see ovr_GetPredictedDisplayTime, ovrViewScaleDesc, ovrLayerHeader @@ -1874,7 +1908,7 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_SubmitFrame(ovrSession session, long long fra ovrLayerHeader const * const * layerPtrList, unsigned int layerCount); ///@} - +#endif // !defined(OVR_EXPORTING_CAPI) //------------------------------------------------------------------------------------- /// @name Frame Timing @@ -1882,26 +1916,28 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_SubmitFrame(ovrSession session, long long fra //@{ +#if !defined(OVR_EXPORTING_CAPI) + /// Gets the time of the specified frame midpoint. /// -/// Predicts the time at which the given frame will be displayed. The predicted time -/// is the middle of the time period during which the corresponding eye images will -/// be displayed. +/// Predicts the time at which the given frame will be displayed. The predicted time +/// is the middle of the time period during which the corresponding eye images will +/// be displayed. /// /// The application should increment frameIndex for each successively targeted frame, -/// and pass that index to any relevent OVR functions that need to apply to the frame +/// and pass that index to any relevant OVR functions that need to apply to the frame /// identified by that index. /// /// This function is thread-safe and allows for multiple application threads to target /// their processing to the same displayed frame. -/// +/// /// In the even that prediction fails due to various reasons (e.g. the display being off /// or app has yet to present any frames), the return value will be current CPU time. -/// +/// /// \param[in] session Specifies an ovrSession previously returned by ovr_Create. /// \param[in] frameIndex Identifies the frame the caller wishes to target. /// A value of zero returns the next frame index. -/// \return Returns the absolute frame midpoint time for the given frameIndex. +/// \return Returns the absolute frame midpoint time for the given frameIndex. /// \see ovr_GetTimeInSeconds /// OVR_PUBLIC_FUNCTION(double) ovr_GetPredictedDisplayTime(ovrSession session, long long frameIndex); @@ -1917,6 +1953,7 @@ OVR_PUBLIC_FUNCTION(double) ovr_GetPredictedDisplayTime(ovrSession session, long /// OVR_PUBLIC_FUNCTION(double) ovr_GetTimeInSeconds(); +#endif // !defined(OVR_EXPORTING_CAPI) /// Performance HUD enables the HMD user to see information critical to /// the real-time operation of the VR application such as latency timing, @@ -1958,7 +1995,7 @@ typedef enum ovrLayerHudMode_ ///@} /// Debug HUD is provided to help developers gauge and debug the fidelity of their app's -/// stereo rendering characteristics. Using the provided quad and crosshair guides, +/// stereo rendering characteristics. Using the provided quad and crosshair guides, /// the developer can verify various aspects such as VR tracking units (e.g. meters), /// stereo camera-parallax properties (e.g. making sure objects at infinity are rendered /// with the proper separation), measuring VR geometry sizes and distances and more. @@ -1984,7 +2021,7 @@ typedef enum ovrDebugHudStereoMode_ } ovrDebugHudStereoMode; - +#if !defined(OVR_EXPORTING_CAPI) // ----------------------------------------------------------------------------------- /// @name Property Access @@ -2102,7 +2139,7 @@ OVR_PUBLIC_FUNCTION(ovrBool) ovr_SetString(ovrSession session, const char* prope ///@} - +#endif // !defined(OVR_EXPORTING_CAPI) #ifdef __cplusplus } // extern "C" @@ -2163,10 +2200,10 @@ OVR_STATIC_ASSERT(sizeof(ovrLogLevel) == 4, "ovrLogLevel size mismatch"); OVR_STATIC_ASSERT(sizeof(ovrInitParams) == 4 + 4 + sizeof(ovrLogCallback) + sizeof(uintptr_t) + 4 + 4, "ovrInitParams size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrHmdDesc) == +OVR_STATIC_ASSERT(sizeof(ovrHmdDesc) == + sizeof(ovrHmdType) // Type OVR_ON64(+ 4) // pad0 - + 64 // ProductName + + 64 // ProductName + 64 // Manufacturer + 2 // VendorId + 2 // ProductId diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_Audio.h b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_Audio.h index 930dfcbe..dc61e19e 100644 --- a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_Audio.h +++ b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_Audio.h @@ -17,6 +17,8 @@ #include "OVR_CAPI.h" #define OVR_AUDIO_MAX_DEVICE_STR_SIZE 128 +#if !defined(OVR_EXPORTING_CAPI) + /// Gets the ID of the preferred VR audio output device. /// /// \param[out] deviceOutId The ID of the user's preferred VR audio device to use, which will be valid upon a successful return value, else it will be WAVE_MAPPER. @@ -75,6 +77,8 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInGuidStr(WCHAR deviceInStrBuff /// OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInGuid(GUID* deviceInGuid); +#endif // !defined(OVR_EXPORTING_CAPI) + #endif //OVR_OS_MS #endif // OVR_CAPI_Audio_h diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h index 982af8f0..374dab84 100644 --- a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h +++ b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h @@ -14,6 +14,8 @@ #if defined (_WIN32) #include +#if !defined(OVR_EXPORTING_CAPI) + //----------------------------------------------------------------------------------- // ***** Direct3D Specific @@ -149,6 +151,7 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetMirrorTextureBufferDX(ovrSession session, IID iid, void** out_Buffer); +#endif // !defined(OVR_EXPORTING_CAPI) #endif // _WIN32 diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h index 81487947..1c073f46 100644 --- a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h +++ b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h @@ -9,6 +9,8 @@ #include "OVR_CAPI.h" +#if !defined(OVR_EXPORTING_CAPI) + /// Creates a TextureSwapChain suitable for use with OpenGL. /// /// \param[in] session Specifies an ovrSession previously returned by ovr_Create. @@ -95,5 +97,6 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetMirrorTextureBufferGL(ovrSession session, ovrMirrorTexture mirrorTexture, unsigned int* out_TexId); +#endif // !defined(OVR_EXPORTING_CAPI) #endif // OVR_CAPI_GL_h diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_ErrorCode.h b/src/external/OculusSDK/LibOVR/Include/OVR_ErrorCode.h index 9fc527c7..a8b810ea 100644 --- a/src/external/OculusSDK/LibOVR/Include/OVR_ErrorCode.h +++ b/src/external/OculusSDK/LibOVR/Include/OVR_ErrorCode.h @@ -88,6 +88,7 @@ typedef enum ovrErrorType_ ovrError_ClientSkippedDestroy = -1012, ///< The client failed to call ovr_Destroy on an active session before calling ovr_Shutdown. Or the client crashed. ovrError_ClientSkippedShutdown = -1013, ///< The client failed to call ovr_Shutdown or the client crashed. ovrError_ServiceDeadlockDetected = -1014, ///< The service watchdog discovered a deadlock. + ovrError_InvalidOperation = -1015, ///< Function call is invalid for object's current state /* Audio error range, reserved for Audio errors. */ ovrError_AudioDeviceNotFound = -2001, ///< Failure to find the specified audio device. @@ -115,6 +116,9 @@ typedef enum ovrErrorType_ ovrError_HybridGraphicsNotSupported = -3018, ///< The system is using hybrid graphics (Optimus, etc...), which is not support. ovrError_DisplayManagerInit = -3019, ///< Initialization of the DisplayManager failed. ovrError_TrackerDriverInit = -3020, ///< Failed to get the interface for an attached tracker + ovrError_LibSignCheck = -3021, ///< LibOVRRT signature check failure. + ovrError_LibPath = -3022, ///< LibOVRRT path failure. + ovrError_LibSymbols = -3023, ///< LibOVRRT symbol resolution failure. /* Rendering errors */ ovrError_DisplayLost = -6000, ///< In the event of a system-wide graphics reset or cable unplug this is returned to the app. @@ -130,6 +134,11 @@ typedef enum ovrErrorType_ /* Fatal errors */ ovrError_RuntimeException = -7000, ///< A runtime exception occurred. The application is required to shutdown LibOVR and re-initialize it before this error state will be cleared. + /* Calibration errors */ + ovrError_NoCalibration = -9000, ///< Result of a missing calibration block + ovrError_OldVersion = -9001, ///< Result of an old calibration block + ovrError_MisformattedBlock = -9002, ///< Result of a bad calibration block due to lengths + } ovrErrorType; diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_Version.h b/src/external/OculusSDK/LibOVR/Include/OVR_Version.h index d8378304..8d213df5 100644 --- a/src/external/OculusSDK/LibOVR/Include/OVR_Version.h +++ b/src/external/OculusSDK/LibOVR/Include/OVR_Version.h @@ -19,7 +19,7 @@ // Master version numbers #define OVR_PRODUCT_VERSION 1 // Product version doesn't participate in semantic versioning. #define OVR_MAJOR_VERSION 1 // If you change these values then you need to also make sure to change LibOVR/Projects/Windows/LibOVR.props in parallel. -#define OVR_MINOR_VERSION 6 // +#define OVR_MINOR_VERSION 7 // #define OVR_PATCH_VERSION 0 #define OVR_BUILD_NUMBER 0 diff --git a/src/external/OculusSDK/LibOVR/LibOVRRT32_1.dll b/src/external/OculusSDK/LibOVR/LibOVRRT32_1.dll index 843c0e44..7a42d443 100644 Binary files a/src/external/OculusSDK/LibOVR/LibOVRRT32_1.dll and b/src/external/OculusSDK/LibOVR/LibOVRRT32_1.dll differ -- cgit v1.2.3