├── .gitattributes ├── .gitignore ├── Common0.5 ├── Win32_DX11AppUtil.h ├── Win32_GLAppUtil.h ├── Win32_Gamepad.h ├── Win32_Platform.h ├── Win32_RoomTiny_AppRender.h └── Win32_RoomTiny_ExampleFeatures.h ├── Common0.6 ├── Win32_AppRendered.h ├── Win32_BasicVR.h ├── Win32_CameraCone.h ├── Win32_ControlMethods.h ├── Win32_DirectXAppUtil.h └── Win32_GLAppUtil.h ├── Common0.7 ├── Old │ ├── Win32_BasicVR.h │ ├── Win32_DirectXAppUtil.h │ └── Win32_GLAppUtil.h ├── Win32_AppRendered.h ├── Win32_BasicVR.h ├── Win32_CameraCone.h ├── Win32_ControlMethods.h ├── Win32_DirectXAppUtil.h └── Win32_GLAppUtil.h ├── Common0.8 ├── Win32_AppRendered.h ├── Win32_BasicVR.h ├── Win32_CameraCone.h ├── Win32_ControlMethods.h ├── Win32_DirectXAppUtil.h └── Win32_GLAppUtil.h ├── LibOVR ├── Include │ ├── Extras │ │ ├── OVR_CAPI_Util.h │ │ ├── OVR_Math.h │ │ └── OVR_StereoProjection.h │ ├── OVR_CAPI.h │ ├── OVR_CAPI_Audio.h │ ├── OVR_CAPI_D3D.h │ ├── OVR_CAPI_GL.h │ ├── OVR_CAPI_Keys.h │ ├── OVR_ErrorCode.h │ └── OVR_Version.h ├── LICENSE.txt ├── LibOVR.sln ├── Projects │ └── Windows │ │ ├── ForceRebuild.props │ │ ├── LibOVR.props │ │ ├── OVRRootPath.props │ │ ├── VS2010 │ │ ├── LibOVR.vcxproj │ │ └── LibOVR.vcxproj.filters │ │ ├── VS2012 │ │ ├── LibOVR.vcxproj │ │ └── LibOVR.vcxproj.filters │ │ ├── VS2013 │ │ ├── LibOVR.vcxproj │ │ └── LibOVR.vcxproj.filters │ │ └── VS2015 │ │ ├── LibOVR.vcxproj │ │ ├── LibOVR.vcxproj.filters │ │ └── OVR_ForceRebuildNoCheckin.h └── Src │ ├── OVR_CAPIShim.c │ ├── OVR_CAPI_Util.cpp │ ├── OVR_StereoProjection.cpp │ └── Resources │ └── Windows │ ├── LibOVR.rc │ ├── Oculus.ico │ └── resource.h ├── LibOVR0.5 ├── Include │ ├── Extras │ │ └── OVR_Math.h │ ├── OVR.h │ ├── OVR_CAPI.h │ ├── OVR_CAPI_0_5_0.h │ ├── OVR_CAPI_D3D.h │ ├── OVR_CAPI_GL.h │ ├── OVR_CAPI_Keys.h │ ├── OVR_CAPI_Util.h │ ├── OVR_Kernel.h │ └── OVR_Version.h ├── Projects │ └── Windows │ │ ├── LibOVR.props │ │ ├── OVRRootPath.props │ │ ├── VS2010 │ │ ├── LibOVR.vcxproj │ │ └── LibOVR.vcxproj.filters │ │ ├── VS2012 │ │ ├── LibOVR.vcxproj │ │ └── LibOVR.vcxproj.filters │ │ └── VS2013 │ │ ├── LibOVR.vcxproj │ │ └── LibOVR.vcxproj.filters └── Src │ ├── OVR_CAPIShim.c │ ├── OVR_CAPI_Util.cpp │ ├── OVR_StereoProjection.cpp │ ├── OVR_StereoProjection.h │ └── Resources │ └── Windows │ ├── LibOVR.rc │ ├── Oculus.ico │ └── resource.h ├── LibOVR0.6 ├── Include │ ├── Extras │ │ └── OVR_Math.h │ ├── OVR.h │ ├── OVR_CAPI.h │ ├── OVR_CAPI_0_6_0.h │ ├── OVR_CAPI_D3D.h │ ├── OVR_CAPI_GL.h │ ├── OVR_CAPI_Keys.h │ ├── OVR_CAPI_Util.h │ ├── OVR_ErrorCode.h │ ├── OVR_Kernel.h │ └── OVR_Version.h ├── Projects │ └── Windows │ │ ├── ForceRebuild.props │ │ ├── LibOVR.props │ │ ├── OVRRootPath.props │ │ ├── VS2010 │ │ ├── LibOVR.vcxproj │ │ └── LibOVR.vcxproj.filters │ │ ├── VS2012 │ │ ├── LibOVR.vcxproj │ │ └── LibOVR.vcxproj.filters │ │ └── VS2013 │ │ ├── LibOVR.vcxproj │ │ ├── LibOVR.vcxproj.filters │ │ └── OVR_ForceRebuildNoCheckin.h └── Src │ ├── OVR_CAPIShim.c │ ├── OVR_CAPI_Util.cpp │ ├── OVR_StereoProjection.cpp │ ├── OVR_StereoProjection.h │ └── Resources │ └── Windows │ ├── LibOVR.rc │ ├── Oculus.ico │ └── resource.h ├── LibOVR0.7 ├── Include │ ├── Extras │ │ ├── OVR_CAPI_Util.h │ │ ├── OVR_Math.h │ │ └── OVR_StereoProjection.h │ ├── OVR.h │ ├── OVR_CAPI.h │ ├── OVR_CAPI_0_7_0.h │ ├── OVR_CAPI_D3D.h │ ├── OVR_CAPI_GL.h │ ├── OVR_CAPI_Keys.h │ ├── OVR_ErrorCode.h │ ├── OVR_Kernel.h │ └── OVR_Version.h ├── LICENSE.txt ├── Projects │ └── Windows │ │ ├── ForceRebuild.props │ │ ├── LibOVR.props │ │ ├── OVRRootPath.props │ │ ├── VS2010 │ │ ├── LibOVR.vcxproj │ │ └── LibOVR.vcxproj.filters │ │ ├── VS2012 │ │ ├── LibOVR.vcxproj │ │ └── LibOVR.vcxproj.filters │ │ └── VS2013 │ │ ├── LibOVR.vcxproj │ │ ├── LibOVR.vcxproj.filters │ │ └── OVR_ForceRebuildNoCheckin.h └── Src │ ├── OVR_CAPIShim.c │ ├── OVR_CAPI_Util.cpp │ ├── OVR_StereoProjection.cpp │ └── Resources │ └── Windows │ ├── LibOVR.rc │ ├── Oculus.ico │ └── resource.h ├── LibOVR0.8 ├── Include │ ├── Extras │ │ ├── OVR_CAPI_Util.h │ │ ├── OVR_Math.h │ │ └── OVR_StereoProjection.h │ ├── OVR.h │ ├── OVR_CAPI.h │ ├── OVR_CAPI_0_8_0.h │ ├── OVR_CAPI_Audio.h │ ├── OVR_CAPI_D3D.h │ ├── OVR_CAPI_GL.h │ ├── OVR_CAPI_Keys.h │ ├── OVR_ErrorCode.h │ ├── OVR_Kernel.h │ └── OVR_Version.h ├── LICENSE.txt ├── Projects │ └── Windows │ │ ├── ForceRebuild.props │ │ ├── LibOVR.props │ │ ├── OVRRootPath.props │ │ ├── VS2010 │ │ ├── LibOVR.vcxproj │ │ └── LibOVR.vcxproj.filters │ │ ├── VS2012 │ │ ├── LibOVR.vcxproj │ │ └── LibOVR.vcxproj.filters │ │ ├── VS2013 │ │ ├── LibOVR.vcxproj │ │ └── LibOVR.vcxproj.filters │ │ └── VS2015 │ │ ├── LibOVR.vcxproj.filters │ │ ├── LibOVR0.8.vcxproj │ │ └── OVR_ForceRebuildNoCheckin.h └── Src │ ├── OVR_CAPIShim.c │ ├── OVR_CAPI_Util.cpp │ ├── OVR_StereoProjection.cpp │ └── Resources │ └── Windows │ ├── LibOVR.rc │ ├── Oculus.ico │ └── resource.h ├── LibOVRKernel0.5 ├── Projects │ └── Windows │ │ ├── OVRRootPath.props │ │ ├── VS2010 │ │ ├── LibOVRKernel.vcxproj │ │ └── LibOVRKernel.vcxproj.filters │ │ ├── VS2012 │ │ ├── LibOVRKernel.vcxproj │ │ └── LibOVRKernel.vcxproj.filters │ │ └── VS2013 │ │ ├── LibOVRKernel.sln │ │ ├── LibOVRKernel.vcxproj │ │ └── LibOVRKernel.vcxproj.filters └── Src │ ├── GL │ ├── CAPI_GLE.cpp │ ├── CAPI_GLE.h │ └── CAPI_GLE_GL.h │ ├── Kernel │ ├── OVR_Alg.cpp │ ├── OVR_Alg.h │ ├── OVR_Allocator.cpp │ ├── OVR_Allocator.h │ ├── OVR_Array.h │ ├── OVR_Atomic.cpp │ ├── OVR_Atomic.h │ ├── OVR_CRC32.cpp │ ├── OVR_CRC32.h │ ├── OVR_Callbacks.cpp │ ├── OVR_Callbacks.h │ ├── OVR_CallbacksInternal.h │ ├── OVR_Color.h │ ├── OVR_Compiler.h │ ├── OVR_ContainerAllocator.h │ ├── OVR_DebugHelp.cpp │ ├── OVR_DebugHelp.h │ ├── OVR_Delegates.h │ ├── OVR_Deque.h │ ├── OVR_File.cpp │ ├── OVR_File.h │ ├── OVR_FileFILE.cpp │ ├── OVR_Hash.h │ ├── OVR_JSON.cpp │ ├── OVR_JSON.h │ ├── OVR_KeyCodes.h │ ├── OVR_List.h │ ├── OVR_Lockless.cpp │ ├── OVR_Lockless.h │ ├── OVR_Log.cpp │ ├── OVR_Log.h │ ├── OVR_Nullptr.h │ ├── OVR_Rand.cpp │ ├── OVR_Rand.h │ ├── OVR_RefCount.cpp │ ├── OVR_RefCount.h │ ├── OVR_SharedMemory.cpp │ ├── OVR_SharedMemory.h │ ├── OVR_Std.cpp │ ├── OVR_Std.h │ ├── OVR_String.cpp │ ├── OVR_String.h │ ├── OVR_StringHash.h │ ├── OVR_String_FormatUtil.cpp │ ├── OVR_String_PathUtil.cpp │ ├── OVR_SysFile.cpp │ ├── OVR_SysFile.h │ ├── OVR_System.cpp │ ├── OVR_System.h │ ├── OVR_ThreadCommandQueue.cpp │ ├── OVR_ThreadCommandQueue.h │ ├── OVR_Threads.h │ ├── OVR_ThreadsPthread.cpp │ ├── OVR_ThreadsWinAPI.cpp │ ├── OVR_Timer.cpp │ ├── OVR_Timer.h │ ├── OVR_Types.h │ ├── OVR_UTF8Util.cpp │ ├── OVR_UTF8Util.h │ ├── OVR_Win32_IncludeWindows.h │ ├── OVR_mach_exc_OSX.c │ └── OVR_mach_exc_OSX.h │ ├── Tracing │ ├── LibOVREvents.h │ ├── LibOVREvents.man │ ├── LibOVREventsTEMP.BIN │ ├── LibOVREvents_MSG00001.bin │ ├── README.md │ ├── Tracing.h │ ├── build.cmd │ ├── clean.cmd │ └── install.cmd │ └── Util │ ├── Util_Direct3D.cpp │ ├── Util_Direct3D.h │ ├── Util_GetSystemSpecs.cpp │ ├── Util_ImageWindow.cpp │ ├── Util_ImageWindow.h │ ├── Util_LongPollThread.cpp │ ├── Util_LongPollThread.h │ ├── Util_SystemGUI.cpp │ ├── Util_SystemGUI.h │ ├── Util_SystemGUI_OSX.mm │ ├── Util_SystemInfo.cpp │ ├── Util_SystemInfo.h │ ├── Util_SystemInfo_OSX.mm │ ├── Util_Watchdog.cpp │ └── Util_Watchdog.h ├── LibOVRWrapper.sln ├── LibOVRWrapper0.5 ├── LibOVRWrapper.vcxproj ├── LibOVRWrapper.vcxproj.filters ├── OVRShim.cpp ├── OVRShim.h ├── OVRShim_D3D.cpp ├── OVRShim_GL.cpp ├── OVR_CAPI_Util.cpp ├── OVR_StereoProjection.cpp ├── OVR_StereoProjection.h ├── dllmain.cpp ├── packages.config ├── shimhelper.cpp ├── shimhelper.h ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── LibOVRWrapper0.6 ├── LibOVRWrapper.vcxproj ├── LibOVRWrapper.vcxproj.filters ├── OVRShim.cpp ├── OVRShim.h ├── OVRShim_D3D.cpp ├── OVRShim_GL.cpp ├── OVR_CAPI_Util.cpp ├── OVR_StereoProjection.cpp ├── OVR_StereoProjection.h ├── WrapperSettings.cpp ├── WrapperSettings.h ├── dllmain.cpp ├── packages.config ├── shimhelper.cpp ├── shimhelper.h ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── LibOVRWrapper0.7 ├── LibOVRWrapper.vcxproj ├── LibOVRWrapper.vcxproj.filters ├── OVRShim.cpp ├── OVRShim.h ├── OVRShim_D3D.cpp ├── OVRShim_GL.cpp ├── dllmain.cpp ├── shimhelper.cpp ├── shimhelper.h ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── LibOVRWrapper0.8 ├── LibOVRWrapper.vcxproj ├── LibOVRWrapper.vcxproj.filters ├── OVRShim.cpp ├── OVRShim.h ├── OVRShim_D3D.cpp ├── OVRShim_GL.cpp ├── dllmain.cpp ├── shimhelper.cpp ├── shimhelper.h ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── OculusRoomTiny (DX11)0.6 ├── Projects │ └── Windows │ │ ├── OVRRootPath.props │ │ ├── VS2010 │ │ └── OculusRoomTiny (DX11).vcxproj │ │ ├── VS2012 │ │ └── OculusRoomTiny (DX11).vcxproj │ │ └── VS2013 │ │ ├── OculusRoomTiny (DX11).vcxproj │ │ └── OculusRoomTiny (DX11).vcxproj.filters └── main.cpp ├── OculusRoomTiny (DX11)0.7 ├── Projects │ └── Windows │ │ ├── OVRRootPath.props │ │ ├── VS2010 │ │ └── OculusRoomTiny (DX11).vcxproj │ │ ├── VS2012 │ │ └── OculusRoomTiny (DX11).vcxproj │ │ └── VS2013 │ │ ├── OculusRoomTiny (DX11)0.7.vcxproj │ │ └── OculusRoomTiny (DX11)0.7.vcxproj.filters └── main.cpp ├── OculusRoomTiny (DX11)0.8 ├── Projects │ └── Windows │ │ ├── OVRRootPath.props │ │ ├── VS2010 │ │ └── OculusRoomTiny (DX11).vcxproj │ │ ├── VS2012 │ │ └── OculusRoomTiny (DX11).vcxproj │ │ ├── VS2013 │ │ ├── OculusRoomTiny (DX11).vcxproj │ │ └── OculusRoomTiny (DX11).vcxproj.filters │ │ └── VS2015 │ │ ├── OculusRoomTiny (DX11).vcxproj │ │ └── OculusRoomTiny (DX11).vcxproj.filters └── main.cpp ├── OculusRoomTiny (GL)0.6 ├── Projects │ └── Windows │ │ ├── OVRRootPath.props │ │ ├── VS2010 │ │ └── OculusRoomTiny (GL).vcxproj │ │ ├── VS2012 │ │ └── OculusRoomTiny (GL).vcxproj │ │ └── VS2013 │ │ ├── OculusRoomTiny (GL).vcxproj │ │ └── OculusRoomTiny (GL).vcxproj.filters └── main.cpp ├── OculusRoomTiny (GL)0.7 ├── Projects │ └── Windows │ │ ├── OVRRootPath.props │ │ ├── VS2010 │ │ └── OculusRoomTiny (GL).vcxproj │ │ ├── VS2012 │ │ └── OculusRoomTiny (GL).vcxproj │ │ └── VS2013 │ │ ├── OculusRoomTiny (GL)0.7.vcxproj │ │ └── OculusRoomTiny (GL)0.7.vcxproj.filters └── main.cpp ├── OculusRoomTiny (GL)0.8 ├── Projects │ └── Windows │ │ ├── OVRRootPath.props │ │ ├── VS2010 │ │ └── OculusRoomTiny (GL).vcxproj │ │ ├── VS2012 │ │ └── OculusRoomTiny (GL).vcxproj │ │ ├── VS2013 │ │ ├── OculusRoomTiny (GL).vcxproj │ │ └── OculusRoomTiny (GL).vcxproj.filters │ │ └── VS2015 │ │ ├── OculusRoomTiny (GL).vcxproj │ │ └── OculusRoomTiny (GL).vcxproj.filters └── main.cpp ├── OculusRoomTiny 0.5 ├── Projects │ └── Windows │ │ ├── OVRRootPath.props │ │ ├── VS2010 │ │ └── OculusRoomTiny.vcxproj │ │ ├── VS2012 │ │ └── OculusRoomTiny.vcxproj │ │ └── VS2013 │ │ └── OculusRoomTiny.vcxproj ├── Win32_DX11AppUtil.h ├── Win32_GLAppUtil.h └── Win32_RoomTiny_Main.cpp ├── README.md └── install_RunAsAdministrator.bat /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /Common0.5/Win32_Gamepad.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : Win32_Gamepad.h 4 | Content : Win32 implementation of Gamepad functionality. 5 | Created : May 6, 2013 6 | Authors : Lee Cooper 7 | 8 | Copyright : Copyright 2012 Oculus VR, LLC. All Rights reserved. 9 | 10 | Licensed under the Apache License, Version 2.0 (the "License"); 11 | you may not use this file except in compliance with the License. 12 | You may obtain a copy of the License at 13 | 14 | http://www.apache.org/licenses/LICENSE-2.0 15 | 16 | Unless required by applicable law or agreed to in writing, software 17 | distributed under the License is distributed on an "AS IS" BASIS, 18 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | See the License for the specific language governing permissions and 20 | limitations under the License. 21 | 22 | ************************************************************************************/ 23 | 24 | #ifndef OVR_Win32_Gamepad_h 25 | #define OVR_Win32_Gamepad_h 26 | 27 | #include "Gamepad.h" 28 | 29 | #include "Kernel/OVR_Win32_IncludeWindows.h" 30 | #include 31 | 32 | namespace OVR { namespace OvrPlatform { namespace Win32 { 33 | 34 | class GamepadManager : public OvrPlatform::GamepadManager 35 | { 36 | public: 37 | GamepadManager(); 38 | ~GamepadManager(); 39 | 40 | virtual uint32_t GetGamepadCount(); 41 | virtual bool GetGamepadState(uint32_t index, GamepadState* pState); 42 | 43 | private: 44 | // Dynamically ink to XInput to simplify projects. 45 | HMODULE hXInputModule; 46 | typedef DWORD (WINAPI *PFn_XInputGetState)(DWORD dwUserIndex, XINPUT_STATE* pState); 47 | PFn_XInputGetState pXInputGetState; 48 | 49 | uint32_t LastPadPacketNo; // Used to prevent reading the same packet twice. 50 | uint32_t NextTryTime; // If no device was found then we don't try to access it again until some later time. 51 | }; 52 | 53 | }}} 54 | 55 | #endif // OVR_Win32_Gamepad_h 56 | -------------------------------------------------------------------------------- /LibOVR/Include/Extras/OVR_StereoProjection.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVR_StereoProjection.h 4 | Content : Stereo projection functions 5 | Created : November 30, 2013 6 | Authors : Tom Fosyth 7 | 8 | Copyright : Copyright 2014-2016 Oculus VR, LLC All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.3 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.3 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | *************************************************************************************/ 26 | 27 | #ifndef OVR_StereoProjection_h 28 | #define OVR_StereoProjection_h 29 | 30 | 31 | #include "Extras/OVR_Math.h" 32 | 33 | 34 | namespace OVR { 35 | 36 | 37 | //----------------------------------------------------------------------------------- 38 | // ***** Stereo Enumerations 39 | 40 | // StereoEye specifies which eye we are rendering for; it is used to 41 | // retrieve StereoEyeParams. 42 | enum StereoEye 43 | { 44 | StereoEye_Left, 45 | StereoEye_Right, 46 | StereoEye_Center 47 | }; 48 | 49 | 50 | 51 | //----------------------------------------------------------------------------------- 52 | // ***** Propjection functions 53 | 54 | Matrix4f CreateProjection ( bool rightHanded, bool isOpenGL, FovPort fov, StereoEye eye, 55 | float zNear = 0.01f, float zFar = 10000.0f, 56 | bool flipZ = false, bool farAtInfinity = false); 57 | 58 | Matrix4f CreateOrthoSubProjection ( bool rightHanded, StereoEye eyeType, 59 | float tanHalfFovX, float tanHalfFovY, 60 | float unitsX, float unitsY, float distanceFromCamera, 61 | float interpupillaryDistance, Matrix4f const &projection, 62 | float zNear = 0.0f, float zFar = 0.0f, 63 | bool flipZ = false, bool farAtInfinity = false); 64 | 65 | ScaleAndOffset2D CreateNDCScaleAndOffsetFromFov ( FovPort fov ); 66 | 67 | 68 | } //namespace OVR 69 | 70 | #endif // OVR_StereoProjection_h 71 | -------------------------------------------------------------------------------- /LibOVR/Include/OVR_CAPI_Audio.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVR_CAPI_Audio.h 3 | \brief CAPI audio functions. 4 | \copyright Copyright 2015 Oculus VR, LLC. All Rights reserved. 5 | ************************************************************************************/ 6 | 7 | 8 | #ifndef OVR_CAPI_Audio_h 9 | #define OVR_CAPI_Audio_h 10 | 11 | #ifdef _WIN32 12 | #include 13 | #include "OVR_CAPI.h" 14 | #define OVR_AUDIO_MAX_DEVICE_STR_SIZE 128 15 | 16 | /// Gets the ID of the preferred VR audio output device. 17 | /// 18 | /// \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. 19 | /// 20 | /// \return Returns an ovrResult indicating success or failure. In the case of failure, use 21 | /// ovr_GetLastErrorInfo to get more information. 22 | /// 23 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutWaveId(UINT* deviceOutId); 24 | 25 | /// Gets the ID of the preferred VR audio input device. 26 | /// 27 | /// \param[out] deviceInId 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. 28 | /// 29 | /// \return Returns an ovrResult indicating success or failure. In the case of failure, use 30 | /// ovr_GetLastErrorInfo to get more information. 31 | /// 32 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInWaveId(UINT* deviceInId); 33 | 34 | 35 | /// Gets the GUID of the preferred VR audio device as a string. 36 | /// 37 | /// \param[out] deviceOutStrBuffer A buffer where the GUID string for the device will copied to. 38 | /// 39 | /// \return Returns an ovrResult indicating success or failure. In the case of failure, use 40 | /// ovr_GetLastErrorInfo to get more information. 41 | /// 42 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutGuidStr(WCHAR deviceOutStrBuffer[OVR_AUDIO_MAX_DEVICE_STR_SIZE]); 43 | 44 | 45 | /// Gets the GUID of the preferred VR audio device. 46 | /// 47 | /// \param[out] deviceOutGuid The GUID of the user's preferred VR audio device to use, which will be valid upon a successful return value, else it will be NULL. 48 | /// 49 | /// \return Returns an ovrResult indicating success or failure. In the case of failure, use 50 | /// ovr_GetLastErrorInfo to get more information. 51 | /// 52 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutGuid(GUID* deviceOutGuid); 53 | 54 | 55 | /// Gets the GUID of the preferred VR microphone device as a string. 56 | /// 57 | /// \param[out] deviceInStrBuffer A buffer where the GUID string for the device will copied to. 58 | /// 59 | /// \return Returns an ovrResult indicating success or failure. In the case of failure, use 60 | /// ovr_GetLastErrorInfo to get more information. 61 | /// 62 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInGuidStr(WCHAR deviceInStrBuffer[OVR_AUDIO_MAX_DEVICE_STR_SIZE]); 63 | 64 | 65 | /// Gets the GUID of the preferred VR microphone device. 66 | /// 67 | /// \param[out] deviceInGuid The GUID of the user's preferred VR audio device to use, which will be valid upon a successful return value, else it will be NULL. 68 | /// 69 | /// \return Returns an ovrResult indicating success or failure. In the case of failure, use 70 | /// ovr_GetLastErrorInfo to get more information. 71 | /// 72 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInGuid(GUID* deviceInGuid); 73 | 74 | #endif //OVR_OS_MS 75 | 76 | #endif // OVR_CAPI_Audio_h 77 | -------------------------------------------------------------------------------- /LibOVR/Include/OVR_CAPI_Keys.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVR_CAPI.h 3 | \brief Keys for CAPI proprty function calls 4 | \copyright Copyright 2015 Oculus VR, LLC All Rights reserved. 5 | ************************************************************************************/ 6 | 7 | #ifndef OVR_CAPI_Keys_1_3_h 8 | #define OVR_CAPI_Keys_1_3_h 9 | 10 | #include "OVR_Version.h" 11 | 12 | 13 | 14 | #define OVR_KEY_USER_1_3 "User" // string 15 | 16 | #define OVR_KEY_NAME_1_3 "Name" // string 17 | 18 | #define OVR_KEY_GENDER_1_3 "Gender" // string "Male", "Female", or "Unknown" 19 | #define OVR_DEFAULT_GENDER_1_3 "Unknown" 20 | 21 | #define OVR_KEY_PLAYER_HEIGHT_1_3 "PlayerHeight" // float meters 22 | #define OVR_DEFAULT_PLAYER_HEIGHT_1_3 1.778f 23 | 24 | #define OVR_KEY_EYE_HEIGHT_1_3 "EyeHeight" // float meters 25 | #define OVR_DEFAULT_EYE_HEIGHT_1_3 1.675f 26 | 27 | #define OVR_KEY_NECK_TO_EYE_DISTANCE_1_3 "NeckEyeDistance" // float[2] meters 28 | #define OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL_1_3 0.0805f 29 | #define OVR_DEFAULT_NECK_TO_EYE_VERTICAL_1_3 0.075f 30 | 31 | 32 | #define OVR_KEY_EYE_TO_NOSE_DISTANCE_1_3 "EyeToNoseDist" // float[2] meters 33 | 34 | 35 | 36 | 37 | 38 | #define OVR_PERF_HUD_MODE_1_3 "PerfHudMode" // int, allowed values are defined in enum ovrPerfHudMode 39 | 40 | #define OVR_LAYER_HUD_MODE_1_3 "LayerHudMode" // int, allowed values are defined in enum ovrLayerHudMode 41 | #define OVR_LAYER_HUD_CURRENT_LAYER_1_3 "LayerHudCurrentLayer" // int, The layer to show 42 | #define OVR_LAYER_HUD_SHOW_ALL_LAYERS_1_3 "LayerHudShowAll" // bool, Hide other layers when the hud is enabled 43 | 44 | #define OVR_DEBUG_HUD_STEREO_MODE_1_3 "DebugHudStereoMode" // int, allowed values are defined in enum ovrDebugHudStereoMode 45 | #define OVR_DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE_1_3 "DebugHudStereoGuideInfoEnable" // bool 46 | #define OVR_DEBUG_HUD_STEREO_GUIDE_SIZE_1_3 "DebugHudStereoGuideSize2f" // float[2] 47 | #define OVR_DEBUG_HUD_STEREO_GUIDE_POSITION_1_3 "DebugHudStereoGuidePosition3f" // float[3] 48 | #define OVR_DEBUG_HUD_STEREO_GUIDE_YAWPITCHROLL_1_3 "DebugHudStereoGuideYawPitchRoll3f" // float[3] 49 | #define OVR_DEBUG_HUD_STEREO_GUIDE_COLOR_1_3 "DebugHudStereoGuideColor4f" // float[4] 50 | 51 | 52 | 53 | #endif // OVR_CAPI_Keys_h 54 | -------------------------------------------------------------------------------- /LibOVR/Include/OVR_Version.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVR_Version.h 3 | \brief This header provides LibOVR version identification. 4 | \copyright Copyright 2014-2016 Oculus VR, LLC All Rights reserved. 5 | *************************************************************************************/ 6 | 7 | #ifndef OVR_Version_1_3_h 8 | #define OVR_Version_1_3_h 9 | 10 | 11 | 12 | /// Conventional string-ification macro. 13 | #if !defined(OVR_STRINGIZE) 14 | #define OVR_STRINGIZEIMPL(x) #x 15 | #define OVR_STRINGIZE(x) OVR_STRINGIZEIMPL(x) 16 | #endif 17 | 18 | 19 | // Master version numbers 20 | #define OVR_PRODUCT_VERSION_1_3 1 // Product version doesn't participate in semantic versioning. 21 | #define OVR_MAJOR_VERSION_1_3 1 // If you change these values then you need to also make sure to change LibOVR/Projects/Windows/LibOVR.props in parallel. 22 | #define OVR_MINOR_VERSION_1_3 3 // 23 | #define OVR_PATCH_VERSION_1_3 0 24 | #define OVR_BUILD_NUMBER_1_3 0 25 | 26 | // This is the ((product * 100) + major) version of the service that the DLL is compatible with. 27 | // When we backport changes to old versions of the DLL we update the old DLLs 28 | // to move this version number up to the latest version. 29 | // The DLL is responsible for checking that the service is the version it supports 30 | // and returning an appropriate error message if it has not been made compatible. 31 | #define OVR_DLL_COMPATIBLE_VERSION 101 32 | 33 | #define OVR_FEATURE_VERSION 0 34 | 35 | 36 | /// "Major.Minor.Patch" 37 | #if !defined(OVR_VERSION_STRING) 38 | #define OVR_VERSION_STRING OVR_STRINGIZE(OVR_MAJOR_VERSION.OVR_MINOR_VERSION.OVR_PATCH_VERSION) 39 | #endif 40 | 41 | 42 | /// "Major.Minor.Patch.Build" 43 | #if !defined(OVR_DETAILED_VERSION_STRING) 44 | #define OVR_DETAILED_VERSION_STRING OVR_STRINGIZE(OVR_MAJOR_VERSION.OVR_MINOR_VERSION.OVR_PATCH_VERSION.OVR_BUILD_NUMBER) 45 | #endif 46 | 47 | 48 | /// \brief file description for version info 49 | /// This appears in the user-visible file properties. It is intended to convey publicly 50 | /// available additional information such as feature builds. 51 | #if !defined(OVR_FILE_DESCRIPTION_STRING) 52 | #if defined(_DEBUG) 53 | #define OVR_FILE_DESCRIPTION_STRING "dev build debug" 54 | #else 55 | #define OVR_FILE_DESCRIPTION_STRING "dev build" 56 | #endif 57 | #endif 58 | 59 | 60 | #endif // OVR_Version_h 61 | -------------------------------------------------------------------------------- /LibOVR/LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR/LICENSE.txt -------------------------------------------------------------------------------- /LibOVR/LibOVR.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25123.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibOVR", "Projects\Windows\VS2015\LibOVR.vcxproj", "{EA50E705-5113-49E5-B105-2512EDC8DDC6}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | DebugSingleProcess|x64 = DebugSingleProcess|x64 13 | DebugSingleProcess|x86 = DebugSingleProcess|x86 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | ReleaseSingleProcess|x64 = ReleaseSingleProcess|x64 17 | ReleaseSingleProcess|x86 = ReleaseSingleProcess|x86 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.Debug|x64.ActiveCfg = Debug|x64 21 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.Debug|x64.Build.0 = Debug|x64 22 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.Debug|x86.ActiveCfg = Debug|Win32 23 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.Debug|x86.Build.0 = Debug|Win32 24 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.DebugSingleProcess|x64.ActiveCfg = DebugSingleProcess|x64 25 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.DebugSingleProcess|x64.Build.0 = DebugSingleProcess|x64 26 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.DebugSingleProcess|x86.ActiveCfg = DebugSingleProcess|Win32 27 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.DebugSingleProcess|x86.Build.0 = DebugSingleProcess|Win32 28 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.Release|x64.ActiveCfg = Release|x64 29 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.Release|x64.Build.0 = Release|x64 30 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.Release|x86.ActiveCfg = Release|Win32 31 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.Release|x86.Build.0 = Release|Win32 32 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.ReleaseSingleProcess|x64.ActiveCfg = ReleaseSingleProcess|x64 33 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.ReleaseSingleProcess|x64.Build.0 = ReleaseSingleProcess|x64 34 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.ReleaseSingleProcess|x86.ActiveCfg = ReleaseSingleProcess|Win32 35 | {EA50E705-5113-49E5-B105-2512EDC8DDC6}.ReleaseSingleProcess|x86.Build.0 = ReleaseSingleProcess|Win32 36 | EndGlobalSection 37 | GlobalSection(SolutionProperties) = preSolution 38 | HideSolutionNode = FALSE 39 | EndGlobalSection 40 | EndGlobal 41 | -------------------------------------------------------------------------------- /LibOVR/Projects/Windows/ForceRebuild.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | echo static const char* OVR_FORCE_REBUILD_PRE = __TIMESTAMP__; /* DO NOT SOURCE CONTROL THIS FILE */ > "$(ProjectDir)OVR_ForceRebuildNoCheckin.h" 9 | 10 | 11 | 12 | 13 | Force a rebuild. Please do not check in the ForceRebuildNoCheckin.h file. 14 | 15 | 16 | echo static const char* OVR_FORCE_REBUILD_POST = __TIMESTAMP__; /* DO NOT SOURCE CONTROL THIS FILE */ > "$(ProjectDir)OVR_ForceRebuildNoCheckin.h" 17 | 18 | 19 | Force a rebuild. Please do not check in the ForceRebuildNoCheckin.h file. 20 | 21 | 22 | "$(ProjectDir)OVR_ForceRebuildNoCheckin.h" 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /LibOVR/Projects/Windows/LibOVR.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 1 6 | 1 7 | 3 8 | 0 9 | 0 10 | 11 | 12 | 13 | 14 | 15 | $(OVR_PRODUCT_VERSION) 16 | 17 | 18 | $(OVR_MAJOR_VERSION) 19 | 20 | 21 | $(OVR_MINOR_VERSION) 22 | 23 | 24 | $(OVR_PATCH_VERSION) 25 | 26 | 27 | $(OVR_BUILD_VERSION) 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /LibOVR/Projects/Windows/OVRRootPath.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(ProjectDir)../../../../ 6 | 7 | 8 | 9 | 10 | 11 | $(OVRSDKROOT) 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /LibOVR/Projects/Windows/VS2010/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | Include 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /LibOVR/Projects/Windows/VS2012/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | Include 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /LibOVR/Projects/Windows/VS2013/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | Include 29 | 30 | 31 | Include 32 | 33 | 34 | Include 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /LibOVR/Projects/Windows/VS2015/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | Include 29 | 30 | 31 | Include 32 | 33 | 34 | Include 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /LibOVR/Projects/Windows/VS2015/OVR_ForceRebuildNoCheckin.h: -------------------------------------------------------------------------------- 1 | static const char* OVR_FORCE_REBUILD_POST = __TIMESTAMP__; /* DO NOT SOURCE CONTROL THIS FILE */ 2 | -------------------------------------------------------------------------------- /LibOVR/Src/Resources/Windows/LibOVR.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR/Src/Resources/Windows/LibOVR.rc -------------------------------------------------------------------------------- /LibOVR/Src/Resources/Windows/Oculus.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR/Src/Resources/Windows/Oculus.ico -------------------------------------------------------------------------------- /LibOVR/Src/Resources/Windows/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR/Src/Resources/Windows/resource.h -------------------------------------------------------------------------------- /LibOVR0.5/Include/OVR.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVR.h 4 | Content : The main public interface to Oculus for C++ Developers. 5 | Includes C API and helper classes. 6 | 7 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 8 | 9 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 10 | you may not use the Oculus VR Rift SDK except in compliance with the License, 11 | which is provided at the time of installation or download, or which 12 | otherwise accompanies this software in either electronic or hard copy form. 13 | 14 | You may obtain a copy of the License at 15 | 16 | http://www.oculusvr.com/licenses/LICENSE-3.2 17 | 18 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 19 | distributed under the License is distributed on an "AS IS" BASIS, 20 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | See the License for the specific language governing permissions and 22 | limitations under the License. 23 | 24 | *************************************************************************************/ 25 | 26 | #ifndef OVR_h 27 | #define OVR_h 28 | 29 | #include "OVR_Version.h" 30 | #include "OVR_CAPI.h" 31 | 32 | /* The following includes are deprecated from this location and will be removed from a future version of this library. */ 33 | #include "Kernel/OVR_Types.h" 34 | #include "Kernel/OVR_RefCount.h" 35 | #include "Kernel/OVR_Std.h" 36 | #include "Kernel/OVR_Alg.h" 37 | #include "Extras/OVR_Math.h" 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /LibOVR0.5/Include/OVR_CAPI.h: -------------------------------------------------------------------------------- 1 | 2 | // Temporary backward compatibility until we update all our internal code that's dependent on it. 3 | #include "OVR_CAPI_0_5_0.h" 4 | 5 | -------------------------------------------------------------------------------- /LibOVR0.5/Include/OVR_CAPI_GL.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVR_CAPI_GL.h 4 | Content : GL specific structures used by the CAPI interface. 5 | Created : November 7, 2013 6 | Authors : Lee Cooper 7 | 8 | Copyright : Copyright 2013 Oculus VR, LLC. All Rights reserved. 9 | 10 | Use of this software is subject to the terms of the Oculus Inc license 11 | agreement provided at the time of installation or download, or which 12 | otherwise accompanies this software in either electronic or hard copy form. 13 | 14 | ************************************************************************************/ 15 | #ifndef OVR_CAPI_GL_h 16 | #define OVR_CAPI_GL_h 17 | 18 | /// @file OVR_CAPI_GL.h 19 | /// OpenGL rendering support. 20 | 21 | #include "OVR_CAPI.h" 22 | 23 | #if defined(OVR_OS_WIN32) 24 | #include 25 | #include 26 | #elif defined(__APPLE__) 27 | #include 28 | #else 29 | #include 30 | #endif 31 | 32 | 33 | #if defined(_MSC_VER) 34 | #pragma warning(push) 35 | #pragma warning(disable: 4324) // structure was padded due to __declspec(align()) 36 | #endif 37 | 38 | 39 | /// Used to configure slave GL rendering (i.e. for devices created externally). 40 | typedef struct ovrGLConfigData_s 41 | { 42 | ovrRenderAPIConfigHeader Header; ///< General device settings. 43 | 44 | #if defined(OVR_OS_WIN32) 45 | HWND Window; ///< The optional window handle. If unset, rendering will use the current window. 46 | HDC DC; ///< The optional device context. If unset, rendering will use a new context. 47 | #elif defined (OVR_OS_LINUX) 48 | struct _XDisplay* Disp; ///< Optional display. If unset, will issue glXGetCurrentDisplay when context is current. 49 | #endif 50 | } ovrGLConfigData; 51 | 52 | #if defined(__cplusplus) 53 | static_assert(sizeof(ovrRenderAPIConfig) >= sizeof(ovrGLConfigData), "Insufficient size."); 54 | #endif 55 | 56 | /// Contains OpenGL-specific rendering information. 57 | union ovrGLConfig 58 | { 59 | ovrRenderAPIConfig Config; ///< General device settings. 60 | ovrGLConfigData OGL; ///< OpenGL-specific settings. 61 | }; 62 | 63 | /// Used to pass GL eye texture data to ovrHmd_EndFrame. 64 | typedef struct ovrGLTextureData_s 65 | { 66 | ovrTextureHeader Header; ///< General device settings. 67 | GLuint TexId; ///< The OpenGL name for this texture. 68 | } ovrGLTextureData; 69 | 70 | #if defined(__cplusplus) 71 | static_assert(sizeof(ovrTexture) >= sizeof(ovrGLTextureData), "Insufficient size."); 72 | #endif 73 | 74 | /// Contains OpenGL-specific texture information. 75 | typedef union ovrGLTexture_s 76 | { 77 | ovrTexture Texture; ///< General device settings. 78 | ovrGLTextureData OGL; ///< OpenGL-specific settings. 79 | } ovrGLTexture; 80 | 81 | 82 | #if defined(_MSC_VER) 83 | #pragma warning(pop) 84 | #endif 85 | 86 | 87 | #endif // OVR_CAPI_GL_h 88 | -------------------------------------------------------------------------------- /LibOVR0.5/Include/OVR_CAPI_Keys.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVR_CAPI.h 4 | Content : Keys for CAPI calls 5 | Created : September 25, 2014 6 | Authors : 7 | 8 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.2 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | ************************************************************************************/ 26 | 27 | 28 | 29 | #define OVR_KEY_USER "User" // string 30 | #define OVR_KEY_NAME "Name" // string 31 | #define OVR_KEY_GENDER "Gender" // string 32 | #define OVR_KEY_PLAYER_HEIGHT "PlayerHeight" // float 33 | #define OVR_KEY_EYE_HEIGHT "EyeHeight" // float 34 | #define OVR_KEY_IPD "IPD" // float 35 | #define OVR_KEY_NECK_TO_EYE_DISTANCE "NeckEyeDistance" // float[2] 36 | #define OVR_KEY_EYE_RELIEF_DIAL "EyeReliefDial" // int 37 | #define OVR_KEY_EYE_TO_NOSE_DISTANCE "EyeToNoseDist" // float[2] 38 | #define OVR_KEY_MAX_EYE_TO_PLATE_DISTANCE "MaxEyeToPlateDist" // float[2] 39 | #define OVR_KEY_EYE_CUP "EyeCup" // char[16] 40 | #define OVR_KEY_CUSTOM_EYE_RENDER "CustomEyeRender" // bool 41 | #define OVR_KEY_CAMERA_POSITION "CenteredFromWorld" // double[7] 42 | 43 | // Default measurements empirically determined at Oculus to make us happy 44 | // The neck model numbers were derived as an average of the male and female averages from ANSUR-88 45 | // NECK_TO_EYE_HORIZONTAL = H22 - H43 = INFRAORBITALE_BACK_OF_HEAD - TRAGION_BACK_OF_HEAD 46 | // NECK_TO_EYE_VERTICAL = H21 - H15 = GONION_TOP_OF_HEAD - ECTOORBITALE_TOP_OF_HEAD 47 | // These were determined to be the best in a small user study, clearly beating out the previous default values 48 | #define OVR_DEFAULT_GENDER "Unknown" 49 | #define OVR_DEFAULT_PLAYER_HEIGHT 1.778f 50 | #define OVR_DEFAULT_EYE_HEIGHT 1.675f 51 | #define OVR_DEFAULT_IPD 0.064f 52 | #define OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL 0.0805f 53 | #define OVR_DEFAULT_NECK_TO_EYE_VERTICAL 0.075f 54 | #define OVR_DEFAULT_EYE_RELIEF_DIAL 3 55 | #define OVR_DEFAULT_CAMERA_POSITION {0,0,0,1,0,0,0} 56 | 57 | -------------------------------------------------------------------------------- /LibOVR0.5/Include/OVR_CAPI_Util.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | PublicHeader: OVR_CAPI_Util.h 4 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 5 | 6 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 7 | you may not use the Oculus VR Rift SDK except in compliance with the License, 8 | which is provided at the time of installation or download, or which 9 | otherwise accompanies this software in either electronic or hard copy form. 10 | 11 | You may obtain a copy of the License at 12 | 13 | http://www.oculusvr.com/licenses/LICENSE-3.2 14 | 15 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 16 | distributed under the License is distributed on an "AS IS" BASIS, 17 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | See the License for the specific language governing permissions and 19 | limitations under the License. 20 | 21 | *************************************************************************************/ 22 | 23 | #ifndef OVR_CAPI_Util_h 24 | #define OVR_CAPI_Util_h 25 | 26 | 27 | #include "OVR_CAPI.h" 28 | 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | /// Enumerates modifications to the projection matrix based on the application's needs 35 | typedef enum 36 | { 37 | /// Use for generating a default projection matrix that is: 38 | /// * Left-handed 39 | /// * Near depth values stored in the depth buffer are smaller than far depth values 40 | /// * Both near and far are explicitly defined 41 | /// * With a clipping range that is (0 to w) 42 | ovrProjection_None = 0x00, 43 | 44 | /// Enable if using right-handed transformations in your application 45 | ovrProjection_RightHanded = 0x01, 46 | 47 | /// After projection transform is applied, far values stored in the depth buffer will be less than closer depth values 48 | /// NOTE: Enable only if application is using a floating-point depth buffer for proper precision 49 | ovrProjection_FarLessThanNear = 0x02, 50 | 51 | /// When this flag is used, the zfar value pushed into ovrMatrix4f_Projection() will be ignored 52 | /// NOTE: Enable only if ovrProjection_FarLessThanNear is also enabled where the far clipping plane will be pushed to infinity 53 | ovrProjection_FarClipAtInfinity = 0x04, 54 | 55 | /// Enable if application is rendering with OpenGL and expects a projection matrix with a clipping range of (-w to w) 56 | /// Ignore this flag if your application already handles the conversion from D3D range (0 to w) to OpenGL 57 | ovrProjection_ClipRangeOpenGL = 0x08, 58 | } ovrProjectionModifier; 59 | 60 | /// Used to generate projection from ovrEyeDesc::Fov. 61 | /// projectionFlags is a combination of the ovrProjectionModifier flags defined above 62 | OVR_PUBLIC_FUNCTION(ovrMatrix4f) ovrMatrix4f_Projection(ovrFovPort fov, float znear, float zfar, unsigned int projectionModFlags); 63 | 64 | /// Used for 2D rendering, Y is down 65 | /// orthoScale = 1.0f / pixelsPerTanAngleAtCenter 66 | /// orthoDistance = distance from camera, such as 0.8m 67 | OVR_PUBLIC_FUNCTION(ovrMatrix4f) ovrMatrix4f_OrthoSubProjection(ovrMatrix4f projection, ovrVector2f orthoScale, 68 | float orthoDistance, float hmdToEyeViewOffsetX); 69 | 70 | /// Waits until the specified absolute time. 71 | OVR_PUBLIC_FUNCTION(double) ovr_WaitTillTime(double absTime); 72 | 73 | 74 | #ifdef __cplusplus 75 | } /* extern "C" */ 76 | #endif 77 | 78 | 79 | #endif // Header include guard 80 | -------------------------------------------------------------------------------- /LibOVR0.5/Include/OVR_Kernel.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVRKernel.h 4 | Content : This contains references to all OVR Kernel headers in Src folder. 5 | Should be generated automatically based on PublicHeader tags. 6 | 7 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 8 | 9 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 10 | you may not use the Oculus VR Rift SDK except in compliance with the License, 11 | which is provided at the time of installation or download, or which 12 | otherwise accompanies this software in either electronic or hard copy form. 13 | 14 | You may obtain a copy of the License at 15 | 16 | http://www.oculusvr.com/licenses/LICENSE-3.2 17 | 18 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 19 | distributed under the License is distributed on an "AS IS" BASIS, 20 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | See the License for the specific language governing permissions and 22 | limitations under the License. 23 | 24 | *************************************************************************************/ 25 | 26 | /* This header file is deprecated and will be removed from a future version of this library */ 27 | 28 | #ifndef OVR_Kernel_h 29 | #define OVR_Kernel_h 30 | 31 | #include "Kernel/OVR_Types.h" 32 | #include "Kernel/OVR_Allocator.h" 33 | #include "Kernel/OVR_RefCount.h" 34 | #include "Kernel/OVR_Log.h" 35 | #include "Kernel/OVR_System.h" 36 | #include "Kernel/OVR_Nullptr.h" 37 | #include "Kernel/OVR_String.h" 38 | #include "Kernel/OVR_Array.h" 39 | #include "Kernel/OVR_Timer.h" 40 | #include "Kernel/OVR_SysFile.h" 41 | #include "Extras/OVR_Math.h" 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /LibOVR0.5/Include/OVR_Version.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVRVersion.h 4 | Content : 5 | 6 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 7 | 8 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 9 | you may not use the Oculus VR Rift SDK except in compliance with the License, 10 | which is provided at the time of installation or download, or which 11 | otherwise accompanies this software in either electronic or hard copy form. 12 | 13 | You may obtain a copy of the License at 14 | 15 | http://www.oculusvr.com/licenses/LICENSE-3.2 16 | 17 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | 23 | *************************************************************************************/ 24 | 25 | #ifndef OVR_Version_h 26 | #define OVR_Version_h 27 | 28 | 29 | 30 | 31 | 32 | #if !defined(OVR_STRINGIZE) 33 | #define OVR_STRINGIZEIMPL(x) #x 34 | #define OVR_STRINGIZE(x) OVR_STRINGIZEIMPL(x) 35 | #endif 36 | 37 | // We are on major version 5 of the beta pre-release SDK. At some point we will 38 | // transition to product version 1 and reset the major version back to 1 (first 39 | // product release, version 1.0). 40 | #define OVR_PRODUCT_VERSION 0 41 | #define OVR_MAJOR_VERSION 5 42 | #define OVR_MINOR_VERSION 0 43 | #define OVR_PATCH_VERSION 1 44 | #define OVR_BUILD_NUMBER 0 45 | 46 | // "Product.Major.Minor.Patch" 47 | #if !defined(OVR_VERSION_STRING) 48 | #define OVR_VERSION_STRING OVR_STRINGIZE(OVR_PRODUCT_VERSION.OVR_MAJOR_VERSION.OVR_MINOR_VERSION.OVR_PATCH_VERSION) 49 | #endif 50 | 51 | // "Product.Major.Minor.Patch.Build" 52 | #if !defined(OVR_DETAILED_VERSION_STRING) 53 | #define OVR_DETAILED_VERSION_STRING OVR_STRINGIZE(OVR_PRODUCT_VERSION.OVR_MAJOR_VERSION.OVR_MINOR_VERSION.OVR_PATCH_VERSION.OVR_BUILD_NUMBER) 54 | #endif 55 | 56 | // This is the firmware version for the DK2 headset sensor board. 57 | //#if !defined(OVR_DK2_LATEST_FIRMWARE_MAJOR_VERSION) 58 | #define OVR_DK2_LATEST_FIRMWARE_MAJOR_VERSION 2 59 | #define OVR_DK2_LATEST_FIRMWARE_MINOR_VERSION 12 60 | //#endif 61 | 62 | // LibOVRRT description 63 | // This appears in the user-visible file properties. It is intended to convey publicly available additional information 64 | // such as feature builds. 65 | #if !defined(OVR_FILE_DESCRIPTION_STRING) 66 | #if defined(_DEBUG) 67 | #define OVR_FILE_DESCRIPTION_STRING "LibOVRRT (debug)" 68 | #else 69 | #define OVR_FILE_DESCRIPTION_STRING "LibOVRRT" 70 | #endif 71 | #endif 72 | 73 | 74 | #endif // OVR_Version_h 75 | -------------------------------------------------------------------------------- /LibOVR0.5/Projects/Windows/LibOVR.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 0 6 | 5 7 | 0 8 | 1 9 | 0 10 | 11 | 12 | 13 | 14 | 15 | $(OVR_PRODUCT_VERSION) 16 | 17 | 18 | $(OVR_MAJOR_VERSION) 19 | 20 | 21 | $(OVR_MINOR_VERSION) 22 | 23 | 24 | $(OVR_PATCH_VERSION) 25 | 26 | 27 | $(OVR_BUILD_VERSION) 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /LibOVR0.5/Projects/Windows/OVRRootPath.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(ProjectDir)../../../../ 6 | 7 | 8 | 9 | 10 | 11 | $(OVRSDKROOT) 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /LibOVR0.5/Projects/Windows/VS2010/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /LibOVR0.5/Projects/Windows/VS2012/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /LibOVR0.5/Projects/Windows/VS2013/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LibOVR0.5/Src/OVR_StereoProjection.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVR_StereoProjection.h 4 | Content : Stereo projection functions 5 | Created : November 30, 2013 6 | Authors : Tom Fosyth 7 | 8 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.2 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | *************************************************************************************/ 26 | 27 | #ifndef OVR_StereoProjection_h 28 | #define OVR_StereoProjection_h 29 | 30 | 31 | #include "Extras/OVR_Math.h" 32 | 33 | 34 | namespace OVR { 35 | 36 | 37 | //----------------------------------------------------------------------------------- 38 | // ***** Stereo Enumerations 39 | 40 | // StereoEye specifies which eye we are rendering for; it is used to 41 | // retrieve StereoEyeParams. 42 | enum StereoEye 43 | { 44 | StereoEye_Center, 45 | StereoEye_Left, 46 | StereoEye_Right 47 | }; 48 | 49 | 50 | 51 | //----------------------------------------------------------------------------------- 52 | // ***** Propjection functions 53 | 54 | Matrix4f CreateProjection ( bool rightHanded, bool isOpenGL, FovPort fov, StereoEye eye, 55 | float zNear = 0.01f, float zFar = 10000.0f, 56 | bool flipZ = false, bool farAtInfinity = false); 57 | 58 | Matrix4f CreateOrthoSubProjection ( bool rightHanded, StereoEye eyeType, 59 | float tanHalfFovX, float tanHalfFovY, 60 | float unitsX, float unitsY, float distanceFromCamera, 61 | float interpupillaryDistance, Matrix4f const &projection, 62 | float zNear = 0.0f, float zFar = 0.0f, 63 | bool flipZ = false, bool farAtInfinity = false); 64 | 65 | ScaleAndOffset2D CreateNDCScaleAndOffsetFromFov ( FovPort fov ); 66 | 67 | 68 | } //namespace OVR 69 | 70 | #endif // OVR_StereoProjection_h 71 | -------------------------------------------------------------------------------- /LibOVR0.5/Src/Resources/Windows/LibOVR.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR0.5/Src/Resources/Windows/LibOVR.rc -------------------------------------------------------------------------------- /LibOVR0.5/Src/Resources/Windows/Oculus.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR0.5/Src/Resources/Windows/Oculus.ico -------------------------------------------------------------------------------- /LibOVR0.5/Src/Resources/Windows/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR0.5/Src/Resources/Windows/resource.h -------------------------------------------------------------------------------- /LibOVR0.6/Include/OVR.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVR.h 3 | \brief The main public interface to Oculus for C++ Developers. 4 | \copyright Copyright 2015 Oculus VR, LLC All Rights reserved. 5 | *************************************************************************************/ 6 | 7 | #ifndef OVR_h 8 | #define OVR_h 9 | 10 | #include "OVR_Version.h" 11 | #include "OVR_CAPI.h" 12 | 13 | /* The following includes are deprecated from this location and will be removed from a future version of this library. */ 14 | #include "Kernel/OVR_Types.h" 15 | #include "Kernel/OVR_RefCount.h" 16 | #include "Kernel/OVR_Std.h" 17 | #include "Kernel/OVR_Alg.h" 18 | #include "Extras/OVR_Math.h" 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /LibOVR0.6/Include/OVR_CAPI.h: -------------------------------------------------------------------------------- 1 | #include "OVR_CAPI_0_6_0.h" 2 | -------------------------------------------------------------------------------- /LibOVR0.6/Include/OVR_CAPI_Keys.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVR_CAPI.h 3 | \brief Keys for CAPI calls 4 | \copyright Copyright 2014 Oculus VR, LLC All Rights reserved. 5 | ************************************************************************************/ 6 | 7 | #ifndef OVR_CAPI_Keys_h 8 | #define OVR_CAPI_Keys_h 9 | 10 | #include "OVR_Version.h" 11 | 12 | 13 | #define OVR_KEY_USER "User" // string 14 | #define OVR_KEY_NAME "Name" // string 15 | #define OVR_KEY_GENDER "Gender" // string "Male", "Female", or "Unknown" 16 | #define OVR_KEY_PLAYER_HEIGHT "PlayerHeight" // float meters 17 | #define OVR_KEY_EYE_HEIGHT "EyeHeight" // float meters 18 | #define OVR_KEY_IPD "IPD" // float meters 19 | #define OVR_KEY_NECK_TO_EYE_DISTANCE "NeckEyeDistance" // float[2] meters 20 | #define OVR_KEY_EYE_RELIEF_DIAL "EyeReliefDial" // int in range of 0-10 21 | #define OVR_KEY_EYE_TO_NOSE_DISTANCE "EyeToNoseDist" // float[2] meters 22 | #define OVR_KEY_MAX_EYE_TO_PLATE_DISTANCE "MaxEyeToPlateDist" // float[2] meters 23 | #define OVR_KEY_EYE_CUP "EyeCup" // char[16] "A", "B", or "C" 24 | #define OVR_KEY_CUSTOM_EYE_RENDER "CustomEyeRender" // bool 25 | //Legacy profile value tied to the device and serial 26 | #define OVR_KEY_CAMERA_POSITION_1 "CenteredFromWorld" // double[7] ovrPosef quat rotation x, y, z, w, translation x, y, z 27 | //New value that now only ties to the device so that swapping headsets retains the offset from the tracker 28 | #define OVR_KEY_CAMERA_POSITION_2 "CenteredFromWorld2" // double[7] ovrPosef quat rotation x, y, z, w, translation x, y, z 29 | #define OVR_KEY_CAMERA_POSITION OVR_KEY_CAMERA_POSITION_2 30 | 31 | 32 | // Default measurements empirically determined at Oculus to make us happy 33 | // The neck model numbers were derived as an average of the male and female averages from ANSUR-88 34 | // NECK_TO_EYE_HORIZONTAL = H22 - H43 = INFRAORBITALE_BACK_OF_HEAD - TRAGION_BACK_OF_HEAD 35 | // NECK_TO_EYE_VERTICAL = H21 - H15 = GONION_TOP_OF_HEAD - ECTOORBITALE_TOP_OF_HEAD 36 | // These were determined to be the best in a small user study, clearly beating out the previous default values 37 | #define OVR_DEFAULT_GENDER "Unknown" 38 | #define OVR_DEFAULT_PLAYER_HEIGHT 1.778f 39 | #define OVR_DEFAULT_EYE_HEIGHT 1.675f 40 | #define OVR_DEFAULT_IPD 0.064f 41 | #define OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL 0.0805f 42 | #define OVR_DEFAULT_NECK_TO_EYE_VERTICAL 0.075f 43 | #define OVR_DEFAULT_EYE_RELIEF_DIAL 3 44 | #define OVR_DEFAULT_CAMERA_POSITION {0,0,0,1,0,0,0} 45 | 46 | #endif // OVR_CAPI_Keys_h 47 | -------------------------------------------------------------------------------- /LibOVR0.6/Include/OVR_Kernel.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVRKernel.h 3 | \brief This contains references to all OVR Kernel headers in Src folder. 4 | \copyright Copyright 2015 Oculus VR, LLC All Rights reserved. 5 | *************************************************************************************/ 6 | 7 | /* This header file is deprecated and will be removed from a future version of this library */ 8 | 9 | #ifndef OVR_Kernel_h 10 | #define OVR_Kernel_h 11 | 12 | #include "Kernel/OVR_Types.h" 13 | #include "Kernel/OVR_Allocator.h" 14 | #include "Kernel/OVR_RefCount.h" 15 | #include "Kernel/OVR_Log.h" 16 | #include "Kernel/OVR_System.h" 17 | #include "Kernel/OVR_Nullptr.h" 18 | #include "Kernel/OVR_String.h" 19 | #include "Kernel/OVR_Array.h" 20 | #include "Kernel/OVR_Timer.h" 21 | #include "Kernel/OVR_SysFile.h" 22 | #include "Extras/OVR_Math.h" 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /LibOVR0.6/Include/OVR_Version.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVR_Version.h 3 | \brief This header provides LibOVR version identification. 4 | \copyright Copyright 2014 Oculus VR, LLC All Rights reserved. 5 | *************************************************************************************/ 6 | 7 | #ifndef OVR_Version_h 8 | #define OVR_Version_h 9 | 10 | 11 | 12 | 13 | 14 | 15 | /// Conventional string-ification macro. 16 | #if !defined(OVR_STRINGIZE) 17 | #define OVR_STRINGIZEIMPL(x) #x 18 | #define OVR_STRINGIZE(x) OVR_STRINGIZEIMPL(x) 19 | #endif 20 | 21 | 22 | // We are on major version 6 of the beta pre-release SDK. At some point we will 23 | // transition to product version 1 and reset the major version back to 1 (first 24 | // product release, version 1.0). 25 | #define OVR_PRODUCT_VERSION 0 26 | #define OVR_MAJOR_VERSION 6 27 | #define OVR_MINOR_VERSION 0 28 | #define OVR_PATCH_VERSION 1 29 | #define OVR_BUILD_NUMBER 0 30 | 31 | 32 | /// "Product.Major.Minor.Patch" 33 | #if !defined(OVR_VERSION_STRING) 34 | #define OVR_VERSION_STRING OVR_STRINGIZE(OVR_PRODUCT_VERSION.OVR_MAJOR_VERSION.OVR_MINOR_VERSION.OVR_PATCH_VERSION) 35 | #endif 36 | 37 | 38 | /// "Product.Major.Minor.Patch.Build" 39 | #if !defined(OVR_DETAILED_VERSION_STRING) 40 | #define OVR_DETAILED_VERSION_STRING OVR_STRINGIZE(OVR_PRODUCT_VERSION.OVR_MAJOR_VERSION.OVR_MINOR_VERSION.OVR_PATCH_VERSION.OVR_BUILD_NUMBER) 41 | #endif 42 | 43 | 44 | // This is the firmware version for the DK2 headset sensor board. 45 | //#if !defined(OVR_DK2_LATEST_FIRMWARE_MAJOR_VERSION) 46 | #define OVR_DK2_LATEST_FIRMWARE_MAJOR_VERSION 2 47 | #define OVR_DK2_LATEST_FIRMWARE_MINOR_VERSION 12 48 | //#endif 49 | 50 | // This is the product version for the Oculus Display Driver. A continuous 51 | // process will propagate this value to all dependent files 52 | #define OVR_DISPLAY_DRIVER_PRODUCT_VERSION "1.2.6.0" 53 | 54 | // This is the product version for the Oculus Position Tracker Driver. A 55 | // continuous process will propagate this value to all dependent files 56 | #define OVR_POSITIONAL_TRACKER_DRIVER_PRODUCT_VERSION "1.0.10.0" 57 | 58 | /// \brief file description for version info 59 | /// This appears in the user-visible file properties. It is intended to convey publicly 60 | /// available additional information such as feature builds. 61 | #if !defined(OVR_FILE_DESCRIPTION_STRING) 62 | #if defined(_DEBUG) 63 | #define OVR_FILE_DESCRIPTION_STRING "dev build debug" 64 | #else 65 | #define OVR_FILE_DESCRIPTION_STRING "dev build" 66 | #endif 67 | #endif 68 | 69 | 70 | #endif // OVR_Version_h 71 | -------------------------------------------------------------------------------- /LibOVR0.6/Projects/Windows/ForceRebuild.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | echo static const char* OVR_FORCE_REBUILD_PRE = __TIMESTAMP__; /* DO NOT SOURCE CONTROL THIS FILE */ > "$(ProjectDir)OVR_ForceRebuildNoCheckin.h" 9 | 10 | 11 | 12 | 13 | Force a rebuild. Please do not check in the ForceRebuildNoCheckin.h file. 14 | 15 | 16 | echo static const char* OVR_FORCE_REBUILD_POST = __TIMESTAMP__; /* DO NOT SOURCE CONTROL THIS FILE */ > "$(ProjectDir)OVR_ForceRebuildNoCheckin.h" 17 | 18 | 19 | Force a rebuild. Please do not check in the ForceRebuildNoCheckin.h file. 20 | 21 | 22 | "$(ProjectDir)OVR_ForceRebuildNoCheckin.h" 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /LibOVR0.6/Projects/Windows/LibOVR.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 0 6 | 6 7 | 0 8 | 0 9 | 0 10 | 11 | 12 | 13 | 14 | 15 | $(OVR_PRODUCT_VERSION) 16 | 17 | 18 | $(OVR_MAJOR_VERSION) 19 | 20 | 21 | $(OVR_MINOR_VERSION) 22 | 23 | 24 | $(OVR_PATCH_VERSION) 25 | 26 | 27 | $(OVR_BUILD_VERSION) 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /LibOVR0.6/Projects/Windows/OVRRootPath.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(ProjectDir)../../../../ 6 | 7 | 8 | 9 | 10 | 11 | $(OVRSDKROOT) 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /LibOVR0.6/Projects/Windows/VS2010/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | Include 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LibOVR0.6/Projects/Windows/VS2012/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | Include 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LibOVR0.6/Projects/Windows/VS2013/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | Include 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LibOVR0.6/Projects/Windows/VS2013/OVR_ForceRebuildNoCheckin.h: -------------------------------------------------------------------------------- 1 | static const char* OVR_FORCE_REBUILD_POST = __TIMESTAMP__; /* DO NOT SOURCE CONTROL THIS FILE */ 2 | -------------------------------------------------------------------------------- /LibOVR0.6/Src/OVR_StereoProjection.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVR_StereoProjection.h 4 | Content : Stereo projection functions 5 | Created : November 30, 2013 6 | Authors : Tom Fosyth 7 | 8 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.2 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | *************************************************************************************/ 26 | 27 | #ifndef OVR_StereoProjection_h 28 | #define OVR_StereoProjection_h 29 | 30 | 31 | #include "Extras/OVR_Math.h" 32 | 33 | 34 | namespace OVR { 35 | 36 | 37 | //----------------------------------------------------------------------------------- 38 | // ***** Stereo Enumerations 39 | 40 | // StereoEye specifies which eye we are rendering for; it is used to 41 | // retrieve StereoEyeParams. 42 | enum StereoEye 43 | { 44 | StereoEye_Center, 45 | StereoEye_Left, 46 | StereoEye_Right 47 | }; 48 | 49 | 50 | 51 | //----------------------------------------------------------------------------------- 52 | // ***** Propjection functions 53 | 54 | Matrix4f CreateProjection ( bool rightHanded, bool isOpenGL, FovPort fov, StereoEye eye, 55 | float zNear = 0.01f, float zFar = 10000.0f, 56 | bool flipZ = false, bool farAtInfinity = false); 57 | 58 | Matrix4f CreateOrthoSubProjection ( bool rightHanded, StereoEye eyeType, 59 | float tanHalfFovX, float tanHalfFovY, 60 | float unitsX, float unitsY, float distanceFromCamera, 61 | float interpupillaryDistance, Matrix4f const &projection, 62 | float zNear = 0.0f, float zFar = 0.0f, 63 | bool flipZ = false, bool farAtInfinity = false); 64 | 65 | ScaleAndOffset2D CreateNDCScaleAndOffsetFromFov ( FovPort fov ); 66 | 67 | 68 | } //namespace OVR 69 | 70 | #endif // OVR_StereoProjection_h 71 | -------------------------------------------------------------------------------- /LibOVR0.6/Src/Resources/Windows/LibOVR.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR0.6/Src/Resources/Windows/LibOVR.rc -------------------------------------------------------------------------------- /LibOVR0.6/Src/Resources/Windows/Oculus.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR0.6/Src/Resources/Windows/Oculus.ico -------------------------------------------------------------------------------- /LibOVR0.6/Src/Resources/Windows/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR0.6/Src/Resources/Windows/resource.h -------------------------------------------------------------------------------- /LibOVR0.7/Include/Extras/OVR_StereoProjection.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVR_StereoProjection.h 4 | Content : Stereo projection functions 5 | Created : November 30, 2013 6 | Authors : Tom Fosyth 7 | 8 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.2 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | *************************************************************************************/ 26 | 27 | #ifndef OVR_StereoProjection_h 28 | #define OVR_StereoProjection_h 29 | 30 | 31 | #include "Extras/OVR_Math.h" 32 | 33 | 34 | namespace OVR { 35 | 36 | 37 | //----------------------------------------------------------------------------------- 38 | // ***** Stereo Enumerations 39 | 40 | // StereoEye specifies which eye we are rendering for; it is used to 41 | // retrieve StereoEyeParams. 42 | enum StereoEye 43 | { 44 | StereoEye_Left, 45 | StereoEye_Right, 46 | StereoEye_Center 47 | }; 48 | 49 | 50 | 51 | //----------------------------------------------------------------------------------- 52 | // ***** Propjection functions 53 | 54 | Matrix4f CreateProjection ( bool rightHanded, bool isOpenGL, FovPort fov, StereoEye eye, 55 | float zNear = 0.01f, float zFar = 10000.0f, 56 | bool flipZ = false, bool farAtInfinity = false); 57 | 58 | Matrix4f CreateOrthoSubProjection ( bool rightHanded, StereoEye eyeType, 59 | float tanHalfFovX, float tanHalfFovY, 60 | float unitsX, float unitsY, float distanceFromCamera, 61 | float interpupillaryDistance, Matrix4f const &projection, 62 | float zNear = 0.0f, float zFar = 0.0f, 63 | bool flipZ = false, bool farAtInfinity = false); 64 | 65 | ScaleAndOffset2D CreateNDCScaleAndOffsetFromFov ( FovPort fov ); 66 | 67 | 68 | } //namespace OVR 69 | 70 | #endif // OVR_StereoProjection_h 71 | -------------------------------------------------------------------------------- /LibOVR0.7/Include/OVR.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVR.h 3 | \brief The main public interface to Oculus for C++ Developers. 4 | \copyright Copyright 2015 Oculus VR, LLC All Rights reserved. 5 | *************************************************************************************/ 6 | 7 | #ifndef OVR_h 8 | #define OVR_h 9 | 10 | #include "OVR_Version.h" 11 | #include "OVR_CAPI.h" 12 | 13 | /* The following includes are deprecated from this location and will be removed from a future version of this library. */ 14 | #include "Kernel/OVR_Types.h" 15 | #include "Kernel/OVR_RefCount.h" 16 | #include "Kernel/OVR_Std.h" 17 | #include "Kernel/OVR_Alg.h" 18 | #include "Extras/OVR_Math.h" 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /LibOVR0.7/Include/OVR_CAPI.h: -------------------------------------------------------------------------------- 1 | #include "OVR_CAPI_0_7_0.h" 2 | -------------------------------------------------------------------------------- /LibOVR0.7/Include/OVR_CAPI_Keys.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVR_CAPI.h 3 | \brief Keys for CAPI calls 4 | \copyright Copyright 2014 Oculus VR, LLC All Rights reserved. 5 | ************************************************************************************/ 6 | 7 | #ifndef OVR_CAPI_Keys_h 8 | #define OVR_CAPI_Keys_h 9 | 10 | #include "OVR_Version.h" 11 | 12 | 13 | #define OVR_KEY_USER "User" // string 14 | #define OVR_KEY_NAME "Name" // string 15 | #define OVR_KEY_GENDER "Gender" // string "Male", "Female", or "Unknown" 16 | #define OVR_KEY_PLAYER_HEIGHT "PlayerHeight" // float meters 17 | #define OVR_KEY_EYE_HEIGHT "EyeHeight" // float meters 18 | #define OVR_KEY_IPD "IPD" // float meters 19 | #define OVR_KEY_NECK_TO_EYE_DISTANCE "NeckEyeDistance" // float[2] meters 20 | #define OVR_KEY_EYE_RELIEF_DIAL "EyeReliefDial" // int in range of 0-10 21 | #define OVR_KEY_EYE_TO_NOSE_DISTANCE "EyeToNoseDist" // float[2] meters 22 | #define OVR_KEY_MAX_EYE_TO_PLATE_DISTANCE "MaxEyeToPlateDist" // float[2] meters 23 | #define OVR_KEY_EYE_CUP "EyeCup" // char[16] "A", "B", or "C" 24 | #define OVR_KEY_CUSTOM_EYE_RENDER "CustomEyeRender" // bool 25 | //Legacy profile value tied to the device and serial 26 | #define OVR_KEY_CAMERA_POSITION_1 "CenteredFromWorld" // double[7] ovrPosef quat rotation x, y, z, w, translation x, y, z 27 | //New value that now only ties to the device so that swapping headsets retains the offset from the tracker 28 | #define OVR_KEY_CAMERA_POSITION_2 "CenteredFromWorld2" // double[7] ovrPosef quat rotation x, y, z, w, translation x, y, z 29 | #define OVR_KEY_CAMERA_POSITION OVR_KEY_CAMERA_POSITION_2 30 | 31 | 32 | // Default measurements empirically determined at Oculus to make us happy 33 | // The neck model numbers were derived as an average of the male and female averages from ANSUR-88 34 | // NECK_TO_EYE_HORIZONTAL = H22 - H43 = INFRAORBITALE_BACK_OF_HEAD - TRAGION_BACK_OF_HEAD 35 | // NECK_TO_EYE_VERTICAL = H21 - H15 = GONION_TOP_OF_HEAD - ECTOORBITALE_TOP_OF_HEAD 36 | // These were determined to be the best in a small user study, clearly beating out the previous default values 37 | #define OVR_DEFAULT_GENDER "Unknown" 38 | #define OVR_DEFAULT_PLAYER_HEIGHT 1.778f 39 | #define OVR_DEFAULT_EYE_HEIGHT 1.675f 40 | #define OVR_DEFAULT_IPD 0.064f 41 | #define OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL 0.0805f 42 | #define OVR_DEFAULT_NECK_TO_EYE_VERTICAL 0.075f 43 | #define OVR_DEFAULT_EYE_RELIEF_DIAL 3 44 | #define OVR_DEFAULT_CAMERA_POSITION {0,0,0,1,0,0,0} 45 | 46 | #define OVR_PERF_HUD_MODE "PerfHudMode" // allowed values are defined in enum ovrPerfHudMode 47 | 48 | #define OVR_DEBUG_HUD_STEREO_MODE "DebugHudStereoMode" // allowed values are defined in enum ovrDebugHudStereoMode 49 | #define OVR_DEBUG_HUD_STEREO_GUIDE_SIZE "DebugHudStereoGuideSize2f" // float[2] 50 | #define OVR_DEBUG_HUD_STEREO_GUIDE_POSITION "DebugHudStereoGuidePosition3f" // float[3] 51 | #define OVR_DEBUG_HUD_STEREO_GUIDE_YAWPITCHROLL "DebugHudStereoGuideYawPitchRoll3f" // float[3] 52 | #define OVR_DEBUG_HUD_STEREO_GUIDE_COLOR "DebugHudStereoGuideColor4f" // float[4] 53 | 54 | #endif // OVR_CAPI_Keys_h 55 | -------------------------------------------------------------------------------- /LibOVR0.7/Include/OVR_Kernel.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVRKernel.h 3 | \brief This contains references to all OVR Kernel headers in Src folder. 4 | \copyright Copyright 2015 Oculus VR, LLC All Rights reserved. 5 | *************************************************************************************/ 6 | 7 | /* This header file is deprecated and will be removed from a future version of this library */ 8 | 9 | #ifndef OVR_Kernel_h 10 | #define OVR_Kernel_h 11 | 12 | #include "Kernel/OVR_Types.h" 13 | #include "Kernel/OVR_Allocator.h" 14 | #include "Kernel/OVR_RefCount.h" 15 | #include "Kernel/OVR_Log.h" 16 | #include "Kernel/OVR_System.h" 17 | #include "Kernel/OVR_Nullptr.h" 18 | #include "Kernel/OVR_String.h" 19 | #include "Kernel/OVR_Array.h" 20 | #include "Kernel/OVR_Timer.h" 21 | #include "Kernel/OVR_SysFile.h" 22 | #include "Extras/OVR_Math.h" 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /LibOVR0.7/Include/OVR_Version.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVR_Version.h 3 | \brief This header provides LibOVR version identification. 4 | \copyright Copyright 2014 Oculus VR, LLC All Rights reserved. 5 | *************************************************************************************/ 6 | 7 | #ifndef OVR_Version_h 8 | #define OVR_Version_h 9 | 10 | 11 | 12 | /// Conventional string-ification macro. 13 | #if !defined(OVR_STRINGIZE) 14 | #define OVR_STRINGIZEIMPL(x) #x 15 | #define OVR_STRINGIZE(x) OVR_STRINGIZEIMPL(x) 16 | #endif 17 | 18 | 19 | // We are on major version 6 of the beta pre-release SDK. At some point we will 20 | // transition to product version 1 and reset the major version back to 1 (first 21 | // product release, version 1.0). 22 | #define OVR_PRODUCT_VERSION 0 23 | #define OVR_MAJOR_VERSION 7 24 | #define OVR_MINOR_VERSION 0 25 | #define OVR_PATCH_VERSION 0 26 | #define OVR_BUILD_NUMBER 0 27 | 28 | 29 | /// "Product.Major.Minor.Patch" 30 | #if !defined(OVR_VERSION_STRING) 31 | #define OVR_VERSION_STRING OVR_STRINGIZE(OVR_PRODUCT_VERSION.OVR_MAJOR_VERSION.OVR_MINOR_VERSION.OVR_PATCH_VERSION) 32 | #endif 33 | 34 | 35 | /// "Product.Major.Minor.Patch.Build" 36 | #if !defined(OVR_DETAILED_VERSION_STRING) 37 | #define OVR_DETAILED_VERSION_STRING OVR_STRINGIZE(OVR_PRODUCT_VERSION.OVR_MAJOR_VERSION.OVR_MINOR_VERSION.OVR_PATCH_VERSION.OVR_BUILD_NUMBER) 38 | #endif 39 | 40 | 41 | // This is the firmware version for the DK2 headset sensor board. 42 | //#if !defined(OVR_DK2_LATEST_FIRMWARE_MAJOR_VERSION) 43 | #define OVR_DK2_LATEST_FIRMWARE_MAJOR_VERSION 2 44 | #define OVR_DK2_LATEST_FIRMWARE_MINOR_VERSION 12 45 | //#endif 46 | 47 | // This is the product version for the Oculus Display Driver. A continuous 48 | // process will propagate this value to all dependent files 49 | #define OVR_DISPLAY_DRIVER_PRODUCT_VERSION "1.2.7.0" 50 | 51 | // This is the product version for the Oculus Position Tracker Driver. A 52 | // continuous process will propagate this value to all dependent files 53 | #define OVR_POSITIONAL_TRACKER_DRIVER_PRODUCT_VERSION "1.0.11.0" 54 | 55 | /// \brief file description for version info 56 | /// This appears in the user-visible file properties. It is intended to convey publicly 57 | /// available additional information such as feature builds. 58 | #if !defined(OVR_FILE_DESCRIPTION_STRING) 59 | #if defined(_DEBUG) 60 | #define OVR_FILE_DESCRIPTION_STRING "dev build debug" 61 | #else 62 | #define OVR_FILE_DESCRIPTION_STRING "dev build" 63 | #endif 64 | #endif 65 | 66 | 67 | #endif // OVR_Version_h 68 | -------------------------------------------------------------------------------- /LibOVR0.7/Projects/Windows/ForceRebuild.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | echo static const char* OVR_FORCE_REBUILD_PRE = __TIMESTAMP__; /* DO NOT SOURCE CONTROL THIS FILE */ > "$(ProjectDir)OVR_ForceRebuildNoCheckin.h" 9 | 10 | 11 | 12 | 13 | Force a rebuild. Please do not check in the ForceRebuildNoCheckin.h file. 14 | 15 | 16 | echo static const char* OVR_FORCE_REBUILD_POST = __TIMESTAMP__; /* DO NOT SOURCE CONTROL THIS FILE */ > "$(ProjectDir)OVR_ForceRebuildNoCheckin.h" 17 | 18 | 19 | Force a rebuild. Please do not check in the ForceRebuildNoCheckin.h file. 20 | 21 | 22 | "$(ProjectDir)OVR_ForceRebuildNoCheckin.h" 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /LibOVR0.7/Projects/Windows/LibOVR.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 0 6 | 7 7 | 0 8 | 0 9 | 0 10 | 11 | 12 | 13 | 14 | 15 | $(OVR_PRODUCT_VERSION) 16 | 17 | 18 | $(OVR_MAJOR_VERSION) 19 | 20 | 21 | $(OVR_MINOR_VERSION) 22 | 23 | 24 | $(OVR_PATCH_VERSION) 25 | 26 | 27 | $(OVR_BUILD_VERSION) 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /LibOVR0.7/Projects/Windows/OVRRootPath.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(ProjectDir)../../../../ 6 | 7 | 8 | 9 | 10 | 11 | $(OVRSDKROOT) 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /LibOVR0.7/Projects/Windows/VS2010/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | Include 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LibOVR0.7/Projects/Windows/VS2012/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | Include 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LibOVR0.7/Projects/Windows/VS2013/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | Include 29 | 30 | 31 | Include 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /LibOVR0.7/Projects/Windows/VS2013/OVR_ForceRebuildNoCheckin.h: -------------------------------------------------------------------------------- 1 | static const char* OVR_FORCE_REBUILD_POST = __TIMESTAMP__; /* DO NOT SOURCE CONTROL THIS FILE */ 2 | -------------------------------------------------------------------------------- /LibOVR0.7/Src/Resources/Windows/LibOVR.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR0.7/Src/Resources/Windows/LibOVR.rc -------------------------------------------------------------------------------- /LibOVR0.7/Src/Resources/Windows/Oculus.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR0.7/Src/Resources/Windows/Oculus.ico -------------------------------------------------------------------------------- /LibOVR0.7/Src/Resources/Windows/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR0.7/Src/Resources/Windows/resource.h -------------------------------------------------------------------------------- /LibOVR0.8/Include/Extras/OVR_StereoProjection.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVR_StereoProjection.h 4 | Content : Stereo projection functions 5 | Created : November 30, 2013 6 | Authors : Tom Fosyth 7 | 8 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.2 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | *************************************************************************************/ 26 | 27 | #ifndef OVR_StereoProjection_h 28 | #define OVR_StereoProjection_h 29 | 30 | 31 | #include "Extras/OVR_Math.h" 32 | 33 | 34 | namespace OVR { 35 | 36 | 37 | //----------------------------------------------------------------------------------- 38 | // ***** Stereo Enumerations 39 | 40 | // StereoEye specifies which eye we are rendering for; it is used to 41 | // retrieve StereoEyeParams. 42 | enum StereoEye 43 | { 44 | StereoEye_Left, 45 | StereoEye_Right, 46 | StereoEye_Center 47 | }; 48 | 49 | 50 | 51 | //----------------------------------------------------------------------------------- 52 | // ***** Propjection functions 53 | 54 | Matrix4f CreateProjection ( bool rightHanded, bool isOpenGL, FovPort fov, StereoEye eye, 55 | float zNear = 0.01f, float zFar = 10000.0f, 56 | bool flipZ = false, bool farAtInfinity = false); 57 | 58 | Matrix4f CreateOrthoSubProjection ( bool rightHanded, StereoEye eyeType, 59 | float tanHalfFovX, float tanHalfFovY, 60 | float unitsX, float unitsY, float distanceFromCamera, 61 | float interpupillaryDistance, Matrix4f const &projection, 62 | float zNear = 0.0f, float zFar = 0.0f, 63 | bool flipZ = false, bool farAtInfinity = false); 64 | 65 | ScaleAndOffset2D CreateNDCScaleAndOffsetFromFov ( FovPort fov ); 66 | 67 | 68 | } //namespace OVR 69 | 70 | #endif // OVR_StereoProjection_h 71 | -------------------------------------------------------------------------------- /LibOVR0.8/Include/OVR.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVR.h 3 | \brief The main public interface to Oculus for C++ Developers. 4 | \copyright Copyright 2015 Oculus VR, LLC All Rights reserved. 5 | *************************************************************************************/ 6 | 7 | #ifndef OVR_h 8 | #define OVR_h 9 | 10 | #include "OVR_Version.h" 11 | #include "OVR_CAPI.h" 12 | 13 | /* The following includes are deprecated from this location and will be removed from a future version of this library. */ 14 | #include "Kernel/OVR_Types.h" 15 | #include "Kernel/OVR_RefCount.h" 16 | #include "Kernel/OVR_Std.h" 17 | #include "Kernel/OVR_Alg.h" 18 | #include "Extras/OVR_Math.h" 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /LibOVR0.8/Include/OVR_CAPI.h: -------------------------------------------------------------------------------- 1 | #include "OVR_CAPI_0_8_0.h" 2 | -------------------------------------------------------------------------------- /LibOVR0.8/Include/OVR_CAPI_Audio.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVR_CAPI_Audio.h 3 | \brief CAPI audio functions. 4 | \copyright Copyright 2015 Oculus VR, LLC. All Rights reserved. 5 | ************************************************************************************/ 6 | 7 | 8 | #ifndef OVR_CAPI_Audio_h 9 | #define OVR_CAPI_Audio_h 10 | 11 | #include "OVR_CAPI.h" 12 | #include 13 | 14 | #define OVR_AUDIO_MAX_DEVICE_STR_SIZE 128 15 | 16 | /// Gets the ID of the preferred VR audio device. 17 | /// 18 | /// Multiple calls to ovr_CreateSwapTextureSetD3D11 for the same ovrHmd is supported, but applications 19 | /// cannot rely on switching between ovrSwapTextureSets at runtime without a performance penalty. 20 | /// 21 | /// \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 NULL. 22 | /// 23 | /// \return Returns an ovrResult indicating success or failure. In the case of failure, use 24 | /// ovr_GetLastErrorInfo to get more information. 25 | /// 26 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutWaveId(UINT* deviceOutId); 27 | 28 | 29 | /// Gets the GUID of the preferred VR audio device as a string. 30 | /// 31 | /// \param[out] deviceOutStrBuffer A buffer where the GUID string for the device will copied to. 32 | /// 33 | /// \return Returns an ovrResult indicating success or failure. In the case of failure, use 34 | /// ovr_GetLastErrorInfo to get more information. 35 | /// 36 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutGuidStr(WCHAR deviceOutStrBuffer[OVR_AUDIO_MAX_DEVICE_STR_SIZE]); 37 | 38 | 39 | /// Gets the GUID of the preferred VR audio device. 40 | /// 41 | /// \param[out] deviceOutGuid The GUID of the user's preferred VR audio device to use, which will be valid upon a successful return value, else it will be NULL. 42 | /// 43 | /// \return Returns an ovrResult indicating success or failure. In the case of failure, use 44 | /// ovr_GetLastErrorInfo to get more information. 45 | /// 46 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutGuid(GUID* deviceOutGuid); 47 | 48 | #endif // OVR_CAPI_Audio_h 49 | -------------------------------------------------------------------------------- /LibOVR0.8/Include/OVR_Kernel.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVRKernel.h 3 | \brief This contains references to all OVR Kernel headers in Src folder. 4 | \copyright Copyright 2015 Oculus VR, LLC All Rights reserved. 5 | *************************************************************************************/ 6 | 7 | /* This header file is deprecated and will be removed from a future version of this library */ 8 | 9 | #ifndef OVR_Kernel_h 10 | #define OVR_Kernel_h 11 | 12 | #include "Kernel/OVR_Types.h" 13 | #include "Kernel/OVR_Allocator.h" 14 | #include "Kernel/OVR_RefCount.h" 15 | #include "Kernel/OVR_Log.h" 16 | #include "Kernel/OVR_System.h" 17 | #include "Kernel/OVR_Nullptr.h" 18 | #include "Kernel/OVR_String.h" 19 | #include "Kernel/OVR_Array.h" 20 | #include "Kernel/OVR_Timer.h" 21 | #include "Kernel/OVR_SysFile.h" 22 | #include "Extras/OVR_Math.h" 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /LibOVR0.8/Include/OVR_Version.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************//** 2 | \file OVR_Version.h 3 | \brief This header provides LibOVR version identification. 4 | \copyright Copyright 2014 Oculus VR, LLC All Rights reserved. 5 | *************************************************************************************/ 6 | 7 | #ifndef OVR_Version_h 8 | #define OVR_Version_h 9 | 10 | 11 | 12 | /// Conventional string-ification macro. 13 | #if !defined(OVR_STRINGIZE) 14 | #define OVR_STRINGIZEIMPL(x) #x 15 | #define OVR_STRINGIZE(x) OVR_STRINGIZEIMPL(x) 16 | #endif 17 | 18 | 19 | // We are on major version 6 of the beta pre-release SDK. At some point we will 20 | // transition to product version 1 and reset the major version back to 1 (first 21 | // product release, version 1.0). 22 | #define OVR_PRODUCT_VERSION 0 23 | #define OVR_MAJOR_VERSION 8 24 | #define OVR_MINOR_VERSION 0 25 | #define OVR_PATCH_VERSION 0 26 | #define OVR_BUILD_NUMBER 0 27 | 28 | // This is the major version of the service that the DLL is compatible with. 29 | // When we backport changes to old versions of the DLL we update the old DLLs 30 | // to move this version number up to the latest version. 31 | // The DLL is responsible for checking that the service is the version it supports 32 | // and returning an appropriate error message if it has not been made compatible. 33 | #define OVR_DLL_COMPATIBLE_MAJOR_VERSION 8 34 | 35 | #define OVR_FEATURE_VERSION 0 36 | 37 | 38 | /// "Product.Major.Minor.Patch" 39 | #if !defined(OVR_VERSION_STRING) 40 | #define OVR_VERSION_STRING OVR_STRINGIZE(OVR_PRODUCT_VERSION.OVR_MAJOR_VERSION.OVR_MINOR_VERSION.OVR_PATCH_VERSION) 41 | #endif 42 | 43 | 44 | /// "Product.Major.Minor.Patch.Build" 45 | #if !defined(OVR_DETAILED_VERSION_STRING) 46 | #define OVR_DETAILED_VERSION_STRING OVR_STRINGIZE(OVR_PRODUCT_VERSION.OVR_MAJOR_VERSION.OVR_MINOR_VERSION.OVR_PATCH_VERSION.OVR_BUILD_NUMBER) 47 | #endif 48 | 49 | // This is the product version for the Oculus Display Driver. A continuous 50 | // process will propagate this value to all dependent files 51 | #define OVR_DISPLAY_DRIVER_PRODUCT_VERSION "1.2.8.0" 52 | 53 | // This is the product version for the Oculus Position Tracker Driver. A 54 | // continuous process will propagate this value to all dependent files 55 | #define OVR_POSITIONAL_TRACKER_DRIVER_PRODUCT_VERSION "1.0.14.0" 56 | 57 | /// \brief file description for version info 58 | /// This appears in the user-visible file properties. It is intended to convey publicly 59 | /// available additional information such as feature builds. 60 | #if !defined(OVR_FILE_DESCRIPTION_STRING) 61 | #if defined(_DEBUG) 62 | #define OVR_FILE_DESCRIPTION_STRING "dev build debug" 63 | #else 64 | #define OVR_FILE_DESCRIPTION_STRING "dev build" 65 | #endif 66 | #endif 67 | 68 | 69 | #endif // OVR_Version_h 70 | -------------------------------------------------------------------------------- /LibOVR0.8/Projects/Windows/ForceRebuild.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | echo static const char* OVR_FORCE_REBUILD_PRE = __TIMESTAMP__; /* DO NOT SOURCE CONTROL THIS FILE */ > "$(ProjectDir)OVR_ForceRebuildNoCheckin.h" 9 | 10 | 11 | 12 | 13 | Force a rebuild. Please do not check in the ForceRebuildNoCheckin.h file. 14 | 15 | 16 | echo static const char* OVR_FORCE_REBUILD_POST = __TIMESTAMP__; /* DO NOT SOURCE CONTROL THIS FILE */ > "$(ProjectDir)OVR_ForceRebuildNoCheckin.h" 17 | 18 | 19 | Force a rebuild. Please do not check in the ForceRebuildNoCheckin.h file. 20 | 21 | 22 | "$(ProjectDir)OVR_ForceRebuildNoCheckin.h" 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /LibOVR0.8/Projects/Windows/LibOVR.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 0 6 | 8 7 | 0 8 | 0 9 | 0 10 | 11 | 12 | 13 | 14 | 15 | $(OVR_PRODUCT_VERSION) 16 | 17 | 18 | $(OVR_MAJOR_VERSION) 19 | 20 | 21 | $(OVR_MINOR_VERSION) 22 | 23 | 24 | $(OVR_PATCH_VERSION) 25 | 26 | 27 | $(OVR_BUILD_VERSION) 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /LibOVR0.8/Projects/Windows/OVRRootPath.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(ProjectDir)../../../../ 6 | 7 | 8 | 9 | 10 | 11 | $(OVRSDKROOT) 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /LibOVR0.8/Projects/Windows/VS2010/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | Include 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LibOVR0.8/Projects/Windows/VS2012/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | Include 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LibOVR0.8/Projects/Windows/VS2013/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | Include 29 | 30 | 31 | Include 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /LibOVR0.8/Projects/Windows/VS2015/LibOVR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {19aff241-4a7e-4895-92de-c834a9ebc8f1} 6 | 7 | 8 | 9 | 10 | Include 11 | 12 | 13 | Include 14 | 15 | 16 | Include 17 | 18 | 19 | Include 20 | 21 | 22 | Include 23 | 24 | 25 | Include 26 | 27 | 28 | Include 29 | 30 | 31 | Include 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /LibOVR0.8/Projects/Windows/VS2015/OVR_ForceRebuildNoCheckin.h: -------------------------------------------------------------------------------- 1 | static const char* OVR_FORCE_REBUILD_POST = __TIMESTAMP__; /* DO NOT SOURCE CONTROL THIS FILE */ 2 | -------------------------------------------------------------------------------- /LibOVR0.8/Src/Resources/Windows/LibOVR.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR0.8/Src/Resources/Windows/LibOVR.rc -------------------------------------------------------------------------------- /LibOVR0.8/Src/Resources/Windows/Oculus.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR0.8/Src/Resources/Windows/Oculus.ico -------------------------------------------------------------------------------- /LibOVR0.8/Src/Resources/Windows/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVR0.8/Src/Resources/Windows/resource.h -------------------------------------------------------------------------------- /LibOVRKernel0.5/Projects/Windows/OVRRootPath.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(ProjectDir)../../../../ 6 | 7 | 8 | 9 | 10 | 11 | $(OVRSDKROOT) 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Projects/Windows/VS2013/LibOVRKernel.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibOVRKernel", "LibOVRKernel.vcxproj", "{29FA0962-DDC6-4F72-9D12-E150DF29E279}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {29FA0962-DDC6-4F72-9D12-E150DF29E279}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {29FA0962-DDC6-4F72-9D12-E150DF29E279}.Debug|Win32.Build.0 = Debug|Win32 18 | {29FA0962-DDC6-4F72-9D12-E150DF29E279}.Debug|x64.ActiveCfg = Debug|x64 19 | {29FA0962-DDC6-4F72-9D12-E150DF29E279}.Debug|x64.Build.0 = Debug|x64 20 | {29FA0962-DDC6-4F72-9D12-E150DF29E279}.Release|Win32.ActiveCfg = Release|Win32 21 | {29FA0962-DDC6-4F72-9D12-E150DF29E279}.Release|Win32.Build.0 = Release|Win32 22 | {29FA0962-DDC6-4F72-9D12-E150DF29E279}.Release|x64.ActiveCfg = Release|x64 23 | {29FA0962-DDC6-4F72-9D12-E150DF29E279}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Kernel/OVR_Alg.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVR_Alg.cpp 4 | Content : Static lookup tables for Alg functions 5 | Created : September 19, 2012 6 | Notes : 7 | 8 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.2 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | ************************************************************************************/ 26 | 27 | #include "OVR_Types.h" 28 | 29 | namespace OVR { namespace Alg { 30 | 31 | //------------------------------------------------------------------------ 32 | extern const uint8_t UpperBitTable[256] = 33 | { 34 | 0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, 35 | 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 36 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, 37 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, 38 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 39 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 40 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 41 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 42 | }; 43 | 44 | extern const uint8_t LowerBitTable[256] = 45 | { 46 | 8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0, 47 | 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0, 48 | 6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0, 49 | 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0, 50 | 7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0, 51 | 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0, 52 | 6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0, 53 | 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0 54 | }; 55 | 56 | 57 | }} // OVE::Alg 58 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Kernel/OVR_CRC32.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | PublicHeader: OVR 4 | Filename : OVR_CRC32.h 5 | Content : CRC-32 with polynomial used for sensor devices 6 | Created : June 20, 2014 7 | Author : Chris Taylor 8 | 9 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 10 | 11 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 12 | you may not use the Oculus VR Rift SDK except in compliance with the License, 13 | which is provided at the time of installation or download, or which 14 | otherwise accompanies this software in either electronic or hard copy form. 15 | 16 | You may obtain a copy of the License at 17 | 18 | http://www.oculusvr.com/licenses/LICENSE-3.2 19 | 20 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 21 | distributed under the License is distributed on an "AS IS" BASIS, 22 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | See the License for the specific language governing permissions and 24 | limitations under the License. 25 | 26 | ************************************************************************************/ 27 | 28 | #ifndef OVR_CRC32_h 29 | #define OVR_CRC32_h 30 | 31 | #include "OVR_Types.h" 32 | 33 | namespace OVR { 34 | 35 | 36 | //----------------------------------------------------------------------------------- 37 | // ***** CRC-32 38 | 39 | // Polynomial used and algorithm details are proprietary to our sensor board 40 | uint32_t CRC32_Calculate(const void* data, int bytes, uint32_t prevCRC = 0); 41 | 42 | 43 | } // namespace OVR 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Kernel/OVR_Callbacks.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | PublicHeader: Kernel 4 | Filename : OVR_Callbacks.cpp 5 | Content : Callback library 6 | Created : Nov 17, 2014 7 | Author : Chris Taylor 8 | 9 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 10 | 11 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 12 | you may not use the Oculus VR Rift SDK except in compliance with the License, 13 | which is provided at the time of installation or download, or which 14 | otherwise accompanies this software in either electronic or hard copy form. 15 | 16 | You may obtain a copy of the License at 17 | 18 | http://www.oculusvr.com/licenses/LICENSE-3.2 19 | 20 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 21 | distributed under the License is distributed on an "AS IS" BASIS, 22 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | See the License for the specific language governing permissions and 24 | limitations under the License. 25 | 26 | ************************************************************************************/ 27 | 28 | #include "OVR_Callbacks.h" 29 | 30 | namespace OVR { 31 | 32 | 33 | // Global emitter lock 34 | // 35 | // Add/remove operations on callbacks happen infrequently, and are already fairly 36 | // serialized in order of construction by design. Therefore contention for this 37 | // lock between call()/shutdown() is the main concern and is also rare. 38 | Lock CallbackEmitterBase::EmitterLock; 39 | 40 | 41 | } // namespace OVR 42 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Kernel/OVR_Color.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | PublicHeader: OVR_Kernel.h 4 | Filename : OVR_Color.h 5 | Content : Contains color struct. 6 | Created : February 7, 2013 7 | Notes : 8 | 9 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 10 | 11 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 12 | you may not use the Oculus VR Rift SDK except in compliance with the License, 13 | which is provided at the time of installation or download, or which 14 | otherwise accompanies this software in either electronic or hard copy form. 15 | 16 | You may obtain a copy of the License at 17 | 18 | http://www.oculusvr.com/licenses/LICENSE-3.2 19 | 20 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 21 | distributed under the License is distributed on an "AS IS" BASIS, 22 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | See the License for the specific language governing permissions and 24 | limitations under the License. 25 | 26 | ************************************************************************************/ 27 | #ifndef OVR_Color_h 28 | #define OVR_Color_h 29 | 30 | #include "OVR_Types.h" 31 | 32 | namespace OVR { 33 | 34 | 35 | struct Color 36 | { 37 | uint8_t R,G,B,A; 38 | 39 | Color() 40 | { 41 | #if defined(OVR_BUILD_DEBUG) 42 | R = G = B = A = 0; 43 | #endif 44 | } 45 | 46 | // Constructs color by channel. Alpha is set to 0xFF (fully visible) 47 | // if not specified. 48 | Color(unsigned char r,unsigned char g,unsigned char b, unsigned char a = 0xFF) 49 | : R(r), G(g), B(b), A(a) { } 50 | 51 | // 0xAARRGGBB - Common HTML color Hex layout 52 | Color(unsigned c) 53 | : R((unsigned char)(c>>16)), G((unsigned char)(c>>8)), 54 | B((unsigned char)c), A((unsigned char)(c>>24)) { } 55 | 56 | bool operator==(const Color& b) const 57 | { 58 | return R == b.R && G == b.G && B == b.B && A == b.A; 59 | } 60 | 61 | void GetRGBA(float *r, float *g, float *b, float* a) const 62 | { 63 | *r = R / 255.0f; 64 | *g = G / 255.0f; 65 | *b = B / 255.0f; 66 | *a = A / 255.0f; 67 | } 68 | }; 69 | 70 | 71 | } // namespace OVR 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Kernel/OVR_Rand.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | 3 | Filename : OVR_Rand.cpp 4 | Content : Random number generator 5 | Created : Aug 28, 2014 6 | Author : Chris Taylor 7 | 8 | Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.2 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | ************************************************************************************/ 26 | 27 | #include "OVR_Rand.h" 28 | #include "OVR_Timer.h" 29 | 30 | namespace OVR { 31 | 32 | 33 | void RandomNumberGenerator::SeedRandom() 34 | { 35 | uint64_t seed = Timer::GetTicksNanos(); 36 | 37 | uint32_t x = (uint32_t)seed, y = (uint32_t)(seed >> 32); 38 | 39 | Seed(x, y); 40 | } 41 | 42 | void RandomNumberGenerator::Seed(uint32_t x, uint32_t y) 43 | { 44 | // Based on the mixing functions of MurmurHash3 45 | static const uint64_t C1 = 0xff51afd7ed558ccdULL; 46 | static const uint64_t C2 = 0xc4ceb9fe1a85ec53ULL; 47 | 48 | x += y; 49 | y += x; 50 | 51 | uint64_t seed_x = 0x9368e53c2f6af274ULL ^ x; 52 | uint64_t seed_y = 0x586dcd208f7cd3fdULL ^ y; 53 | 54 | seed_x *= C1; 55 | seed_x ^= seed_x >> 33; 56 | seed_x *= C2; 57 | seed_x ^= seed_x >> 33; 58 | 59 | seed_y *= C1; 60 | seed_y ^= seed_y >> 33; 61 | seed_y *= C2; 62 | seed_y ^= seed_y >> 33; 63 | 64 | Rx = seed_x; 65 | Ry = seed_y; 66 | 67 | // Inlined Next(): Discard first output 68 | 69 | Rx = (uint64_t)0xfffd21a7 * (uint32_t)Rx + (uint32_t)(Rx >> 32); 70 | Ry = (uint64_t)0xfffd1361 * (uint32_t)Ry + (uint32_t)(Ry >> 32); 71 | 72 | // Throw away any saved RandN() state 73 | HaveRandN = false; 74 | 75 | Seeded = true; 76 | } 77 | 78 | 79 | } // namespace OVR 80 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Kernel/OVR_RefCount.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVR_RefCount.cpp 4 | Content : Reference counting implementation 5 | Created : September 19, 2012 6 | Notes : 7 | 8 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.2 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | ************************************************************************************/ 26 | 27 | #include "OVR_RefCount.h" 28 | #include "OVR_Atomic.h" 29 | #include "OVR_Log.h" 30 | 31 | namespace OVR { 32 | 33 | 34 | // ***** Reference Count Base implementation 35 | 36 | RefCountImplCore::~RefCountImplCore() 37 | { 38 | // RefCount can be either 1 or 0 here. 39 | // 0 if Release() was properly called. 40 | // 1 if the object was declared on stack or as an aggregate. 41 | OVR_ASSERT(RefCount <= 1); 42 | } 43 | 44 | #ifdef OVR_BUILD_DEBUG 45 | void RefCountImplCore::reportInvalidDelete(void *pmem) 46 | { 47 | OVR_DEBUG_LOG( 48 | ("Invalid delete call on ref-counted object at %p. Please use Release()", pmem)); 49 | OVR_ASSERT(0); 50 | } 51 | #endif 52 | 53 | RefCountNTSImplCore::~RefCountNTSImplCore() 54 | { 55 | // RefCount can be either 1 or 0 here. 56 | // 0 if Release() was properly called. 57 | // 1 if the object was declared on stack or as an aggregate. 58 | OVR_ASSERT(RefCount <= 1); 59 | } 60 | 61 | #ifdef OVR_BUILD_DEBUG 62 | void RefCountNTSImplCore::reportInvalidDelete(void *pmem) 63 | { 64 | OVR_DEBUG_LOG( 65 | ("Invalid delete call on ref-counted object at %p. Please use Release()", pmem)); 66 | OVR_ASSERT(0); 67 | } 68 | #endif 69 | 70 | 71 | // *** Thread-Safe RefCountImpl 72 | 73 | void RefCountImpl::AddRef() 74 | { 75 | AtomicOps::ExchangeAdd_NoSync(&RefCount, 1); 76 | } 77 | void RefCountImpl::Release() 78 | { 79 | if ((AtomicOps::ExchangeAdd_NoSync(&RefCount, -1) - 1) == 0) 80 | delete this; 81 | } 82 | 83 | // *** Thread-Safe RefCountVImpl w/virtual AddRef/Release 84 | 85 | void RefCountVImpl::AddRef() 86 | { 87 | AtomicOps::ExchangeAdd_NoSync(&RefCount, 1); 88 | } 89 | void RefCountVImpl::Release() 90 | { 91 | if ((AtomicOps::ExchangeAdd_NoSync(&RefCount, -1) - 1) == 0) 92 | delete this; 93 | } 94 | 95 | // *** NON-Thread-Safe RefCountImpl 96 | 97 | void RefCountNTSImpl::Release() const 98 | { 99 | RefCount--; 100 | if (RefCount == 0) 101 | delete this; 102 | } 103 | 104 | 105 | } // OVR 106 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Kernel/OVR_StringHash.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | PublicHeader: None 4 | Filename : OVR_StringHash.h 5 | Content : String hash table used when optional case-insensitive 6 | lookup is required. 7 | Created : September 19, 2012 8 | Notes : 9 | 10 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 11 | 12 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 13 | you may not use the Oculus VR Rift SDK except in compliance with the License, 14 | which is provided at the time of installation or download, or which 15 | otherwise accompanies this software in either electronic or hard copy form. 16 | 17 | You may obtain a copy of the License at 18 | 19 | http://www.oculusvr.com/licenses/LICENSE-3.2 20 | 21 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 22 | distributed under the License is distributed on an "AS IS" BASIS, 23 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 24 | See the License for the specific language governing permissions and 25 | limitations under the License. 26 | 27 | ************************************************************************************/ 28 | 29 | #ifndef OVR_StringHash_h 30 | #define OVR_StringHash_h 31 | 32 | #include "OVR_String.h" 33 | #include "OVR_Hash.h" 34 | 35 | namespace OVR { 36 | 37 | //----------------------------------------------------------------------------------- 38 | // *** StringHash 39 | 40 | // This is a custom string hash table that supports case-insensitive 41 | // searches through special functions such as GetCaseInsensitive, etc. 42 | // This class is used for Flash labels, exports and other case-insensitive tables. 43 | 44 | template > 45 | class StringHash : public Hash 46 | { 47 | public: 48 | typedef U ValueType; 49 | typedef StringHash SelfType; 50 | typedef Hash BaseType; 51 | 52 | public: 53 | 54 | void operator = (const SelfType& src) { BaseType::operator = (src); } 55 | 56 | bool GetCaseInsensitive(const String& key, U* pvalue) const 57 | { 58 | String::NoCaseKey ikey(key); 59 | return BaseType::GetAlt(ikey, pvalue); 60 | } 61 | // Pointer-returning get variety. 62 | const U* GetCaseInsensitive(const String& key) const 63 | { 64 | String::NoCaseKey ikey(key); 65 | return BaseType::GetAlt(ikey); 66 | } 67 | U* GetCaseInsensitive(const String& key) 68 | { 69 | String::NoCaseKey ikey(key); 70 | return BaseType::GetAlt(ikey); 71 | } 72 | 73 | 74 | typedef typename BaseType::Iterator base_iterator; 75 | 76 | base_iterator FindCaseInsensitive(const String& key) 77 | { 78 | String::NoCaseKey ikey(key); 79 | return BaseType::FindAlt(ikey); 80 | } 81 | 82 | // Set just uses a find and assigns value if found. The key is not modified; 83 | // this behavior is identical to Flash string variable assignment. 84 | void SetCaseInsensitive(const String& key, const U& value) 85 | { 86 | base_iterator it = FindCaseInsensitive(key); 87 | if (it != BaseType::End()) 88 | { 89 | it->Second = value; 90 | } 91 | else 92 | { 93 | BaseType::Add(key, value); 94 | } 95 | } 96 | }; 97 | 98 | } // OVR 99 | 100 | #endif 101 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Kernel/OVR_String_FormatUtil.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVR_String_FormatUtil.cpp 4 | Content : String format functions. 5 | Created : February 27, 2013 6 | Notes : 7 | 8 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.2 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | ************************************************************************************/ 26 | 27 | #include "OVR_String.h" 28 | #include "OVR_Log.h" 29 | 30 | namespace OVR { 31 | 32 | void StringBuffer::AppendFormat(const char* format, ...) 33 | { 34 | va_list argList; 35 | char buffer[512]; 36 | char* bufferUsed = buffer; 37 | char* bufferAllocated = NULL; 38 | 39 | va_start(argList, format); 40 | 41 | #if !defined(OVR_CC_MSVC) // Non-Microsoft compilers require you to save a copy of the va_list. 42 | va_list argListSaved; 43 | va_copy(argListSaved, argList); 44 | #endif 45 | 46 | int requiredStrlen = OVR_vsnprintf(bufferUsed, OVR_ARRAY_COUNT(buffer), format, argList); // The large majority of the time this will succeed. 47 | 48 | if(requiredStrlen >= (int)sizeof(buffer)) // If the initial capacity wasn't enough... 49 | { 50 | bufferAllocated = (char*)OVR_ALLOC(sizeof(char) * (requiredStrlen + 1)); 51 | bufferUsed = bufferAllocated; 52 | if(bufferAllocated) 53 | { 54 | #if !defined(OVR_CC_MSVC) 55 | va_end(argList); 56 | va_copy(argList, argListSaved); 57 | #endif 58 | requiredStrlen = OVR_vsnprintf(bufferAllocated, (requiredStrlen + 1), format, argList); 59 | } 60 | } 61 | 62 | if(requiredStrlen < 0) // If there was a printf format error... 63 | { 64 | bufferUsed = NULL; 65 | } 66 | 67 | va_end(argList); 68 | 69 | if(bufferUsed) 70 | AppendString(bufferUsed); 71 | 72 | if(bufferAllocated) 73 | OVR_FREE(bufferAllocated); 74 | } 75 | 76 | } // OVR 77 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Kernel/OVR_Timer.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | PublicHeader: OVR 4 | Filename : OVR_Timer.h 5 | Content : Provides static functions for precise timing 6 | Created : September 19, 2012 7 | Notes : 8 | 9 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 10 | 11 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 12 | you may not use the Oculus VR Rift SDK except in compliance with the License, 13 | which is provided at the time of installation or download, or which 14 | otherwise accompanies this software in either electronic or hard copy form. 15 | 16 | You may obtain a copy of the License at 17 | 18 | http://www.oculusvr.com/licenses/LICENSE-3.2 19 | 20 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 21 | distributed under the License is distributed on an "AS IS" BASIS, 22 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | See the License for the specific language governing permissions and 24 | limitations under the License. 25 | 26 | ************************************************************************************/ 27 | 28 | #ifndef OVR_Timer_h 29 | #define OVR_Timer_h 30 | 31 | #include "OVR_Types.h" 32 | 33 | namespace OVR { 34 | 35 | //----------------------------------------------------------------------------------- 36 | // ***** Timer 37 | 38 | // Timer class defines a family of static functions used for application 39 | // timing and profiling. 40 | 41 | class Timer 42 | { 43 | public: 44 | enum { 45 | MsPerSecond = 1000, // Milliseconds in one second. 46 | MksPerSecond = 1000 * 1000, // Microseconds in one second. 47 | NanosPerSecond = 1000 * 1000 * 1000, // Nanoseconds in one second. 48 | }; 49 | 50 | // ***** Timing APIs for Application 51 | 52 | // These APIs should be used to guide animation and other program functions 53 | // that require precision. 54 | 55 | // Returns global high-resolution application timer in seconds. 56 | static double OVR_STDCALL GetSeconds(); 57 | 58 | // Returns time in Nanoseconds, using highest possible system resolution. 59 | static uint64_t OVR_STDCALL GetTicksNanos(); 60 | 61 | #ifdef OVR_OS_MS 62 | static double OVR_STDCALL GetPerfFrequencyInverse(); 63 | #endif 64 | 65 | // Kept for compatibility. 66 | // Returns ticks in milliseconds, as a 32-bit number. May wrap around every 49.2 days. 67 | // Use either time difference of two values of GetTicks to avoid wrap-around. 68 | static uint32_t OVR_STDCALL GetTicksMs() 69 | { return uint32_t(GetTicksNanos() / 1000000); } 70 | 71 | // for recorded data playback 72 | static void SetFakeSeconds(double fakeSeconds, bool enable = true) 73 | { 74 | FakeSeconds = fakeSeconds; 75 | useFakeSeconds = enable; 76 | } 77 | 78 | private: 79 | friend class System; 80 | // System called during program startup/shutdown. 81 | static void initializeTimerSystem(); 82 | static void shutdownTimerSystem(); 83 | 84 | // for recorded data playback 85 | static double FakeSeconds; 86 | static bool useFakeSeconds; 87 | 88 | #if defined(OVR_OS_ANDROID) 89 | // Android-specific data 90 | #elif defined (OVR_OS_MS) 91 | // Microsoft-specific data 92 | #endif 93 | }; 94 | 95 | 96 | } // OVR::Timer 97 | 98 | #endif 99 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Tracing/LibOVREvents.man: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVRKernel0.5/Src/Tracing/LibOVREvents.man -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Tracing/LibOVREventsTEMP.BIN: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVRKernel0.5/Src/Tracing/LibOVREventsTEMP.BIN -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Tracing/LibOVREvents_MSG00001.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalavaras/LibOVRWrapper/2afc08b45a3836be9fa9aaa0d017aa63e3bd56e5/LibOVRKernel0.5/Src/Tracing/LibOVREvents_MSG00001.bin -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Tracing/README.md: -------------------------------------------------------------------------------- 1 | #Setup 2 | 3 | If you want stack walking to work on x64: 4 | 5 | > reg add "HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management" -v DisablePagingExecutive -d 0x1 -t REG_DWORD -f 6 | 7 | Add USERS Read & Execute privileges to the folder (or one of its parents) containing the LibOVREvents.man file: 8 | 9 | > icacls . /grant BUILTIN\Users:(OI)(CI)(RX) 10 | 11 | To install or reinstall the ETW manifest after building LibOVR run `install.cmd` as Administrator: 12 | 13 | > install 14 | 15 | Note: the install script will also attempt to install the manifests for the driver and runtime. Also note that the install 16 | script installs the manifest from the newest version of LibOVR.dll, which might not be the version you are debugging in 17 | Visual Studio (this will only matter if the two versions have specified different events). To be safe make sure your build 18 | is up-to-date. 19 | 20 | #Adding trace points 21 | 22 | See [./Tracing.h] and the examples in [../OVR_CAPI.cpp]. 23 | 24 | The following macros can be used to trace call/return and progress through a function: 25 | 26 | TraceCall(frameIndex) 27 | TraceReturn(frameIndex) 28 | TraceWaypoint(frameIndex) 29 | 30 | Try to place the Call/Return instrumentation as close as possible to the function entry/exit points, and don't forget 31 | to instrument all return paths. 32 | 33 | Supply a frame index of 0 if a frame index is not applicable/available. 34 | 35 | #Adding new trace events 36 | 37 | Use the `ECManGen.exe` utility from the Windows 8.1 SDK to edit the `LibOVREvents.man` manifest. 38 | 39 | See [http://msdn.microsoft.com/en-us/library/windows/desktop/dd996930%28v=vs.85%29.aspx] 40 | The `F1` help is also useful. 41 | 42 | #Rebuilding the ETW headers and resources 43 | 44 | Use the `build.cmd` script to regenerate the `LibOVREvents.h`, `LibOVREvents.rc` and `LibOVREvents*.bin` files. 45 | `clean.cmd` will remove all generated files. 46 | 47 | Note that the outputs are checked into the repository so you'll need to `p4 edit` them first. 48 | 49 | #Capturing ETW traces 50 | 51 | See [../../../Tools/XPerf/README.md] 52 | 53 | #Viewing ETW traces with GPUView 54 | 55 | See [http://msdn.microsoft.com/en-us/library/windows/desktop/jj585574(v=vs.85).aspx] 56 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Tracing/build.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM 3 | REM build.cmd - rebuild generated ETW tracing files from LibOVREvents.man 4 | REM 5 | 6 | REM assume mc.exe is in a path relative to xperf.exe 7 | for /f "delims=" %%a in ('where /F Xperf') do set XPERF_PATH=%%~dpa 8 | 9 | set OSTYPE=x86 10 | if not "%PROCESSOR_ARCHITECTURE%"=="x86" set OSTYPE=x64 11 | if not "%PROCESSOR_ARCHITEW6432%"=="" set OSTYPE=x64 12 | 13 | set MC="%XPERF_PATH%..\bin\%OSTYPE%\mc.exe" 14 | 15 | %MC% -v -a -A -n -um .\LibOVREvents.man -h . -z LibOVREvents 16 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Tracing/clean.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM 3 | REM clean.cmd - remove generated ETW tracing files 4 | REM 5 | 6 | del LibOVREvents.h LibOVREvents.rc LibOVREvents*.bin *LibOVRRT*.dll 7 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Util/Util_LongPollThread.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : Util_LongPollThread.cpp 4 | Content : Allows us to do all long polling tasks from a single thread to minimize deadlock risk 5 | Created : June 30, 2013 6 | Authors : Chris Taylor 7 | 8 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.2 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | *************************************************************************************/ 26 | 27 | #include "Util_LongPollThread.h" 28 | #include "Util_Watchdog.h" 29 | 30 | OVR_DEFINE_SINGLETON(OVR::Util::LongPollThread); 31 | 32 | namespace OVR { namespace Util { 33 | 34 | 35 | void LongPollThread::AddPollFunc(CallbackListener* func) 36 | { 37 | PollSubject.AddListener(func); 38 | } 39 | 40 | LongPollThread::LongPollThread() : 41 | Terminated(false) 42 | { 43 | Start(); 44 | 45 | // Must be at end of function 46 | PushDestroyCallbacks(); 47 | } 48 | 49 | LongPollThread::~LongPollThread() 50 | { 51 | fireTermination(); 52 | 53 | Join(); 54 | } 55 | 56 | void LongPollThread::OnThreadDestroy() 57 | { 58 | fireTermination(); 59 | } 60 | 61 | void LongPollThread::Wake() 62 | { 63 | WakeEvent.SetEvent(); 64 | } 65 | 66 | void LongPollThread::fireTermination() 67 | { 68 | Terminated = true; 69 | Wake(); 70 | } 71 | 72 | void LongPollThread::OnSystemDestroy() 73 | { 74 | Release(); 75 | } 76 | 77 | int LongPollThread::Run() 78 | { 79 | SetThreadName("LongPoll"); 80 | WatchDog watchdog("LongPoll"); 81 | 82 | // While not terminated, 83 | do 84 | { 85 | watchdog.Feed(10000); 86 | 87 | PollSubject.Call(); 88 | 89 | WakeEvent.Wait(WakeupInterval); 90 | WakeEvent.ResetEvent(); 91 | } while (!Terminated); 92 | 93 | return 0; 94 | } 95 | 96 | 97 | }} // namespace OVR::Util 98 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Util/Util_LongPollThread.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : Util_LongPollThread.h 4 | Content : Allows us to do all long polling tasks from a single thread to minimize deadlock risk 5 | Created : June 30, 2013 6 | Authors : Chris Taylor 7 | 8 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.2 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | *************************************************************************************/ 26 | 27 | #ifndef OVR_Util_LongPollThread_h 28 | #define OVR_Util_LongPollThread_h 29 | 30 | #include "Kernel/OVR_Timer.h" 31 | #include "Kernel/OVR_Atomic.h" 32 | #include "Kernel/OVR_Allocator.h" 33 | #include "Kernel/OVR_String.h" 34 | #include "Kernel/OVR_System.h" 35 | #include "Kernel/OVR_Threads.h" 36 | #include "Kernel/OVR_Callbacks.h" 37 | 38 | namespace OVR { namespace Util { 39 | 40 | 41 | //----------------------------------------------------------------------------- 42 | // LongPollThread 43 | 44 | // This thread runs long-polling subsystems that wake up every second or so 45 | // The motivation is to reduce the number of threads that are running to minimize the risk of deadlock 46 | class LongPollThread : public Thread, public SystemSingletonBase 47 | { 48 | OVR_DECLARE_SINGLETON(LongPollThread); 49 | virtual void OnThreadDestroy(); 50 | 51 | public: 52 | typedef Delegate0 PollFunc; 53 | static const int WakeupInterval = 1000; // milliseconds 54 | 55 | void AddPollFunc(CallbackListener* func); 56 | 57 | void Wake(); 58 | 59 | protected: 60 | CallbackEmitter PollSubject; 61 | 62 | bool Terminated; 63 | Event WakeEvent; 64 | void fireTermination(); 65 | 66 | virtual int Run(); 67 | }; 68 | 69 | 70 | }} // namespace OVR::Util 71 | 72 | #endif // OVR_Util_LongPollThread_h 73 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Util/Util_SystemGUI.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : Util_SystemGUI.h 4 | Content : OS GUI access, usually for diagnostics. 5 | Created : October 20, 2014 6 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 7 | 8 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 9 | you may not use the Oculus VR Rift SDK except in compliance with the License, 10 | which is provided at the time of installation or download, or which 11 | otherwise accompanies this software in either electronic or hard copy form. 12 | 13 | You may obtain a copy of the License at 14 | 15 | http://www.oculusvr.com/licenses/LICENSE-3.2 16 | 17 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | 23 | *************************************************************************************/ 24 | 25 | #ifndef OVR_Util_GUI_h 26 | #define OVR_Util_GUI_h 27 | 28 | 29 | namespace OVR { namespace Util { 30 | 31 | // Displays a modal message box on the default GUI display (not on a VR device). 32 | // The message box interface (e.g. OK button) is not localized. 33 | bool DisplayMessageBox(const char* pTitle, const char* pText); 34 | 35 | bool DisplayMessageBoxF(const char* pTitle, const char* pFormat, ...); 36 | 37 | } } // namespace OVR::Util 38 | 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Util/Util_SystemGUI_OSX.mm: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : Util_SystemGUI.mm 4 | Content : OS GUI access, usually for diagnostics. 5 | Created : October 20, 2014 6 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 7 | 8 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 9 | you may not use the Oculus VR Rift SDK except in compliance with the License, 10 | which is provided at the time of installation or download, or which 11 | otherwise accompanies this software in either electronic or hard copy form. 12 | 13 | You may obtain a copy of the License at 14 | 15 | http://www.oculusvr.com/licenses/LICENSE-3.2 16 | 17 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | 23 | *************************************************************************************/ 24 | 25 | 26 | 27 | #include "Util_SystemGUI.h" 28 | 29 | #include 30 | #include 31 | 32 | 33 | namespace OVR { namespace Util { 34 | 35 | 36 | bool DisplayMessageBox(const char* pTitle, const char* pText) 37 | { 38 | // To consider: Replace usage of CFUserNotificationDisplayAlert with something a little smarter. 39 | 40 | size_t titleLength = strlen(pTitle); 41 | size_t textLength = strlen(pText); 42 | if(textLength > 1500) // CFUserNotificationDisplayAlert isn't smart enough to handle large text sizes and screws up its size if so. 43 | textLength = 1500; // Problem: this can theoretically split a UTF8 multibyte sequence. Need to find a divisible boundary. 44 | CFAllocatorRef allocator = NULL; // To do: support alternative allocator. 45 | CFStringRef titleRef = CFStringCreateWithBytes(allocator, (const UInt8*)pTitle, (CFIndex)titleLength, kCFStringEncodingUTF8, false); 46 | CFStringRef textRef = CFStringCreateWithBytes(allocator, (const UInt8*)pText, (CFIndex)textLength, kCFStringEncodingUTF8, false); 47 | CFOptionFlags result; 48 | 49 | CFUserNotificationDisplayAlert(0, // No timeout 50 | kCFUserNotificationNoteAlertLevel, 51 | NULL, // Icon URL, use default. 52 | NULL, // Unused 53 | NULL, // Localization of strings 54 | titleRef, // Title text 55 | textRef, // Body text 56 | CFSTR("OK"), // Default "OK" text in button 57 | CFSTR("Cancel"), // Other button title 58 | NULL, // Yet another button title, NULL means no other button. 59 | &result); // response flags 60 | CFRelease(titleRef); 61 | CFRelease(textRef); 62 | 63 | return (result == kCFUserNotificationDefaultResponse); 64 | } 65 | 66 | 67 | } } // namespace OVR { namespace Util { 68 | 69 | 70 | -------------------------------------------------------------------------------- /LibOVRKernel0.5/Src/Util/Util_SystemInfo.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : Util_SystemInfo.h 4 | Content : Various operations to get information about the system 5 | Created : September 26, 2014 6 | Author : Kevin Jenkins 7 | 8 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.2 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | ************************************************************************************/ 26 | 27 | 28 | #ifndef OVR_Util_SystemInfo_h 29 | #define OVR_Util_SystemInfo_h 30 | 31 | #include "../Kernel/OVR_String.h" 32 | #include "../Kernel/OVR_Types.h" 33 | #include "../Kernel/OVR_Array.h" 34 | 35 | namespace OVR { namespace Util { 36 | 37 | const char * OSAsString(); 38 | String OSVersionAsString(); 39 | uint64_t GetGuidInt(); 40 | String GetGuidString(); 41 | const char * GetProcessInfo(); 42 | String GetFileVersionString(String filePath); 43 | String GetSystemFileVersionString(String filePath); 44 | String GetDisplayDriverVersion(); 45 | String GetCameraDriverVersion(); 46 | void GetGraphicsCardList(OVR::Array< OVR::String > &gpus); 47 | String GetProcessorInfo(); 48 | 49 | 50 | } } // namespace OVR { namespace Util { 51 | 52 | #endif // OVR_Util_SystemInfo_h 53 | -------------------------------------------------------------------------------- /LibOVRWrapper0.5/OVRShim.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "stdafx.h" 4 | 5 | #if !defined(OVR_DLL_BUILD) 6 | #define OVR_DLL_BUILD 7 | #endif 8 | 9 | #include "../LibOVR0.5/Include/OVR_CAPI_0_5_0.h" 10 | 11 | void copyPose(ovrPosef* dest, const ovrPosef1_3* source); 12 | void copyPoseState(ovrPoseStatef* dest, const ovrPoseStatef1_3* source); -------------------------------------------------------------------------------- /LibOVRWrapper0.5/OVRShim_GL.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #undef OVR_PUBLIC_FUNCTION 4 | #undef OVR_PUBLIC_CLASS 5 | #undef OVR_PRIVATE_FUNCTION 6 | #undef OVR_PRIVATE_CLASS 7 | 8 | #if !defined(OVR_DLL_BUILD) 9 | #define OVR_DLL_BUILD 10 | #endif 11 | 12 | #include "../LibOVR0.5/Include/OVR_CAPI_0_5_0.h" 13 | #include "../LibOVR0.5/Include/OVR_CAPI_GL.h" 14 | 15 | #include "shimhelper.h" 16 | -------------------------------------------------------------------------------- /LibOVRWrapper0.5/OVR_StereoProjection.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVR_StereoProjection.h 4 | Content : Stereo projection functions 5 | Created : November 30, 2013 6 | Authors : Tom Fosyth 7 | 8 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.2 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | *************************************************************************************/ 26 | 27 | #ifndef OVR_StereoProjection_h 28 | #define OVR_StereoProjection_h 29 | 30 | 31 | #include "Extras/OVR_Math.h" 32 | 33 | 34 | namespace OVR { 35 | 36 | 37 | //----------------------------------------------------------------------------------- 38 | // ***** Stereo Enumerations 39 | 40 | // StereoEye specifies which eye we are rendering for; it is used to 41 | // retrieve StereoEyeParams. 42 | enum StereoEye 43 | { 44 | StereoEye_Center, 45 | StereoEye_Left, 46 | StereoEye_Right 47 | }; 48 | 49 | 50 | 51 | //----------------------------------------------------------------------------------- 52 | // ***** Propjection functions 53 | 54 | Matrix4f CreateProjection ( bool rightHanded, bool isOpenGL, FovPort fov, StereoEye eye, 55 | float zNear = 0.01f, float zFar = 10000.0f, 56 | bool flipZ = false, bool farAtInfinity = false); 57 | 58 | Matrix4f CreateOrthoSubProjection ( bool rightHanded, StereoEye eyeType, 59 | float tanHalfFovX, float tanHalfFovY, 60 | float unitsX, float unitsY, float distanceFromCamera, 61 | float interpupillaryDistance, Matrix4f const &projection, 62 | float zNear = 0.0f, float zFar = 0.0f, 63 | bool flipZ = false, bool farAtInfinity = false); 64 | 65 | ScaleAndOffset2D CreateNDCScaleAndOffsetFromFov ( FovPort fov ); 66 | 67 | 68 | } //namespace OVR 69 | 70 | #endif // OVR_StereoProjection_h 71 | -------------------------------------------------------------------------------- /LibOVRWrapper0.5/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Defines the entry point for the DLL application. 2 | #include "stdafx.h" 3 | 4 | #include 5 | #include 6 | 7 | BOOL APIENTRY DllMain( HMODULE hModule, 8 | DWORD ul_reason_for_call, 9 | LPVOID lpReserved 10 | ) 11 | { 12 | switch (ul_reason_for_call) 13 | { 14 | case DLL_PROCESS_ATTACH: 15 | { 16 | int loglevel = 0; 17 | const char inifile[] = "LibOVRWrapper.ini"; 18 | 19 | boost::shared_ptr> sink = nullptr; 20 | 21 | if (std::ifstream(inifile)) { 22 | boost::property_tree::ptree pt; 23 | try { 24 | boost::property_tree::ini_parser::read_ini(inifile, pt); 25 | 26 | loglevel = pt.get("logging.loglevel", 0); 27 | if (loglevel > 0) { 28 | sink = logging::add_file_log( 29 | keywords::file_name = "LibOVRWrapper.log", 30 | keywords::auto_flush = true 31 | ); 32 | 33 | } 34 | 35 | } 36 | catch (boost::property_tree::ini_parser_error) { 37 | 38 | } 39 | } 40 | 41 | if (loglevel < 0) 42 | loglevel = 0; 43 | else if (loglevel > 3) 44 | loglevel = 3; 45 | 46 | switch (loglevel) { 47 | case 0: 48 | logging::core::get()->set_logging_enabled(false); 49 | break; 50 | case 1: 51 | logging::core::get()->set_filter 52 | ( 53 | logging::trivial::severity >= logging::trivial::warning 54 | ); 55 | break; 56 | case 2: 57 | logging::core::get()->set_filter 58 | ( 59 | logging::trivial::severity >= logging::trivial::info 60 | ); 61 | break; 62 | case 3: 63 | logging::core::get()->set_filter 64 | ( 65 | logging::trivial::severity >= logging::trivial::trace 66 | ); 67 | break; 68 | } 69 | 70 | BOOST_LOG_TRIVIAL(info) << "Initialized logging"; 71 | } 72 | break; 73 | case DLL_THREAD_ATTACH: 74 | case DLL_THREAD_DETACH: 75 | case DLL_PROCESS_DETACH: 76 | break; 77 | } 78 | return TRUE; 79 | } 80 | 81 | -------------------------------------------------------------------------------- /LibOVRWrapper0.5/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /LibOVRWrapper0.5/shimhelper.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include 3 | #include "d3d11.h" 4 | #include "shimhelper.h" 5 | 6 | #include "../LibOVR0.5/Include/OVR_CAPI_0_5_0.h" 7 | #include "../LibOVR0.5/Include/OVR_CAPI_D3D.h" 8 | 9 | extern "C" HRESULT wrapCreateShaderResourceView(ID3D11Device* device, ID3D11Resource* resource, ID3D11ShaderResourceView** srv) { 10 | return device->CreateShaderResourceView(resource, NULL, srv); 11 | } 12 | 13 | extern "C" void initChains() { 14 | } 15 | 16 | extern "C" void CopyTexture(ID3D11DeviceContext* device, ID3D11Texture2D* dest, ovrTexture* src) { 17 | union ovrD3D11Texture* ovrtext = (union ovrD3D11Texture*)src; 18 | 19 | /*ID3D11Device* pDevice; 20 | dest->GetDevice(&pDevice); 21 | ID3D11DeviceContext* pContext; 22 | pDevice->GetImmediateContext(&pContext); 23 | */ 24 | device->CopyResource(dest, ovrtext->D3D11.pTexture); 25 | 26 | //pDevice->Release(); 27 | //pContext->Release(); 28 | } 29 | 30 | extern "C" void GetContext(ID3D11Device* device, ID3D11DeviceContext** context) { 31 | device->GetImmediateContext(context); 32 | } -------------------------------------------------------------------------------- /LibOVRWrapper0.5/shimhelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "stdafx.h" 4 | #include "d3d11.h" 5 | 6 | #include "../LibOVR0.5/Include/OVR_CAPI_0_5_0.h" 7 | 8 | #ifdef __cplusplus 9 | #define EXTERNC extern "C" 10 | #else 11 | #define EXTERNC 12 | #endif 13 | 14 | typedef struct ovrTextureSwapChainWrapper_ 15 | { 16 | ovrTextureSwapChain1_3 swapChain; 17 | int textureCount; 18 | ID3D11Texture2D** textures; 19 | ID3D11DeviceContext* pContext; 20 | } ovrTextureSwapChainWrapper; 21 | 22 | EXTERNC HRESULT wrapCreateShaderResourceView(ID3D11Device* device, ID3D11Resource* resource, ID3D11ShaderResourceView** srv); 23 | EXTERNC void initChains(); 24 | EXTERNC void setMirror(ovrMirrorTexture1_3* mirror); 25 | EXTERNC ovrMirrorTexture1_3* getMirror(); 26 | EXTERNC ovrResult makeD3D11Texture(IUnknown* device, 27 | const D3D11_TEXTURE2D_DESC* desc, 28 | ID3D11Texture2D** outTexture); 29 | EXTERNC void GetContext(ID3D11Device* device, ID3D11DeviceContext** context); 30 | EXTERNC void CopyTexture(ID3D11DeviceContext* device, ID3D11Texture2D* dest, ovrTexture* src); 31 | 32 | ovrBool ConfigureD3D11(ovrSession1_3 session, const ovrRenderAPIConfig* apiConfig, unsigned int distortionCaps, 33 | const ovrFovPort eyeFovIn[2], ovrEyeRenderDesc eyeRenderDescOut[2]); 34 | 35 | void PresentD3D11(ovrSession1_3 session, const ovrPosef renderPose[2], const ovrTexture eyeTexture[2]); 36 | void ShutdownD3D11(); 37 | 38 | #undef EXTERNC -------------------------------------------------------------------------------- /LibOVRWrapper0.5/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // LibOVRWrapper.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /LibOVRWrapper0.5/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 19 | // Windows Header Files: 20 | #include 21 | 22 | #pragma warning(disable : 4503) 23 | 24 | // reference additional headers your program requires here 25 | #pragma warning(push) 26 | #pragma warning(disable : 4348) 27 | #pragma warning(disable : 4503) 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #pragma warning(pop) 38 | 39 | namespace logging = boost::log; 40 | namespace sinks = boost::log::sinks; 41 | namespace src = boost::log::sources; 42 | namespace expr = boost::log::expressions; 43 | namespace attrs = boost::log::attributes; 44 | namespace keywords = boost::log::keywords; 45 | 46 | 47 | #include "../LibOVR/Include/OVR_CAPI.h" 48 | #include "../LibOVR/Include/OVR_Version.h" 49 | #include "../LibOVR/Include/OVR_ErrorCode.h" 50 | 51 | #include "../LibOVR/Include/OVR_CAPI_D3D.h" 52 | #include "../LibOVR/Include/OVR_CAPI_GL.h" -------------------------------------------------------------------------------- /LibOVRWrapper0.5/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | #define WINVER 0x0601 10 | #define _WIN32_WINNT 0x0601 11 | 12 | #include 13 | -------------------------------------------------------------------------------- /LibOVRWrapper0.6/OVRShim.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "stdafx.h" 4 | 5 | #if !defined(OVR_DLL_BUILD) 6 | #define OVR_DLL_BUILD 7 | #endif 8 | 9 | #include "../LibOVR0.6/Include/OVR_CAPI_0_6_0.h" 10 | 11 | void copyPose(ovrPosef* dest, const ovrPosef1_3* source); 12 | void copyPoseState(ovrPoseStatef* dest, const ovrPoseStatef1_3* source); -------------------------------------------------------------------------------- /LibOVRWrapper0.6/OVRShim_GL.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #undef OVR_PUBLIC_FUNCTION 4 | #undef OVR_PUBLIC_CLASS 5 | #undef OVR_PRIVATE_FUNCTION 6 | #undef OVR_PRIVATE_CLASS 7 | 8 | #if !defined(OVR_DLL_BUILD) 9 | #define OVR_DLL_BUILD 10 | #endif 11 | 12 | #include "../LibOVR0.6/Include/OVR_CAPI_0_6_0.h" 13 | #include "../LibOVR0.6/Include/OVR_CAPI_GL.h" 14 | 15 | #include "shimhelper.h" 16 | 17 | OVR_PUBLIC_FUNCTION(ovrResult) ovrHmd_CreateSwapTextureSetGL(ovrHmd hmd, GLuint format, 18 | int width, int height, 19 | ovrSwapTextureSet** outTextureSet) { 20 | return -1; 21 | } 22 | 23 | OVR_PUBLIC_FUNCTION(ovrResult) ovrHmd_CreateMirrorTextureGL(ovrHmd hmd, GLuint format, 24 | int width, int height, 25 | ovrTexture** outMirrorTexture) { 26 | return -1; 27 | } -------------------------------------------------------------------------------- /LibOVRWrapper0.6/OVR_StereoProjection.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : OVR_StereoProjection.h 4 | Content : Stereo projection functions 5 | Created : November 30, 2013 6 | Authors : Tom Fosyth 7 | 8 | Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 9 | 10 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 11 | you may not use the Oculus VR Rift SDK except in compliance with the License, 12 | which is provided at the time of installation or download, or which 13 | otherwise accompanies this software in either electronic or hard copy form. 14 | 15 | You may obtain a copy of the License at 16 | 17 | http://www.oculusvr.com/licenses/LICENSE-3.2 18 | 19 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | *************************************************************************************/ 26 | 27 | #ifndef OVR_StereoProjection_h 28 | #define OVR_StereoProjection_h 29 | 30 | 31 | #include "Extras/OVR_Math.h" 32 | 33 | 34 | namespace OVR { 35 | 36 | 37 | //----------------------------------------------------------------------------------- 38 | // ***** Stereo Enumerations 39 | 40 | // StereoEye specifies which eye we are rendering for; it is used to 41 | // retrieve StereoEyeParams. 42 | enum StereoEye 43 | { 44 | StereoEye_Center, 45 | StereoEye_Left, 46 | StereoEye_Right 47 | }; 48 | 49 | 50 | 51 | //----------------------------------------------------------------------------------- 52 | // ***** Propjection functions 53 | 54 | Matrix4f CreateProjection ( bool rightHanded, bool isOpenGL, FovPort fov, StereoEye eye, 55 | float zNear = 0.01f, float zFar = 10000.0f, 56 | bool flipZ = false, bool farAtInfinity = false); 57 | 58 | Matrix4f CreateOrthoSubProjection ( bool rightHanded, StereoEye eyeType, 59 | float tanHalfFovX, float tanHalfFovY, 60 | float unitsX, float unitsY, float distanceFromCamera, 61 | float interpupillaryDistance, Matrix4f const &projection, 62 | float zNear = 0.0f, float zFar = 0.0f, 63 | bool flipZ = false, bool farAtInfinity = false); 64 | 65 | ScaleAndOffset2D CreateNDCScaleAndOffsetFromFov ( FovPort fov ); 66 | 67 | 68 | } //namespace OVR 69 | 70 | #endif // OVR_StereoProjection_h 71 | -------------------------------------------------------------------------------- /LibOVRWrapper0.6/WrapperSettings.cpp: -------------------------------------------------------------------------------- 1 | #include "WrapperSettings.h" 2 | 3 | 4 | 5 | WrapperSettings::WrapperSettings(): 6 | srgbCorrectionEnabled(true), 7 | loglevel(0) 8 | { 9 | } 10 | 11 | 12 | WrapperSettings::~WrapperSettings() 13 | { 14 | } 15 | -------------------------------------------------------------------------------- /LibOVRWrapper0.6/WrapperSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class WrapperSettings 3 | { 4 | public: 5 | bool srgbCorrectionEnabled; 6 | int loglevel; 7 | 8 | WrapperSettings(); 9 | ~WrapperSettings(); 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /LibOVRWrapper0.6/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Defines the entry point for the DLL application. 2 | #include "stdafx.h" 3 | 4 | #include "shimhelper.h" 5 | 6 | #include 7 | #include 8 | 9 | BOOL APIENTRY DllMain( HMODULE hModule, 10 | DWORD ul_reason_for_call, 11 | LPVOID lpReserved 12 | ) 13 | { 14 | switch (ul_reason_for_call) 15 | { 16 | case DLL_PROCESS_ATTACH: 17 | { 18 | const char inifile[] = "LibOVRWrapper.ini"; 19 | 20 | auto settings = new WrapperSettings(); 21 | 22 | boost::shared_ptr> sink = nullptr; 23 | 24 | if (std::ifstream(inifile)) { 25 | boost::property_tree::ptree pt; 26 | try { 27 | boost::property_tree::ini_parser::read_ini(inifile, pt); 28 | 29 | settings->loglevel = pt.get("logging.loglevel", 0); 30 | if (settings->loglevel > 0) { 31 | sink = logging::add_file_log( 32 | keywords::file_name = "LibOVRWrapper.log", 33 | keywords::auto_flush = true 34 | ); 35 | 36 | } 37 | settings->srgbCorrectionEnabled = pt.get("graphics.srgbCorrectionEnabled", true); 38 | 39 | } 40 | catch (boost::property_tree::ini_parser_error) { 41 | 42 | } 43 | } 44 | 45 | if (settings->loglevel < 0) 46 | settings->loglevel = 0; 47 | else if (settings->loglevel > 3) 48 | settings->loglevel = 3; 49 | 50 | switch (settings->loglevel) { 51 | case 0: 52 | logging::core::get()->set_logging_enabled(false); 53 | break; 54 | case 1: 55 | logging::core::get()->set_filter 56 | ( 57 | logging::trivial::severity >= logging::trivial::warning 58 | ); 59 | break; 60 | case 2: 61 | logging::core::get()->set_filter 62 | ( 63 | logging::trivial::severity >= logging::trivial::info 64 | ); 65 | break; 66 | case 3: 67 | logging::core::get()->set_filter 68 | ( 69 | logging::trivial::severity >= logging::trivial::trace 70 | ); 71 | break; 72 | } 73 | 74 | BOOST_LOG_TRIVIAL(info) << "Initialized logging"; 75 | 76 | setWrapperSettings(settings); 77 | } 78 | break; 79 | case DLL_THREAD_ATTACH: 80 | case DLL_THREAD_DETACH: 81 | case DLL_PROCESS_DETACH: 82 | break; 83 | } 84 | return TRUE; 85 | } 86 | 87 | -------------------------------------------------------------------------------- /LibOVRWrapper0.6/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /LibOVRWrapper0.6/shimhelper.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include 3 | #include "d3d11.h" 4 | #include "shimhelper.h" 5 | 6 | #include "../LibOVR0.6/Include/OVR_CAPI_0_6_0.h" 7 | #include "../LibOVR0.6/Include/OVR_CAPI_D3D.h" 8 | 9 | extern "C" HRESULT wrapCreateShaderResourceView(ID3D11Device* device, ID3D11Resource* resource, ID3D11ShaderResourceView** srv) { 10 | return device->CreateShaderResourceView(resource, NULL, srv); 11 | } 12 | 13 | std::unordered_map *swapchains; 14 | ovrMirrorTexture1_3* globalMirror; 15 | WrapperSettings* globalWrapperSettings; 16 | 17 | WrapperSettings* getWrapperSettings() { 18 | return globalWrapperSettings; 19 | } 20 | void setWrapperSettings(WrapperSettings* settings) { 21 | globalWrapperSettings = settings; 22 | } 23 | 24 | extern "C" void setMirror(ovrMirrorTexture1_3* mirror) { 25 | globalMirror = mirror; 26 | } 27 | 28 | extern "C" ovrMirrorTexture1_3* getMirror() { 29 | return globalMirror; 30 | } 31 | 32 | extern "C" void initChains() { 33 | swapchains = new std::unordered_map(); 34 | } 35 | 36 | extern "C" void removeChain(ovrSession1_3 session, ovrSwapTextureSet* ts) { 37 | swapchains->erase(ts); 38 | } 39 | 40 | extern "C" ovrTextureSwapChainWrapper* getChain(ovrSession1_3 session, ovrSwapTextureSet* ts) { 41 | return swapchains->find(ts)->second; //TODO 42 | } 43 | 44 | extern "C" void setChain(ovrSession1_3 session, ovrSwapTextureSet* ts, ovrTextureSwapChainWrapper* chain) { 45 | swapchains->emplace(ts, chain); 46 | } 47 | 48 | extern "C" ovrResult makeD3D11Texture(IUnknown* device, 49 | const D3D11_TEXTURE2D_DESC* desc, 50 | ID3D11Texture2D** outTexture) { 51 | 52 | ID3D11Device* pDevice; 53 | HRESULT hr; 54 | hr = device->QueryInterface(&pDevice); 55 | 56 | if (FAILED(hr)) 57 | return ovrError_ServiceError; 58 | 59 | hr = pDevice->CreateTexture2D(desc, NULL, outTexture); 60 | 61 | pDevice->Release(); 62 | 63 | if (FAILED(hr)) 64 | return ovrError_ServiceError; 65 | 66 | return ovrSuccess1_3; 67 | } 68 | 69 | extern "C" void CopyTexture(ID3D11DeviceContext* device, ID3D11Texture2D* dest, ovrTexture* src) { 70 | union ovrD3D11Texture* ovrtext = (union ovrD3D11Texture*)src; 71 | 72 | /*ID3D11Device* pDevice; 73 | dest->GetDevice(&pDevice); 74 | ID3D11DeviceContext* pContext; 75 | pDevice->GetImmediateContext(&pContext); 76 | */ 77 | device->CopyResource(dest, ovrtext->D3D11.pTexture); 78 | 79 | //pDevice->Release(); 80 | //pContext->Release(); 81 | } 82 | 83 | extern "C" void GetContext(ID3D11Device* device, ID3D11DeviceContext** context) { 84 | device->GetImmediateContext(context); 85 | } -------------------------------------------------------------------------------- /LibOVRWrapper0.6/shimhelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "stdafx.h" 4 | #include "d3d11.h" 5 | 6 | #include "../LibOVR0.6/Include/OVR_CAPI_0_6_0.h" 7 | 8 | #ifdef __cplusplus 9 | #define EXTERNC extern "C" 10 | #else 11 | #define EXTERNC 12 | #endif 13 | 14 | typedef struct ovrTextureSwapChainWrapper_ 15 | { 16 | ovrTextureSwapChain1_3 swapChain; 17 | int textureCount; 18 | ID3D11Texture2D** textures; 19 | ID3D11DeviceContext* pContext; 20 | } ovrTextureSwapChainWrapper; 21 | 22 | WrapperSettings* getWrapperSettings(); 23 | void setWrapperSettings(WrapperSettings* settings); 24 | 25 | EXTERNC HRESULT wrapCreateShaderResourceView(ID3D11Device* device, ID3D11Resource* resource, ID3D11ShaderResourceView** srv); 26 | EXTERNC ovrTextureSwapChainWrapper* getChain(ovrSession1_3 session, ovrSwapTextureSet* ts); 27 | EXTERNC void setChain(ovrSession1_3 session, ovrSwapTextureSet* ts, ovrTextureSwapChainWrapper* chain); 28 | EXTERNC void initChains(); 29 | EXTERNC void removeChain(ovrSession1_3 session, ovrSwapTextureSet* ts); 30 | EXTERNC void setMirror(ovrMirrorTexture1_3* mirror); 31 | EXTERNC ovrMirrorTexture1_3* getMirror(); 32 | EXTERNC ovrResult makeD3D11Texture(IUnknown* device, 33 | const D3D11_TEXTURE2D_DESC* desc, 34 | ID3D11Texture2D** outTexture); 35 | EXTERNC void GetContext(ID3D11Device* device, ID3D11DeviceContext** context); 36 | EXTERNC void CopyTexture(ID3D11DeviceContext* device, ID3D11Texture2D* dest, ovrTexture* src); 37 | 38 | #undef EXTERNC -------------------------------------------------------------------------------- /LibOVRWrapper0.6/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // LibOVRWrapper.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /LibOVRWrapper0.6/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 19 | // Windows Header Files: 20 | #include 21 | 22 | #pragma warning(disable : 4503) 23 | 24 | // reference additional headers your program requires here 25 | #pragma warning(push) 26 | #pragma warning(disable : 4348) 27 | #pragma warning(disable : 4503) 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #pragma warning(pop) 38 | 39 | namespace logging = boost::log; 40 | namespace sinks = boost::log::sinks; 41 | namespace src = boost::log::sources; 42 | namespace expr = boost::log::expressions; 43 | namespace attrs = boost::log::attributes; 44 | namespace keywords = boost::log::keywords; 45 | 46 | #include "WrapperSettings.h" 47 | 48 | #include "../LibOVR/Include/OVR_CAPI.h" 49 | #include "../LibOVR/Include/OVR_Version.h" 50 | #include "../LibOVR/Include/OVR_ErrorCode.h" 51 | 52 | #include "../LibOVR/Include/OVR_CAPI_D3D.h" 53 | #include "../LibOVR/Include/OVR_CAPI_GL.h" -------------------------------------------------------------------------------- /LibOVRWrapper0.6/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | #define WINVER 0x0601 10 | #define _WIN32_WINNT 0x0601 11 | 12 | #include 13 | -------------------------------------------------------------------------------- /LibOVRWrapper0.7/LibOVRWrapper.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | Source Files 40 | 41 | 42 | Source Files 43 | 44 | 45 | Source Files 46 | 47 | 48 | Source Files 49 | 50 | 51 | -------------------------------------------------------------------------------- /LibOVRWrapper0.7/OVRShim.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "stdafx.h" 4 | 5 | #if !defined(OVR_DLL_BUILD) 6 | #define OVR_DLL_BUILD 7 | #endif 8 | 9 | #include "../LibOVR0.7/Include/OVR_CAPI_0_7_0.h" 10 | 11 | void copyPose(ovrPosef* dest, const ovrPosef1_3* source); 12 | void copyPoseState(ovrPoseStatef* dest, const ovrPoseStatef1_3* source); -------------------------------------------------------------------------------- /LibOVRWrapper0.7/OVRShim_GL.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #undef OVR_PUBLIC_FUNCTION 4 | #undef OVR_PUBLIC_CLASS 5 | #undef OVR_PRIVATE_FUNCTION 6 | #undef OVR_PRIVATE_CLASS 7 | 8 | #if !defined(OVR_DLL_BUILD) 9 | #define OVR_DLL_BUILD 10 | #endif 11 | 12 | #include "../LibOVR0.7/Include/OVR_CAPI_0_7_0.h" 13 | #include "../LibOVR0.7/Include/OVR_CAPI_GL.h" 14 | 15 | #include "shimhelper.h" 16 | 17 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateSwapTextureSetGL(ovrHmd session, GLuint format, 18 | int width, int height, 19 | ovrSwapTextureSet** outTextureSet) { 20 | return -1; 21 | } 22 | 23 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureGL(ovrHmd session, GLuint format, 24 | int width, int height, 25 | ovrTexture** outMirrorTexture) { 26 | return -1; 27 | } -------------------------------------------------------------------------------- /LibOVRWrapper0.7/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Defines the entry point for the DLL application. 2 | #include "stdafx.h" 3 | 4 | BOOL APIENTRY DllMain( HMODULE hModule, 5 | DWORD ul_reason_for_call, 6 | LPVOID lpReserved 7 | ) 8 | { 9 | switch (ul_reason_for_call) 10 | { 11 | case DLL_PROCESS_ATTACH: 12 | case DLL_THREAD_ATTACH: 13 | case DLL_THREAD_DETACH: 14 | case DLL_PROCESS_DETACH: 15 | break; 16 | } 17 | return TRUE; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /LibOVRWrapper0.7/shimhelper.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include 3 | #include "d3d11.h" 4 | #include "shimhelper.h" 5 | 6 | #include "../LibOVR0.7/Include/OVR_CAPI_0_7_0.h" 7 | #include "../LibOVR0.7/Include/OVR_CAPI_D3D.h" 8 | 9 | extern "C" HRESULT wrapCreateShaderResourceView(ID3D11Device* device, ID3D11Resource* resource, ID3D11ShaderResourceView** srv) { 10 | return device->CreateShaderResourceView(resource, NULL, srv); 11 | } 12 | 13 | std::unordered_map *swapchains; 14 | ovrMirrorTexture1_3* globalMirror; 15 | 16 | extern "C" void setMirror(ovrMirrorTexture1_3* mirror) { 17 | globalMirror = mirror; 18 | } 19 | 20 | extern "C" ovrMirrorTexture1_3* getMirror() { 21 | return globalMirror; 22 | } 23 | 24 | extern "C" void initChains() { 25 | swapchains = new std::unordered_map(); 26 | } 27 | 28 | extern "C" void removeChain(ovrSession1_3 session, ovrSwapTextureSet* ts) { 29 | swapchains->erase(ts); 30 | } 31 | 32 | extern "C" ovrTextureSwapChainWrapper* getChain(ovrSession1_3 session, ovrSwapTextureSet* ts) { 33 | return swapchains->find(ts)->second; //TODO 34 | } 35 | 36 | extern "C" void setChain(ovrSession1_3 session, ovrSwapTextureSet* ts, ovrTextureSwapChainWrapper* chain) { 37 | swapchains->emplace(ts, chain); 38 | } 39 | 40 | extern "C" ovrResult makeD3D11Texture(IUnknown* device, 41 | const D3D11_TEXTURE2D_DESC* desc, 42 | ID3D11Texture2D** outTexture) { 43 | 44 | ID3D11Device* pDevice; 45 | HRESULT hr; 46 | hr = device->QueryInterface(&pDevice); 47 | 48 | if (FAILED(hr)) 49 | return ovrError_ServiceError; 50 | 51 | hr = pDevice->CreateTexture2D(desc, NULL, outTexture); 52 | 53 | pDevice->Release(); 54 | 55 | if (FAILED(hr)) 56 | return ovrError_ServiceError; 57 | 58 | return ovrSuccess1_3; 59 | } 60 | 61 | extern "C" void CopyTexture(ID3D11DeviceContext* device, ID3D11Texture2D* dest, ovrTexture* src) { 62 | union ovrD3D11Texture* ovrtext = (union ovrD3D11Texture*)src; 63 | 64 | /*ID3D11Device* pDevice; 65 | dest->GetDevice(&pDevice); 66 | ID3D11DeviceContext* pContext; 67 | pDevice->GetImmediateContext(&pContext); 68 | */ 69 | device->CopyResource(dest, ovrtext->D3D11.pTexture); 70 | 71 | //pDevice->Release(); 72 | //pContext->Release(); 73 | } 74 | 75 | extern "C" void GetContext(ID3D11Device* device, ID3D11DeviceContext** context) { 76 | device->GetImmediateContext(context); 77 | } -------------------------------------------------------------------------------- /LibOVRWrapper0.7/shimhelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "stdafx.h" 4 | #include "d3d11.h" 5 | 6 | #include "../LibOVR0.7/Include/OVR_CAPI_0_7_0.h" 7 | 8 | #ifdef __cplusplus 9 | #define EXTERNC extern "C" 10 | #else 11 | #define EXTERNC 12 | #endif 13 | 14 | typedef struct ovrTextureSwapChainWrapper_ 15 | { 16 | ovrTextureSwapChain1_3 swapChain; 17 | int textureCount; 18 | ID3D11Texture2D** textures; 19 | ID3D11DeviceContext* pContext; 20 | } ovrTextureSwapChainWrapper; 21 | 22 | EXTERNC HRESULT wrapCreateShaderResourceView(ID3D11Device* device, ID3D11Resource* resource, ID3D11ShaderResourceView** srv); 23 | EXTERNC ovrTextureSwapChainWrapper* getChain(ovrSession1_3 session, ovrSwapTextureSet* ts); 24 | EXTERNC void setChain(ovrSession1_3 session, ovrSwapTextureSet* ts, ovrTextureSwapChainWrapper* chain); 25 | EXTERNC void initChains(); 26 | EXTERNC void removeChain(ovrSession1_3 session, ovrSwapTextureSet* ts); 27 | EXTERNC void setMirror(ovrMirrorTexture1_3* mirror); 28 | EXTERNC ovrMirrorTexture1_3* getMirror(); 29 | EXTERNC ovrResult makeD3D11Texture(IUnknown* device, 30 | const D3D11_TEXTURE2D_DESC* desc, 31 | ID3D11Texture2D** outTexture); 32 | EXTERNC void GetContext(ID3D11Device* device, ID3D11DeviceContext** context); 33 | EXTERNC void CopyTexture(ID3D11DeviceContext* device, ID3D11Texture2D* dest, ovrTexture* src); 34 | 35 | #undef EXTERNC -------------------------------------------------------------------------------- /LibOVRWrapper0.7/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // LibOVRWrapper.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /LibOVRWrapper0.7/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 19 | // Windows Header Files: 20 | #include 21 | 22 | // reference additional headers your program requires here 23 | #include "../LibOVR/Include/OVR_CAPI.h" 24 | #include "../LibOVR/Include/OVR_Version.h" 25 | #include "../LibOVR/Include/OVR_ErrorCode.h" 26 | 27 | #include "../LibOVR/Include/OVR_CAPI_D3D.h" 28 | #include "../LibOVR/Include/OVR_CAPI_GL.h" -------------------------------------------------------------------------------- /LibOVRWrapper0.7/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | #define WINVER 0x0601 10 | #define _WIN32_WINNT 0x0601 11 | 12 | #include 13 | -------------------------------------------------------------------------------- /LibOVRWrapper0.8/LibOVRWrapper.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | Source Files 40 | 41 | 42 | Source Files 43 | 44 | 45 | Source Files 46 | 47 | 48 | Source Files 49 | 50 | 51 | -------------------------------------------------------------------------------- /LibOVRWrapper0.8/OVRShim.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "stdafx.h" 4 | 5 | #if !defined(OVR_DLL_BUILD) 6 | #define OVR_DLL_BUILD 7 | #endif 8 | 9 | #include "../LibOVR0.8/Include/OVR_CAPI_0_8_0.h" 10 | 11 | void copyPose(ovrPosef* dest, const ovrPosef1_3* source); 12 | void copyPoseState(ovrPoseStatef* dest, const ovrPoseStatef1_3* source); -------------------------------------------------------------------------------- /LibOVRWrapper0.8/OVRShim_GL.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #undef OVR_PUBLIC_FUNCTION 4 | #undef OVR_PUBLIC_CLASS 5 | #undef OVR_PRIVATE_FUNCTION 6 | #undef OVR_PRIVATE_CLASS 7 | 8 | #if !defined(OVR_DLL_BUILD) 9 | #define OVR_DLL_BUILD 10 | #endif 11 | 12 | #include "../LibOVR0.8/Include/OVR_CAPI_0_8_0.h" 13 | #include "../LibOVR0.8/Include/OVR_CAPI_GL.h" 14 | 15 | #include "shimhelper.h" 16 | 17 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateSwapTextureSetGL(ovrSession session, GLuint format, 18 | int width, int height, 19 | ovrSwapTextureSet** outTextureSet) { 20 | return -1; 21 | } 22 | 23 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureGL(ovrSession session, GLuint format, 24 | int width, int height, 25 | ovrTexture** outMirrorTexture) { 26 | return -1; 27 | } -------------------------------------------------------------------------------- /LibOVRWrapper0.8/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Defines the entry point for the DLL application. 2 | #include "stdafx.h" 3 | 4 | BOOL APIENTRY DllMain( HMODULE hModule, 5 | DWORD ul_reason_for_call, 6 | LPVOID lpReserved 7 | ) 8 | { 9 | switch (ul_reason_for_call) 10 | { 11 | case DLL_PROCESS_ATTACH: 12 | case DLL_THREAD_ATTACH: 13 | case DLL_THREAD_DETACH: 14 | case DLL_PROCESS_DETACH: 15 | break; 16 | } 17 | return TRUE; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /LibOVRWrapper0.8/shimhelper.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include 3 | #include "d3d11.h" 4 | #include "shimhelper.h" 5 | 6 | #include "../LibOVR0.8/Include/OVR_CAPI_0_8_0.h" 7 | #include "../LibOVR0.8/Include/OVR_CAPI_D3D.h" 8 | 9 | extern "C" HRESULT wrapCreateShaderResourceView(ID3D11Device* device, ID3D11Resource* resource, ID3D11ShaderResourceView** srv) { 10 | return device->CreateShaderResourceView(resource, NULL, srv); 11 | } 12 | 13 | std::unordered_map *swapchains; 14 | ovrMirrorTexture1_3* globalMirror; 15 | 16 | extern "C" void setMirror(ovrMirrorTexture1_3* mirror) { 17 | globalMirror = mirror; 18 | } 19 | 20 | extern "C" ovrMirrorTexture1_3* getMirror() { 21 | return globalMirror; 22 | } 23 | 24 | extern "C" void initChains() { 25 | swapchains = new std::unordered_map(); 26 | } 27 | 28 | extern "C" void removeChain(ovrSession1_3 session, ovrSwapTextureSet* ts) { 29 | swapchains->erase(ts); 30 | } 31 | 32 | extern "C" ovrTextureSwapChainWrapper* getChain(ovrSession1_3 session, ovrSwapTextureSet* ts) { 33 | return swapchains->find(ts)->second; //TODO 34 | } 35 | 36 | extern "C" void setChain(ovrSession1_3 session, ovrSwapTextureSet* ts, ovrTextureSwapChainWrapper* chain) { 37 | swapchains->emplace(ts, chain); 38 | } 39 | 40 | extern "C" ovrResult makeD3D11Texture(IUnknown* device, 41 | const D3D11_TEXTURE2D_DESC* desc, 42 | ID3D11Texture2D** outTexture) { 43 | 44 | ID3D11Device* pDevice; 45 | HRESULT hr; 46 | hr = device->QueryInterface(&pDevice); 47 | 48 | if (FAILED(hr)) 49 | return ovrError_RuntimeException; 50 | 51 | hr = pDevice->CreateTexture2D(desc, NULL, outTexture); 52 | 53 | pDevice->Release(); 54 | 55 | if (FAILED(hr)) 56 | return ovrError_RuntimeException; 57 | 58 | return ovrSuccess1_3; 59 | } 60 | 61 | extern "C" void CopyTexture(ID3D11DeviceContext* device, ID3D11Texture2D* dest, ovrTexture* src) { 62 | union ovrD3D11Texture* ovrtext = (union ovrD3D11Texture*)src; 63 | 64 | /*ID3D11Device* pDevice; 65 | dest->GetDevice(&pDevice); 66 | ID3D11DeviceContext* pContext; 67 | pDevice->GetImmediateContext(&pContext); 68 | */ 69 | device->CopyResource(dest, ovrtext->D3D11.pTexture); 70 | 71 | //pDevice->Release(); 72 | //pContext->Release(); 73 | } 74 | 75 | extern "C" void GetContext(ID3D11Device* device, ID3D11DeviceContext** context) { 76 | device->GetImmediateContext(context); 77 | } -------------------------------------------------------------------------------- /LibOVRWrapper0.8/shimhelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "stdafx.h" 4 | #include "d3d11.h" 5 | 6 | #include "../LibOVR0.8/Include/OVR_CAPI_0_8_0.h" 7 | 8 | #ifdef __cplusplus 9 | #define EXTERNC extern "C" 10 | #else 11 | #define EXTERNC 12 | #endif 13 | 14 | typedef struct ovrTextureSwapChainWrapper_ 15 | { 16 | ovrTextureSwapChain1_3 swapChain; 17 | int textureCount; 18 | ID3D11Texture2D** textures; 19 | ID3D11DeviceContext* pContext; 20 | } ovrTextureSwapChainWrapper; 21 | 22 | EXTERNC HRESULT wrapCreateShaderResourceView(ID3D11Device* device, ID3D11Resource* resource, ID3D11ShaderResourceView** srv); 23 | EXTERNC ovrTextureSwapChainWrapper* getChain(ovrSession1_3 session, ovrSwapTextureSet* ts); 24 | EXTERNC void setChain(ovrSession1_3 session, ovrSwapTextureSet* ts, ovrTextureSwapChainWrapper* chain); 25 | EXTERNC void initChains(); 26 | EXTERNC void removeChain(ovrSession1_3 session, ovrSwapTextureSet* ts); 27 | EXTERNC void setMirror(ovrMirrorTexture1_3* mirror); 28 | EXTERNC ovrMirrorTexture1_3* getMirror(); 29 | EXTERNC ovrResult makeD3D11Texture(IUnknown* device, 30 | const D3D11_TEXTURE2D_DESC* desc, 31 | ID3D11Texture2D** outTexture); 32 | EXTERNC void GetContext(ID3D11Device* device, ID3D11DeviceContext** context); 33 | EXTERNC void CopyTexture(ID3D11DeviceContext* device, ID3D11Texture2D* dest, ovrTexture* src); 34 | 35 | #undef EXTERNC -------------------------------------------------------------------------------- /LibOVRWrapper0.8/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // LibOVRWrapper.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /LibOVRWrapper0.8/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 19 | // Windows Header Files: 20 | #include 21 | 22 | // reference additional headers your program requires here 23 | #include "../LibOVR/Include/OVR_CAPI.h" 24 | #include "../LibOVR/Include/OVR_Version.h" 25 | #include "../LibOVR/Include/OVR_ErrorCode.h" 26 | 27 | #include "../LibOVR/Include/OVR_CAPI_D3D.h" 28 | #include "../LibOVR/Include/OVR_CAPI_GL.h" -------------------------------------------------------------------------------- /LibOVRWrapper0.8/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | #define WINVER 0x0601 10 | #define _WIN32_WINNT 0x0601 11 | 12 | #include 13 | -------------------------------------------------------------------------------- /OculusRoomTiny (DX11)0.6/Projects/Windows/OVRRootPath.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(ProjectDir)../../../../../../ 6 | 7 | 8 | 9 | 10 | 11 | $(OVRSDKROOT) 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /OculusRoomTiny (DX11)0.6/Projects/Windows/VS2013/OculusRoomTiny (DX11).vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /OculusRoomTiny (DX11)0.7/Projects/Windows/OVRRootPath.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(ProjectDir)../../../../../../ 6 | 7 | 8 | 9 | 10 | 11 | $(OVRSDKROOT) 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /OculusRoomTiny (DX11)0.7/Projects/Windows/VS2013/OculusRoomTiny (DX11)0.7.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /OculusRoomTiny (DX11)0.8/Projects/Windows/OVRRootPath.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | D:\ovr_sdk_win_0.8.0.0\OculusSDK 6 | 7 | 8 | 9 | 10 | 11 | $(OVRSDKROOT) 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /OculusRoomTiny (DX11)0.8/Projects/Windows/VS2013/OculusRoomTiny (DX11).vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /OculusRoomTiny (DX11)0.8/Projects/Windows/VS2015/OculusRoomTiny (DX11).vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /OculusRoomTiny (GL)0.6/Projects/Windows/OVRRootPath.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(ProjectDir)../../../../../../ 6 | 7 | 8 | 9 | 10 | 11 | $(OVRSDKROOT) 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /OculusRoomTiny (GL)0.6/Projects/Windows/VS2013/OculusRoomTiny (GL).vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /OculusRoomTiny (GL)0.7/Projects/Windows/OVRRootPath.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(ProjectDir)../../../../../../ 6 | 7 | 8 | 9 | 10 | 11 | $(OVRSDKROOT) 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /OculusRoomTiny (GL)0.7/Projects/Windows/VS2013/OculusRoomTiny (GL)0.7.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /OculusRoomTiny (GL)0.8/Projects/Windows/OVRRootPath.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(ProjectDir)../../../../../../ 6 | 7 | 8 | 9 | 10 | 11 | $(OVRSDKROOT) 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /OculusRoomTiny (GL)0.8/Projects/Windows/VS2013/OculusRoomTiny (GL).vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /OculusRoomTiny (GL)0.8/Projects/Windows/VS2015/OculusRoomTiny (GL).vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /OculusRoomTiny 0.5/Projects/Windows/OVRRootPath.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(ProjectDir)../../../../../ 6 | 7 | 8 | 9 | 10 | 11 | $(OVRSDKROOT) 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | LibOVRWrapper 3 | ============= 4 | 5 | This is a library that wraps calls from applications that user older Oculus VR SDK versions to a supported version (1.3). Currently 0.7 and 0.8 wrapping is supported but more versions will be added. 6 | 7 | Help is welcome. My c++ skills are rusty and I don't have time to support this very well. 8 | 9 | Tested to be working: 10 | 11 | * Most of the SDK samples 12 | * Surge 1.2.2 13 | 14 | *To developers:* Please do not just use this to bring 1.3 support to your program. Native 1.3 support is always better. 15 | 16 | Installation 17 | ------------ 18 | 19 | Extract to a folder. Copy the dll files to where the wanted application sees them. 20 | 21 | To install globally: 22 | 23 | Copy LibOVRRT32XXXX.dll to c:\windows\syswow64 24 | 25 | AND 26 | 27 | Copy LibOVRRT64XXXX.dll to c:\windows\system32 28 | 29 | Or run the install .bat file as administrator to do it for you. 30 | 31 | To-Do List, in decreasing priority 32 | ---------------------------------- 33 | 34 | * 0.5 support 35 | * OpenGL support 36 | 37 | Limitations 38 | ----------- 39 | 40 | * (Small) performance hit due to SDK changes that need workarounds 41 | * Probably no extended mode support ever 42 | * Highly likely no dx9 support ever 43 | * Smaller SDK details that are not possible anymore: 44 | * Maximum layer count is 16 instead of 32 45 | * Some layer types are not supported anymore 46 | 47 | Building 48 | -------- 49 | 50 | Open and build LibOVRWrapper.sln in Visual Studio 2015 51 | 52 | License 53 | ------- 54 | 55 | The Oculus VR SDK is licensed under the Oculus VR, LLC Software Development Kit License Agreement. See the latest version at https://developer.oculus.com/licenses/sdk-3.4/. 56 | -------------------------------------------------------------------------------- /install_RunAsAdministrator.bat: -------------------------------------------------------------------------------- 1 | @setlocal enableextensions 2 | @cd /d "%~dp0" 3 | 4 | copy /y LibOVRRT32*.dll %windir%\syswow64 5 | copy /y LibOVRRT64*.dll %windir%\system32 6 | 7 | pause --------------------------------------------------------------------------------