Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openvr #13

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
047c246
started work on openvr screen
GlynnJKW Apr 25, 2019
0a599e9
WORKING! need to fix glitchy menu though
GlynnJKW Apr 26, 2019
c3562a0
Fully working OpenVR!
GlynnJKW Apr 26, 2019
1f7e666
Added radial menu option (not optimized yet)
GlynnJKW Jun 19, 2019
65a5697
Tracker/Screen OpenVR update
GlynnJKW Aug 2, 2019
44d21f5
menu/screen updates
GlynnJKW Aug 19, 2019
f376055
Split stereo eye swap fix try 1
GlynnJKW Aug 21, 2019
00343b2
added some visual studio files to gitignore
GlynnJKW Aug 21, 2019
95cfd9d
untracked .vs files
GlynnJKW Aug 21, 2019
4b55297
config modifications
GlynnJKW Aug 28, 2019
072ad46
Added global 'UseFrameBuffer' option to have cameras render to a FBO …
GlynnJKW Sep 11, 2019
bfbb85e
added getHandTransform function to scenemanager, added getRootObject …
GlynnJKW Sep 20, 2019
76b80c0
merge
GlynnJKW Oct 1, 2019
2213695
Added icons to boardmenu buttons, updated cmake to use source groups
GlynnJKW Oct 1, 2019
e8350fa
Merge branch 'openvr' of https://github.com/CalVR/calvr into openvr
GlynnJKW Oct 1, 2019
33270f3
implemented NewUI MenuSystem
GlynnJKW Oct 5, 2019
c847e97
fixed slider bug, added checkbox and switch elements
GlynnJKW Oct 8, 2019
3d973b9
Added UIRadial
GlynnJKW Oct 9, 2019
99de33e
fixed triangleintersect problem by not allowing scale to be 0
GlynnJKW Oct 9, 2019
38996f0
linux fix #1
Oct 9, 2019
7ae6d28
cpp11
Oct 9, 2019
6514974
cpp11
Oct 9, 2019
2cce099
Linux fixes
Oct 9, 2019
137b22b
newUI updates
GlynnJKW Oct 18, 2019
9532114
Merge branch 'openvr' of https://github.com/CalVR/calvr into openvr
GlynnJKW Oct 18, 2019
027b90f
button/radial fix
GlynnJKW Oct 24, 2019
d570075
moved OpenVRDevice class into project to reduce external dependencies…
GlynnJKW Oct 31, 2019
efe62b3
typo
GlynnJKW Oct 31, 2019
ac48df5
Added default UI shaders (with texture + color mix)
GlynnJKW Nov 7, 2019
0d717c8
updated UIList and UIPopup
GlynnJKW Nov 8, 2019
0e24f92
movable menus (kinda)
GlynnJKW Nov 12, 2019
5506409
Rounded rectangles
GlynnJKW Nov 18, 2019
d885027
RenderModels part 1
GlynnJKW Nov 19, 2019
f2bdc30
OpenVR base rendermodels and slight SceneObject update
GlynnJKW Dec 11, 2019
0e97068
Added getRoot function to sceneobject
GlynnJKW Dec 12, 2019
4dcc6d2
small UISlider optimization
GlynnJKW Jan 30, 2020
514f832
rotation/pushing sceneobjects with valuator
GlynnJKW Feb 6, 2020
4dbbdf1
Merge branch 'openvr' of https://github.com/CalVR/calvr into openvr
GlynnJKW Feb 6, 2020
42d96d3
deleted glContext line
Feb 13, 2020
82c0870
Slider/Sceneobject semifix
GlynnJKW Mar 5, 2020
76477a0
Merge branch 'openvr' of https://github.com/CalVR/calvr into openvr
GlynnJKW Mar 5, 2020
2fc3893
setrotation fix
GlynnJKW Apr 21, 2020
05c2982
initial commit
g3aguirr Aug 4, 2020
8e3072f
small change
g3aguirr Sep 30, 2020
29f3136
few changes
g3aguirr Oct 5, 2020
97fec73
merge attempt
g3aguirr Oct 5, 2020
950a3ce
merge attempt 2
g3aguirr Oct 9, 2020
3bbdbce
small change
g3aguirr Dec 12, 2020
969bf53
small change
g3aguirr Dec 12, 2020
fc48a3f
few changes
g3aguirr Apr 1, 2021
60384f0
small changes init
g3aguirr Apr 1, 2021
61f91ca
build issue fix
g3aguirr Apr 10, 2021
b1ad7f8
Merging
g3aguirr Apr 10, 2021
c6865b7
merge fix
g3aguirr Apr 10, 2021
1e1714e
merge fix?
g3aguirr Apr 10, 2021
bbd9bbd
test
g3aguirr Apr 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ cmake_install.cmake
cmake_uninstall.cmake
install_manifest.txt
CMakeCache.txt
.vs
.vscode
*vcxproj*
*~
.*.swp
Expand All @@ -21,3 +23,5 @@ bin
.cproject
.settings
tags
/build
/config
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SET(CALVR_MINOR_VERSION 0)
SET(CALVR_VERSION ${CALVR_MAJOR_VERSION}.${CALVR_MINOR_VERSION})

INCLUDE_DIRECTORIES(${CalVR_SOURCE_DIR}/include)
INCLUDE_DIRECTORIES (SYSTEM /usr/lib/x86_64-redhat-linux6E/include/)

INSTALL(DIRECTORY "${CalVR_SOURCE_DIR}/include/cvrCollaborative" DESTINATION include)
INSTALL(DIRECTORY "${CalVR_SOURCE_DIR}/include/cvrConfig" DESTINATION include)
Expand All @@ -20,6 +21,9 @@ INSTALL(DIRECTORY "${CalVR_SOURCE_DIR}/resources" DESTINATION share/calvr)
INSTALL(DIRECTORY "${CalVR_SOURCE_DIR}/shaders" DESTINATION share/calvr)

SET(CMAKE_MODULE_PATH "${CalVR_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

OPTION(DYNAMIC_LINKING "Set to ON to build CalVR for dynamic linking. Use OFF for static." ON)
IF(DYNAMIC_LINKING)
Expand All @@ -42,8 +46,10 @@ INCLUDE(CVRMacros)

FIND_PACKAGE(Threads)
FIND_PACKAGE(MXML)
FIND_PACKAGE(OSG)
FIND_PACKAGE(Interleaver)
FIND_PACKAGE( OpenSceneGraph REQUIRED osgAnimation osgFX osgManipulator osgParticle osgPresentation osgShadow osgSim osgTerrain osgText osgViewer osgVolume osgWidget osgDB osgGA osgUtil)
SET(OSG_INCLUDE_DIR ${OPENSCENEGRAPH_INCLUDE_DIR})
SET(OSG_LIBRARIES ${OPENSCENEGRAPH_LIBRARIES})

INCLUDE_DIRECTORIES(${MXML_INCLUDE_DIR})

Expand Down
51 changes: 51 additions & 0 deletions CMakeModules/FindOSGOpenVR.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
IF (DEFINED ENV{OSGOPENVR_HOME})
SET(OSGOPENVR_HOME "$ENV{OSGOPENVR_HOME}")
ENDIF()
SET(OSGOPENVR_HOME
"${OSGOPENVR_HOME}"
CACHE
PATH
"Root directory to search for OsgOpenVRViewer")


FIND_PATH(OSGOPENVR_INCLUDE_DIR openvrdevice.h
PATHS
${OSGOPENVR_HOME}
NO_DEFAULT_PATH
PATH_SUFFIXES include Include
)

FIND_PATH(OSGOPENVR_INCLUDE_DIR openvrdevice.h
PATHS
/usr/local/include
/usr/include
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
)

FIND_LIBRARY(OSGOPENVR_LIBRARY
NAMES OsgOpenVR
PATHS ${OSGOPENVR_HOME}
NO_DEFAULT_PATH
PATH_SUFFIXES lib
)
FIND_LIBRARY(OSGOPENVR_LIBRARY
NAMES OsgOpenVR
PATHS
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
/usr/freeware
PATH_SUFFIXES lib
)

SET(OSGOPENVR_FOUND "NO")
IF(OSGOPENVR_LIBRARY AND OSGOPENVR_INCLUDE_DIR)
SET(OSGOPENVR_FOUND "YES")
ENDIF(OSGOPENVR_LIBRARY AND OSGOPENVR_INCLUDE_DIR)

102 changes: 102 additions & 0 deletions CMakeModules/FindOpenVR.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# - try to find the OpenVR SDK - currently designed for the version on GitHub.
#
# Cache Variables: (probably not for direct use in your scripts)
# OPENVR_INCLUDE_DIR
#
# Non-cache variables you might use in your CMakeLists.txt:
# OPENVR_FOUND
# OPENVR_INCLUDE_DIRS
# OPENVR_PLATFORM - something like Win32, Win64, etc.
#
# Requires these CMake modules:
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
#
# Original Author:
# 2015 Ryan A. Pavlik <[email protected]>
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

set(OPENVR_ROOT_DIR
"${OPENVR_ROOT_DIR}"
CACHE
PATH
"Directory to search for OpenVR SDK")

set(OPENVR_HEADERS_ROOT_DIR
"${OPENVR_HEADERS_ROOT_DIR}"
CACHE
PATH
"Directory to search for private OpenVR headers")

set(_root_dirs)
if(OPENVR_ROOT_DIR)
set(_root_dirs "${OPENVR_ROOT_DIR}" "${OPENVR_HEADERS_ROOT_DIR}" "${OPENVR_ROOT_DIR}/public")
endif()

# todo fails for universal builds
set(_dll_suffix)
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
set(_bitness 64)
if(WIN32)
set(_dll_suffix _x64)
endif()
else()
set(_bitness 32)
endif()

# Test platform

set(_platform)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(_platform_base osx)
# SteamVR only supports 32-bit on OS X
set(OPENVR_PLATFORM osx32)
else()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(_platform_base linux)
# TODO Massive hack!
add_definitions(-DGNUC -DPOSIX -DCOMPILER_GCC -D_LINUX -DLINUX -DPOSIX -D_POSIX)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(_platform_base win)
endif()
set(OPENVR_PLATFORM ${_platform_base}${_bitness})
set(_libpath lib/${OPENVR_PLATFORM})
endif()

find_path(OPENVR_INCLUDE_DIR
NAMES
openvr_driver.h
HINTS
"${_libdir}"
"${_libdir}/.."
"${_libdir}/../.."
PATHS
${_root_dirs}
PATH_SUFFIXES
headers
public/headers
steam
public/steam)

find_library(OPENVR_LIBRARY
NAMES
openvr_api
PATH_SUFFIXES
"lib/${OPENVR_PLATFORM}"
PATHS
${_root_dirs})
mark_as_advanced(OPENVR_LIBRARY)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OpenVR
DEFAULT_MSG
OPENVR_INCLUDE_DIR)

if(OPENVR_FOUND)
list(APPEND OPENVR_INCLUDE_DIRS ${OPENVR_INCLUDE_DIR})
mark_as_advanced(OPENVR_ROOT_DIR)
endif()

mark_as_advanced(OPENVR_INCLUDE_DIR)
Loading