|
@@ -10,17 +10,28 @@
|
|
|
|
|
|
|
|
#if BGFX_CONFIG_USE_OVR
|
|
#if BGFX_CONFIG_USE_OVR
|
|
|
|
|
|
|
|
-# include <OVR.h>
|
|
|
|
|
|
|
+# include <OVR_Version.h>
|
|
|
|
|
|
|
|
# define OVR_VERSION_(_a, _b, _c) (_a * 10000 + _b * 100 + _c)
|
|
# define OVR_VERSION_(_a, _b, _c) (_a * 10000 + _b * 100 + _c)
|
|
|
# define OVR_VERSION OVR_VERSION_(OVR_MAJOR_VERSION, OVR_MINOR_VERSION, OVR_BUILD_VERSION)
|
|
# define OVR_VERSION OVR_VERSION_(OVR_MAJOR_VERSION, OVR_MINOR_VERSION, OVR_BUILD_VERSION)
|
|
|
# define OVR_VERSION_042 OVR_VERSION_(0, 4, 2)
|
|
# define OVR_VERSION_042 OVR_VERSION_(0, 4, 2)
|
|
|
# define OVR_VERSION_043 OVR_VERSION_(0, 4, 3)
|
|
# define OVR_VERSION_043 OVR_VERSION_(0, 4, 3)
|
|
|
# define OVR_VERSION_044 OVR_VERSION_(0, 4, 4)
|
|
# define OVR_VERSION_044 OVR_VERSION_(0, 4, 4)
|
|
|
|
|
+# define OVR_VERSION_050 OVR_VERSION_(0, 5, 0)
|
|
|
|
|
+
|
|
|
|
|
+# if OVR_VERSION < OVR_VERSION_050
|
|
|
|
|
+# include <OVR.h>
|
|
|
|
|
+# else
|
|
|
|
|
+# include <OVR_CAPI.h>
|
|
|
|
|
+# endif
|
|
|
|
|
|
|
|
# if BGFX_CONFIG_RENDERER_DIRECT3D9
|
|
# if BGFX_CONFIG_RENDERER_DIRECT3D9
|
|
|
# define OVR_D3D_VERSION 9
|
|
# define OVR_D3D_VERSION 9
|
|
|
-# include <OVR_D3D.h>
|
|
|
|
|
|
|
+# if OVR_VERSION < OVR_VERSION_050
|
|
|
|
|
+# include <OVR_D3D.h>
|
|
|
|
|
+# else
|
|
|
|
|
+# include <OVR_CAPI_D3D.h>
|
|
|
|
|
+# endif
|
|
|
# endif // BGFX_CONFIG_RENDERER_DIRECT3D9
|
|
# endif // BGFX_CONFIG_RENDERER_DIRECT3D9
|
|
|
|
|
|
|
|
# if BGFX_CONFIG_RENDERER_DIRECT3D11
|
|
# if BGFX_CONFIG_RENDERER_DIRECT3D11
|
|
@@ -29,11 +40,19 @@
|
|
|
# undef OVR_D3D_VERSION
|
|
# undef OVR_D3D_VERSION
|
|
|
# endif // OVR_CAPI_D3D_h
|
|
# endif // OVR_CAPI_D3D_h
|
|
|
# define OVR_D3D_VERSION 11
|
|
# define OVR_D3D_VERSION 11
|
|
|
-# include <OVR_D3D.h>
|
|
|
|
|
|
|
+# if OVR_VERSION < OVR_VERSION_050
|
|
|
|
|
+# include <OVR_D3D.h>
|
|
|
|
|
+# else
|
|
|
|
|
+# include <OVR_CAPI_D3D.h>
|
|
|
|
|
+# endif
|
|
|
# endif // BGFX_CONFIG_RENDERER_DIRECT3D11
|
|
# endif // BGFX_CONFIG_RENDERER_DIRECT3D11
|
|
|
|
|
|
|
|
# if BGFX_CONFIG_RENDERER_OPENGL
|
|
# if BGFX_CONFIG_RENDERER_OPENGL
|
|
|
-# include <OVR_GL.h>
|
|
|
|
|
|
|
+# if OVR_VERSION < OVR_VERSION_050
|
|
|
|
|
+# include <OVR_GL.h>
|
|
|
|
|
+# else
|
|
|
|
|
+# include <OVR_CAPI_GL.h>
|
|
|
|
|
+# endif
|
|
|
# endif // BGFX_CONFIG_RENDERER_OPENGL
|
|
# endif // BGFX_CONFIG_RENDERER_OPENGL
|
|
|
|
|
|
|
|
namespace bgfx
|
|
namespace bgfx
|