Add preliminary support for VR/OpenVR for HTC Vive and Oculus Rift,
(Windows-only first, later Linux and OSX) Use premake to build, use --enable_openvr flag
This commit is contained in:
@@ -59,6 +59,7 @@ end
|
||||
|
||||
|
||||
|
||||
|
||||
project "App_BasicExampleGuiWithSoftwareRenderer"
|
||||
|
||||
if _OPTIONS["ios"] then
|
||||
@@ -133,3 +134,62 @@ files {
|
||||
"../TinyRenderer/TinyRenderer.cpp",
|
||||
"../Utils/b3ResourcePath.cpp"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if _OPTIONS["enable_openvr"] then
|
||||
|
||||
project "App_BasicExampleVR"
|
||||
|
||||
if _OPTIONS["ios"] then
|
||||
kind "WindowedApp"
|
||||
else
|
||||
kind "ConsoleApp"
|
||||
end
|
||||
defines {"B3_USE_STANDALONE_EXAMPLE","BT_ENABLE_VR"}
|
||||
|
||||
|
||||
|
||||
includedirs {"../../src",
|
||||
"../ThirdPartyLibs/openvr/headers",
|
||||
"../ThirdPartyLibs/openvr/samples/shared"}
|
||||
|
||||
links {
|
||||
"BulletDynamics","BulletCollision", "LinearMath", "OpenGL_Window","Bullet3Common", "openvr_api"
|
||||
}
|
||||
|
||||
initOpenGL()
|
||||
initGlew()
|
||||
|
||||
|
||||
language "C++"
|
||||
|
||||
files {
|
||||
"BasicExample.cpp",
|
||||
"*.h",
|
||||
"../StandaloneMain/hellovr_opengl_main.cpp",
|
||||
"../ExampleBrowser/OpenGLGuiHelper.cpp",
|
||||
"../ExampleBrowser/GL_ShapeDrawer.cpp",
|
||||
"../ExampleBrowser/CollisionShape2TriangleMesh.cpp",
|
||||
"../ThirdPartyLibs/openvr/samples/shared/lodepng.cpp",
|
||||
"../ThirdPartyLibs/openvr/samples/shared/lodepng.h",
|
||||
"../ThirdPartyLibs/openvr/samples/shared/Matrices.cpp",
|
||||
"../ThirdPartyLibs/openvr/samples/shared/Matrices.h",
|
||||
"../ThirdPartyLibs/openvr/samples/shared/pathtools.cpp",
|
||||
"../ThirdPartyLibs/openvr/samples/shared/pathtools.h",
|
||||
"../ThirdPartyLibs/openvr/samples/shared/Vectors.h",
|
||||
|
||||
}
|
||||
|
||||
if os.is("Windows") then
|
||||
libdirs {"../ThirdPartyLibs/openvr/lib/win32"}
|
||||
end
|
||||
|
||||
if os.is("Linux") then initX11() end
|
||||
|
||||
if os.is("MacOSX") then
|
||||
links{"Cocoa.framework"}
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user