mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 15:33:14 +02:00
Make OpenVR windows only for now
This commit is contained in:
parent
6d8adbf2b5
commit
ba9bd6b9b5
2 changed files with 11 additions and 9 deletions
|
@ -21,10 +21,12 @@ add_dependency_external_projects(glm)
|
|||
find_package(GLM REQUIRED)
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
|
||||
|
||||
add_dependency_external_projects(OpenVR)
|
||||
find_package(OpenVR REQUIRED)
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${OPENVR_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${OPENVR_LIBRARIES})
|
||||
if (WIN32)
|
||||
add_dependency_external_projects(OpenVR)
|
||||
find_package(OpenVR REQUIRED)
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${OPENVR_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${OPENVR_LIBRARIES})
|
||||
endif()
|
||||
|
||||
#add_dependency_external_projects(Sixense)
|
||||
#find_package(Sixense REQUIRED)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <plugins/PluginContainer.h>
|
||||
#include "UserActivityLogger.h"
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
#ifdef Q_OS_WIN
|
||||
extern vr::IVRSystem* _hmd;
|
||||
extern int hmdRefCount;
|
||||
extern vr::TrackedDevicePose_t _trackedDevicePose[vr::k_unMaxTrackedDeviceCount];
|
||||
|
@ -64,7 +64,7 @@ ViveControllerManager::ViveControllerManager() :
|
|||
}
|
||||
|
||||
bool ViveControllerManager::isSupported() const {
|
||||
#ifndef Q_OS_MAC
|
||||
#ifdef Q_OS_WIN
|
||||
return vr::VR_IsHmdPresent();
|
||||
#else
|
||||
return false;
|
||||
|
@ -72,7 +72,7 @@ bool ViveControllerManager::isSupported() const {
|
|||
}
|
||||
|
||||
void ViveControllerManager::activate(PluginContainer* container) {
|
||||
#ifndef Q_OS_MAC
|
||||
#ifdef Q_OS_WIN
|
||||
container->addMenu(MENU_PATH);
|
||||
container->addMenuItem(MENU_PATH, RENDER_CONTROLLERS,
|
||||
[this] (bool clicked) { this->setRenderControllers(clicked); },
|
||||
|
@ -136,7 +136,7 @@ void ViveControllerManager::activate(PluginContainer* container) {
|
|||
}
|
||||
|
||||
void ViveControllerManager::deactivate(PluginContainer* container) {
|
||||
#ifndef Q_OS_MAC
|
||||
#ifdef Q_OS_WIN
|
||||
container->removeMenuItem(MENU_NAME, RENDER_CONTROLLERS);
|
||||
container->removeMenu(MENU_PATH);
|
||||
|
||||
|
@ -213,7 +213,7 @@ void ViveControllerManager::renderHand(UserInputMapper::PoseValue pose, gpu::Bat
|
|||
}
|
||||
|
||||
void ViveControllerManager::update(float deltaTime, bool jointsCaptured) {
|
||||
#ifndef Q_OS_MAC
|
||||
#ifdef Q_OS_WIN
|
||||
_poseStateMap.clear();
|
||||
|
||||
// TODO: This shouldn't be necessary
|
||||
|
|
Loading…
Reference in a new issue