Merge pull request #153 from OpenVR-Advanced-Settings/brightness
Brightness Feature
@@ -23,6 +23,7 @@
|
||||
> * [Motion Page](#motion_page)
|
||||
> * [Space Fix Page](#space_fix_page)
|
||||
> * [Audio Page](#audio_page)
|
||||
> * [Video Page](#video_page)
|
||||
> * [Utilities Page](#utilities_page)
|
||||
> * [Desktop Overlay Page](#desktop_overlay_page)
|
||||
> * [Statistics Page](#statistics_page)
|
||||
@@ -317,6 +318,15 @@ Allows users to temporarily move and rotate the center of the playspace. This al
|
||||
- **NOTE**: The Push-to-talk box must be enabled for this feature to work.
|
||||
- **Audio Profile**: Allows you to apply/define/delete audio profiles that save playback devices, mute state, and volume.
|
||||
|
||||
<a name="video_page"></a>
|
||||
## - Video Page:
|
||||
|
||||

|
||||
|
||||
- **Brightness**: Allows Dimming of your view.
|
||||
- **On/Off**: Toggles The Dimming on/off.
|
||||
- **Brightness**: The amount of dimming.
|
||||
- **Note**: Does not necessarily reduce light output of HMD will vary based on panel type etc.
|
||||
|
||||
<a name="utilities_page"></a>
|
||||
## - Utilities Page:
|
||||
|
||||
@@ -39,6 +39,8 @@ DISTFILES += \
|
||||
src/res/qml/audio_page/proximity/* \
|
||||
src/res/qml/audio_page/push_to_talk/* \
|
||||
src/res/qml/audio_page/profiles/* \
|
||||
src/res/qml/video_page/* \
|
||||
src/res/qml/video_page/brightness/* \
|
||||
src/res/qml/common/* \
|
||||
src/res/qml/desktop_overlay_page/* \
|
||||
src/res/qml/desktop_overlay_page/translation_left_right/SteamDesktopTranslationLeftRight.qml \
|
||||
|
||||
@@ -10,6 +10,7 @@ SOURCES += src/main.cpp\
|
||||
src/tabcontrollers/ReviveTabController.cpp \
|
||||
src/tabcontrollers/UtilitiesTabController.cpp \
|
||||
src/tabcontrollers/PttController.cpp \
|
||||
src/tabcontrollers/VideoTabController.cpp \
|
||||
src/utils/ChaperoneUtils.cpp \
|
||||
src/tabcontrollers/audiomanager/AudioManagerDummy.cpp \
|
||||
src/openvr/openvr_init.cpp \
|
||||
@@ -28,6 +29,7 @@ HEADERS += src/overlaycontroller.h \
|
||||
src/tabcontrollers/SteamVRTabController.h \
|
||||
src/tabcontrollers/ReviveTabController.h \
|
||||
src/tabcontrollers/UtilitiesTabController.h \
|
||||
src/tabcontrollers/VideoTabController.h \
|
||||
src/tabcontrollers/AudioManager.h \
|
||||
src/tabcontrollers/PttController.h \
|
||||
src/tabcontrollers/keyboardinput/KeyboardInput.h \
|
||||
|
||||
@@ -11,7 +11,7 @@ import distutils.dir_util
|
||||
#Const globals
|
||||
#Version string must be bumped every release.
|
||||
#TODO: See developer documentation.
|
||||
VERSION_STRING = "3-0-1"
|
||||
VERSION_STRING = "3-1-0-RC1"
|
||||
|
||||
EXIT_CODE_SUCCESS = 0
|
||||
EXIT_CODE_FAILURE_BUILD_APP = 1
|
||||
|
||||
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 17 KiB |
@@ -11,7 +11,7 @@
|
||||
!define THIRDDIR "..\third-party"
|
||||
!define PACKAGEDIR "..\src\package_files"
|
||||
!define PROJECTDIR "..\"
|
||||
!define VERSION_STRING "3-0-1"
|
||||
!define VERSION_STRING "3-1-0-RC1"
|
||||
|
||||
|
||||
;Installer icon
|
||||
|
||||
@@ -123,6 +123,7 @@ OverlayController::OverlayController( bool desktopMode,
|
||||
m_reviveTabController.initStage1(
|
||||
m_settingsTabController.forceRevivePage() );
|
||||
m_utilitiesTabController.initStage1();
|
||||
m_videoTabController.initStage1();
|
||||
|
||||
// init action handles
|
||||
|
||||
@@ -252,6 +253,16 @@ OverlayController::OverlayController( bool desktopMode,
|
||||
QQmlEngine::setObjectOwnership( obj, QQmlEngine::CppOwnership );
|
||||
return obj;
|
||||
} );
|
||||
qmlRegisterSingletonType<SteamVRTabController>(
|
||||
qmlSingletonImportName,
|
||||
1,
|
||||
0,
|
||||
"VideoTabController",
|
||||
[]( QQmlEngine*, QJSEngine* ) {
|
||||
QObject* obj = &( objectAddress->m_videoTabController );
|
||||
QQmlEngine::setObjectOwnership( obj, QQmlEngine::CppOwnership );
|
||||
return obj;
|
||||
} );
|
||||
qmlRegisterSingletonType<overlay::DesktopOverlay>(
|
||||
qmlSingletonImportName,
|
||||
1,
|
||||
@@ -416,6 +427,7 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
|
||||
m_settingsTabController.initStage2( this, m_pWindow.get() );
|
||||
m_reviveTabController.initStage2( this, m_pWindow.get() );
|
||||
m_utilitiesTabController.initStage2( this, m_pWindow.get() );
|
||||
m_videoTabController.initStage2( this, m_pWindow.get() );
|
||||
}
|
||||
|
||||
void OverlayController::OnRenderRequest()
|
||||
@@ -834,6 +846,7 @@ void OverlayController::mainEventLoop()
|
||||
m_settingsTabController.eventLoopTick();
|
||||
m_reviveTabController.eventLoopTick();
|
||||
m_audioTabController.eventLoopTick();
|
||||
// TODO do I need loop for vide?
|
||||
|
||||
if ( m_ulOverlayThumbnailHandle != vr::k_ulOverlayHandleInvalid )
|
||||
{
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "tabcontrollers/SettingsTabController.h"
|
||||
#include "tabcontrollers/ReviveTabController.h"
|
||||
#include "tabcontrollers/UtilitiesTabController.h"
|
||||
#include "tabcontrollers/VideoTabController.h"
|
||||
|
||||
#include "openvr/ivrinput.h"
|
||||
#include "openvr/overlay_utils.h"
|
||||
@@ -47,7 +48,7 @@ constexpr auto applicationOrganizationName = "AdvancedSettings-Team";
|
||||
constexpr auto applicationName = "OpenVRAdvancedSettings";
|
||||
constexpr const char* applicationKey = "OVRAS-Team.AdvancedSettings";
|
||||
constexpr const char* applicationDisplayName = "Advanced Settings";
|
||||
constexpr const char* applicationVersionString = "v3.0.1";
|
||||
constexpr const char* applicationVersionString = "v3.1.0 RC1";
|
||||
} // namespace application_strings
|
||||
|
||||
// application namespace
|
||||
@@ -122,6 +123,7 @@ public: // I know it's an ugly hack to make them public to enable external
|
||||
SettingsTabController m_settingsTabController;
|
||||
ReviveTabController m_reviveTabController;
|
||||
UtilitiesTabController m_utilitiesTabController;
|
||||
VideoTabController m_videoTabController;
|
||||
overlay::DesktopOverlay m_desktopOverlay;
|
||||
|
||||
private:
|
||||
|
||||
|
After Width: | Height: | Size: 12 KiB |
@@ -6,6 +6,7 @@ import "." // QTBUG-34418, singletons require explicit import to load qmldir fil
|
||||
import "common"
|
||||
import "utilities_page"
|
||||
import "audio_page"
|
||||
import "video_page"
|
||||
|
||||
MyStackViewPage {
|
||||
id: rootPage
|
||||
@@ -24,7 +25,7 @@ MyStackViewPage {
|
||||
Layout.preferredWidth: 250
|
||||
Layout.maximumWidth: 250
|
||||
Layout.fillHeight: true
|
||||
spacing: 18
|
||||
spacing: 10
|
||||
MyPushButton {
|
||||
id: steamVRButton
|
||||
activationSoundEnabled: false
|
||||
@@ -91,6 +92,17 @@ MyStackViewPage {
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: videoButton
|
||||
activationSoundEnabled: false
|
||||
text: "Video"
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
mainView.push(videoPage)
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: reviveButton
|
||||
activationSoundEnabled: false
|
||||
|
||||
@@ -5,6 +5,7 @@ import ".."
|
||||
import "../utilities_page"
|
||||
import "../audio_page"
|
||||
import "../motion_page"
|
||||
import "../video_page"
|
||||
import "../desktop_overlay_page"
|
||||
|
||||
Rectangle {
|
||||
@@ -72,6 +73,11 @@ Rectangle {
|
||||
visible: false
|
||||
}
|
||||
|
||||
property VideoPage videoPage: VideoPage {
|
||||
stackView: mainView
|
||||
visible:false
|
||||
}
|
||||
|
||||
property DesktopOverlayPage desktopOverlayPage: DesktopOverlayPage {
|
||||
stackView: mainView
|
||||
visible: false
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings 1.0
|
||||
import "../common"
|
||||
import "brightness"
|
||||
|
||||
MyStackViewPage {
|
||||
width: 1200
|
||||
headerText: "Video Settings"
|
||||
|
||||
content: ColumnLayout {
|
||||
spacing: 18
|
||||
|
||||
BrightnessGroupBox { }
|
||||
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings 1.0
|
||||
import "../../common"
|
||||
|
||||
GroupBox {
|
||||
id: brightnessGroupBox
|
||||
Layout.fillWidth: true
|
||||
|
||||
label: MyText {
|
||||
leftPadding: 10
|
||||
text: "Brightness"
|
||||
bottomPadding: -10
|
||||
}
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
border.color: "#ffffff"
|
||||
radius: 8
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
color: "#ffffff"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: 5
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
MyToggleButton {
|
||||
id: brightnessToggle
|
||||
text: "Toggle On/Off"
|
||||
onCheckedChanged: {
|
||||
VideoTabController.setBrightnessEnabled(this.checked, false) }
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: 150
|
||||
}
|
||||
|
||||
MyText {
|
||||
text: "Brightness:"
|
||||
horizontalAlignment: Text.AlignRight
|
||||
Layout.rightMargin: 10
|
||||
}
|
||||
|
||||
MySlider {
|
||||
id: brightnessSlider
|
||||
from: 0.01
|
||||
to: 1.0
|
||||
stepSize: 0.01
|
||||
value: 1.0
|
||||
Layout.fillWidth: true
|
||||
onPositionChanged: {
|
||||
var val = (this.position * 100)
|
||||
brightnessValueText.text = Math.round(val) + "%"
|
||||
}
|
||||
onValueChanged: {
|
||||
|
||||
VideoTabController.setBrightnessValue(value.toFixed(2), false)
|
||||
}
|
||||
}
|
||||
|
||||
MyTextField {
|
||||
id: brightnessValueText
|
||||
text: "100%"
|
||||
keyBoardUID: 301
|
||||
Layout.preferredWidth: 100
|
||||
Layout.leftMargin: 10
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
function onInputEvent(input) {
|
||||
var val = parseFloat(input)
|
||||
if (!isNaN(val)) {
|
||||
if (val < 5) {
|
||||
val = 5
|
||||
} else if (val > 100.0) {
|
||||
val = 100.0
|
||||
}
|
||||
var v = (val/100).toFixed(2)
|
||||
brightnessSlider.value = v
|
||||
}
|
||||
text = Math.round(VideoTabController.brightnessValue * 100) + "%"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
brightnessSlider.value = VideoTabController.brightnessValue
|
||||
brightnessToggle.checked = VideoTabController.brightnessEnabled
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: VideoTabController
|
||||
|
||||
onBrightnessValueChanged: {
|
||||
brightnessSlider.value = VideoTabController.brightnessValue
|
||||
}
|
||||
onBrightnessEnabledChanged: {
|
||||
brightnessToggle.checked = VideoTabController.brightnessEnabled
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
#include "VideoTabController.h"
|
||||
#include <QQuickWindow>
|
||||
#include <QApplication>
|
||||
#include "../overlaycontroller.h"
|
||||
#include <cmath>
|
||||
|
||||
namespace advsettings
|
||||
{
|
||||
void VideoTabController::initStage1() {}
|
||||
|
||||
void VideoTabController::initStage2( OverlayController* var_parent,
|
||||
QQuickWindow* var_widget )
|
||||
{
|
||||
this->parent = var_parent;
|
||||
this->widget = var_widget;
|
||||
|
||||
std::string notifKey = std::string( application_strings::applicationKey )
|
||||
+ ".dimnotification";
|
||||
|
||||
vr::VROverlayError overlayError = vr::VROverlay()->CreateOverlay(
|
||||
notifKey.c_str(), notifKey.c_str(), &m_brightnessOverlayHandle );
|
||||
if ( overlayError == vr::VROverlayError_None )
|
||||
{
|
||||
const auto notifIconPath = paths::binaryDirectoryFindFile(
|
||||
video_keys::k_brightnessOverlayFilename );
|
||||
if ( notifIconPath.has_value() )
|
||||
{
|
||||
vr::VROverlay()->SetOverlayFromFile( m_brightnessOverlayHandle,
|
||||
notifIconPath->c_str() );
|
||||
vr::VROverlay()->SetOverlayWidthInMeters( m_brightnessOverlayHandle,
|
||||
k_overlayWidth );
|
||||
vr::HmdMatrix34_t notificationTransform
|
||||
= { { { 1.0f, 0.0f, 0.0f, 0.00f },
|
||||
{ 0.0f, 1.0f, 0.0f, 0.00f },
|
||||
{ 0.0f, 0.0f, 1.0f, k_hmdDistance } } };
|
||||
vr::VROverlay()->SetOverlayTransformTrackedDeviceRelative(
|
||||
m_brightnessOverlayHandle,
|
||||
vr::k_unTrackedDeviceIndex_Hmd,
|
||||
¬ificationTransform );
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG( ERROR ) << "Could not find notification icon \""
|
||||
<< video_keys::k_brightnessOverlayFilename << "\"";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG( ERROR ) << "Could not create dimmer notification overlay: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum(
|
||||
overlayError );
|
||||
}
|
||||
|
||||
reloadVideoConfig();
|
||||
}
|
||||
|
||||
void VideoTabController::eventLoopTick() {}
|
||||
|
||||
void VideoTabController::reloadVideoConfig()
|
||||
{
|
||||
auto settings = OverlayController::appSettings();
|
||||
settings->beginGroup( getSettingsName() );
|
||||
setBrightnessEnabled(
|
||||
settings->value( "brightnessEnabled", false ).toBool(), true );
|
||||
m_opacityValue = settings->value( "opacityValue", 0.0f ).toFloat();
|
||||
m_brightnessValue = settings->value( "brightnessValue", 1.0f ).toFloat();
|
||||
settings->endGroup();
|
||||
setOpacityValue();
|
||||
}
|
||||
|
||||
void VideoTabController::saveVideoConfig()
|
||||
{
|
||||
auto settings = OverlayController::appSettings();
|
||||
settings->beginGroup( getSettingsName() );
|
||||
settings->setValue( "brightnessEnabled", brightnessEnabled() );
|
||||
settings->setValue( "opacityValue", opacityValue() );
|
||||
settings->setValue( "brightnessValue", brightnessValue() );
|
||||
settings->endGroup();
|
||||
}
|
||||
|
||||
float VideoTabController::opacityValue() const
|
||||
{
|
||||
return m_opacityValue;
|
||||
}
|
||||
|
||||
float VideoTabController::brightnessValue() const
|
||||
{
|
||||
return m_brightnessValue;
|
||||
}
|
||||
|
||||
bool VideoTabController::brightnessEnabled() const
|
||||
{
|
||||
return m_brightnessEnabled;
|
||||
}
|
||||
|
||||
void VideoTabController::setBrightnessEnabled( bool value, bool notify )
|
||||
{
|
||||
if ( value != m_brightnessEnabled )
|
||||
{
|
||||
m_brightnessEnabled = value;
|
||||
auto overlayHandle = getBrightnessOverlayHandle();
|
||||
if ( value )
|
||||
{
|
||||
if ( overlayHandle != vr::k_ulOverlayHandleInvalid )
|
||||
{
|
||||
vr::VROverlay()->ShowOverlay( getBrightnessOverlayHandle() );
|
||||
LOG( INFO ) << "Brightness Overlay toggled on";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( overlayHandle != vr::k_ulOverlayHandleInvalid )
|
||||
{
|
||||
vr::VROverlay()->HideOverlay( getBrightnessOverlayHandle() );
|
||||
LOG( INFO ) << "Brightness Overlay toggled off";
|
||||
}
|
||||
}
|
||||
saveVideoConfig();
|
||||
if ( notify )
|
||||
{
|
||||
emit brightnessEnabledChanged( value );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void VideoTabController::setBrightnessValue( float percvalue, bool notify )
|
||||
{
|
||||
// This takes the Perceived value, and converts it to allow more accurate
|
||||
// linear positioning. (human perception logarithmic)
|
||||
float realvalue = static_cast<float>(
|
||||
std::pow( static_cast<double>( 1.0f - percvalue ), 1 / 3. ) );
|
||||
|
||||
if ( realvalue != m_opacityValue )
|
||||
{
|
||||
m_brightnessValue = percvalue;
|
||||
if ( realvalue <= 1.0f && realvalue >= 0.0f )
|
||||
{
|
||||
m_opacityValue = realvalue;
|
||||
vr::VROverlayError overlayError = vr::VROverlay()->SetOverlayAlpha(
|
||||
m_brightnessOverlayHandle, realvalue );
|
||||
if ( overlayError != vr::VROverlayError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Could not set alpha: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum(
|
||||
overlayError );
|
||||
}
|
||||
// only saves if opacity Value is valid. [1-0]
|
||||
saveVideoConfig();
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG( WARNING ) << "alpha value is invalid setting to 1.0";
|
||||
m_opacityValue = 0.0f;
|
||||
}
|
||||
|
||||
if ( notify )
|
||||
{
|
||||
emit brightnessValueChanged( percvalue );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void VideoTabController::setOpacityValue()
|
||||
{
|
||||
vr::VROverlayError overlayError = vr::VROverlay()->SetOverlayAlpha(
|
||||
m_brightnessOverlayHandle, m_opacityValue );
|
||||
if ( overlayError != vr::VROverlayError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Could not set alpha: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum(
|
||||
overlayError );
|
||||
}
|
||||
emit brightnessValueChanged( m_brightnessValue );
|
||||
}
|
||||
} // namespace advsettings
|
||||
@@ -0,0 +1,76 @@
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <openvr.h>
|
||||
|
||||
class QQuickWindow;
|
||||
|
||||
namespace video_keys
|
||||
{
|
||||
constexpr auto k_brightnessOverlayFilename = "/res/img/video/dimmer.png";
|
||||
|
||||
} // namespace video_keys
|
||||
|
||||
namespace advsettings
|
||||
{
|
||||
// forward declaration
|
||||
class OverlayController;
|
||||
|
||||
class VideoTabController : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY( bool brightnessEnabled READ brightnessEnabled WRITE
|
||||
setBrightnessEnabled NOTIFY brightnessEnabledChanged )
|
||||
Q_PROPERTY( float brightnessValue READ brightnessValue WRITE
|
||||
setBrightnessValue NOTIFY brightnessValueChanged )
|
||||
|
||||
private:
|
||||
// how far away the overlay is, any OVERLAY closer will not be dimmed.
|
||||
const float k_hmdDistance = -0.15f;
|
||||
// how wide overlay is, Increase this value if edges of view are not dimmed.
|
||||
const float k_overlayWidth = 1.0f;
|
||||
OverlayController* parent;
|
||||
QQuickWindow* widget;
|
||||
|
||||
vr::VROverlayHandle_t m_brightnessOverlayHandle
|
||||
= vr::k_ulOverlayHandleInvalid;
|
||||
float m_opacityValue = 0.0f;
|
||||
float m_brightnessValue = 1.0f;
|
||||
bool m_brightnessEnabled = false;
|
||||
|
||||
void reloadVideoConfig();
|
||||
void saveVideoConfig();
|
||||
void setOpacityValue();
|
||||
|
||||
QString getSettingsName()
|
||||
{
|
||||
return "videoSettings";
|
||||
}
|
||||
|
||||
vr::VROverlayHandle_t getBrightnessOverlayHandle()
|
||||
{
|
||||
return m_brightnessOverlayHandle;
|
||||
}
|
||||
|
||||
public:
|
||||
float opacityValue() const;
|
||||
// inverse of brightnessValue
|
||||
float brightnessValue() const;
|
||||
bool brightnessEnabled() const;
|
||||
|
||||
void initStage1();
|
||||
void initStage2( OverlayController* var_parent, QQuickWindow* var_widget );
|
||||
void eventLoopTick();
|
||||
|
||||
public slots:
|
||||
void setBrightnessEnabled( bool value, bool notify = true );
|
||||
void setBrightnessValue( float percvalue, bool notify = true );
|
||||
|
||||
signals:
|
||||
void brightnessEnabledChanged( bool value );
|
||||
void brightnessValueChanged( float value );
|
||||
};
|
||||
|
||||
} // namespace advsettings
|
||||
@@ -1,13 +1,70 @@
|
||||
OpenVR SDK
|
||||
# OpenVR Samples: CMake build guide.
|
||||
|
||||
## Support
|
||||
|
||||
| Configuration | 32 | 64 |
|
||||
| ----------------------- |:---------:|----------:|
|
||||
| GNU/Linux (gcc 4.8+) | OK | OK |
|
||||
| Windows (msvc 12) | OK | OK |
|
||||
| OSX (clang) | ~ | ~ |
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
* Qt 5.x
|
||||
* GLEW 1.11+
|
||||
* SDL2
|
||||
* OpenVR
|
||||
|
||||
The only general external dependency is Qt5.<br/>
|
||||
On GNU/Linux, you will need GLEW 1.11 (available on most package manager).<br/>
|
||||
On Windows x64, you will need the SDL2 runtime library.
|
||||
|
||||
## Build
|
||||
|
||||
**Important:**<br/>
|
||||
*you might need to specify Qt5 cmake module path manually when generating the cache for the first time using the __CMAKE_PREFIX_PATH__ macro (see examples below).*
|
||||
|
||||
We will use the command-line on Unix and [Git Bash](https://git-for-windows.github.io/) on Windows.
|
||||
|
||||
First, move from the repository root to the samples directory to create a build directory:
|
||||
```
|
||||
cd samples
|
||||
mkdir build; cd build
|
||||
```
|
||||
|
||||
Then, depending on your system:
|
||||
|
||||
### Unix
|
||||
|
||||
Generate the CMake cache using Makefile:
|
||||
```
|
||||
cmake .. -G Makefile -DCMAKE_PREFIX_PATH=/opt/Qt/5.6/gcc_64/lib/cmake -DCMAKE_BUILD_TYPE=Release
|
||||
```
|
||||
|
||||
To build type:
|
||||
```
|
||||
make -j4
|
||||
```
|
||||
|
||||
|
||||
### Windows
|
||||
|
||||
Generate the CMake cache using MSVC 12 for x64:
|
||||
```
|
||||
cmake .. -G "Visual Studio 12 2013 Win64" -DCMAKE_PREFIX_PATH=C:/Qt/5.6/msvc2013_64/lib/cmake
|
||||
```
|
||||
|
||||
Alternatively, you can force the compilation on x86 architectures by using the **PLATFORM** property (*be sure to use the right generator and Qt binaries*):
|
||||
```
|
||||
cmake .. -G "Visual Studio 12 2013" -DCMAKE_PREFIX_PATH=C:/Qt/5.6/msvc2013/lib/cmake -DPLATFORM=32
|
||||
```
|
||||
|
||||
To build, simply type:
|
||||
```
|
||||
cmake --build . --target all --config Release
|
||||
```
|
||||
|
||||
*Note : using CMake, the build configuration type (ie. Debug, Release) is set at Build Time with MSVC and at Cache Generation Time with Makefile.*
|
||||
|
||||
---
|
||||
|
||||
OpenVR is an API and runtime that allows access to VR hardware from multiple
|
||||
vendors without requiring that applications have specific knowledge of the
|
||||
hardware they are targeting. This repository is an SDK that contains the API
|
||||
and samples. The runtime is under SteamVR in Tools on Steam.
|
||||
|
||||
### Documentation
|
||||
|
||||
Documentation for the API is available on the [Github Wiki](https://github.com/ValveSoftware/openvr/wiki/API-Documentation)
|
||||
|
||||
More information on OpenVR and SteamVR can be found on http://steamvr.com
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
namespace vr
|
||||
{
|
||||
static const uint32_t k_nSteamVRVersionMajor = 1;
|
||||
static const uint32_t k_nSteamVRVersionMinor = 2;
|
||||
static const uint32_t k_nSteamVRVersionBuild = 10;
|
||||
static const uint32_t k_nSteamVRVersionMinor = 3;
|
||||
static const uint32_t k_nSteamVRVersionBuild = 20;
|
||||
} // namespace vr
|
||||
|
||||
// vrtypes.h
|
||||
@@ -352,6 +352,8 @@ enum ETrackedDeviceProperty
|
||||
Prop_AdditionalDeviceSettingsPath_String = 1042, // driver-relative path to additional device and global configuration settings
|
||||
Prop_Identifiable_Bool = 1043, // Whether device supports being identified from vrmonitor (e.g. blink LED, vibrate haptics, etc)
|
||||
Prop_BootloaderVersion_Uint64 = 1044,
|
||||
Prop_AdditionalSystemReportData_String = 1045, // additional string to include in system reports about a tracked device
|
||||
Prop_CompositeFirmwareVersion_String = 1046, // additional FW components from a device that gets propagated into reports
|
||||
|
||||
// Properties that are unique to TrackedDeviceClass_HMD
|
||||
Prop_ReportsTimeSinceVSync_Bool = 2000,
|
||||
@@ -457,6 +459,8 @@ enum ETrackedDeviceProperty
|
||||
Prop_TrackingRangeMinimumMeters_Float = 4004,
|
||||
Prop_TrackingRangeMaximumMeters_Float = 4005,
|
||||
Prop_ModeLabel_String = 4006,
|
||||
Prop_CanWirelessIdentify_Bool = 4007, // volatile, based on radio presence and fw discovery
|
||||
Prop_Nonce_Int32 = 4008,
|
||||
|
||||
// Properties that are used for user interface like icons names
|
||||
Prop_IconPathName_String = 5000, // DEPRECATED. Value not referenced. Now expected to be part of icon path properties.
|
||||
@@ -688,7 +692,7 @@ enum EVREventType
|
||||
VREvent_OverlayHidden = 501,
|
||||
VREvent_DashboardActivated = 502,
|
||||
VREvent_DashboardDeactivated = 503,
|
||||
VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay
|
||||
//VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay - No longer sent
|
||||
VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay
|
||||
VREvent_ResetDashboard = 506, // Send to the overlay manager
|
||||
VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID
|
||||
@@ -716,6 +720,7 @@ enum EVREventType
|
||||
VREvent_RoomViewShown = 526, // Sent by compositor whenever room-view is enabled
|
||||
VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled
|
||||
VREvent_ShowUI = 528, // data is showUi
|
||||
VREvent_ShowDevTools = 529, // data is showDevTools
|
||||
|
||||
VREvent_Notification_Shown = 600,
|
||||
VREvent_Notification_Hidden = 601,
|
||||
@@ -727,6 +732,7 @@ enum EVREventType
|
||||
VREvent_QuitAborted_UserPrompt = 702, // data is process
|
||||
VREvent_QuitAcknowledged = 703, // data is process
|
||||
VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down
|
||||
VREvent_RestartRequested = 705, // A driver or other component wants the user to restart SteamVR
|
||||
|
||||
VREvent_ChaperoneDataHasChanged = 800, // Sent when the process needs to call VRChaperone()->ReloadInfo()
|
||||
VREvent_ChaperoneUniverseHasChanged = 801,
|
||||
@@ -783,6 +789,11 @@ enum EVREventType
|
||||
VREvent_Compositor_MirrorWindowHidden = 1401,
|
||||
VREvent_Compositor_ChaperoneBoundsShown = 1410,
|
||||
VREvent_Compositor_ChaperoneBoundsHidden = 1411,
|
||||
VREvent_Compositor_DisplayDisconnected = 1412,
|
||||
VREvent_Compositor_DisplayReconnected = 1413,
|
||||
VREvent_Compositor_HDCPError = 1414, // data is hdcpError
|
||||
VREvent_Compositor_ApplicationNotResponding = 1415,
|
||||
VREvent_Compositor_ApplicationResumed = 1416,
|
||||
|
||||
VREvent_TrackedCamera_StartVideoStream = 1500,
|
||||
VREvent_TrackedCamera_StopVideoStream = 1501,
|
||||
@@ -811,6 +822,8 @@ enum EVREventType
|
||||
VREvent_SpatialAnchors_RequestPoseUpdate = 1802, // data is spatialAnchor. sent to specific driver
|
||||
VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, // data is spatialAnchor. sent to specific driver
|
||||
|
||||
VREvent_SystemReport_Started = 1900, // user or system initiated generation of a system report. broadcast
|
||||
|
||||
// Vendors are free to expose private events in this reserved region
|
||||
VREvent_VendorSpecific_Reserved_Start = 10000,
|
||||
VREvent_VendorSpecific_Reserved_End = 19999,
|
||||
@@ -890,11 +903,12 @@ struct VREvent_Mouse_t
|
||||
uint32_t button; // EVRMouseButton enum
|
||||
};
|
||||
|
||||
/** used for simulated mouse wheel scroll in overlay space */
|
||||
/** used for simulated mouse wheel scroll */
|
||||
struct VREvent_Scroll_t
|
||||
{
|
||||
float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe
|
||||
uint32_t repeatCount;
|
||||
float xdelta, ydelta;
|
||||
uint32_t unused;
|
||||
float viewportscale; // For scrolling on an overlay with laser mouse, this is the overlay's vertical size relative to the overlay height. Range: [0,1]
|
||||
};
|
||||
|
||||
/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger
|
||||
@@ -1087,6 +1101,7 @@ enum EShowUIType
|
||||
ShowUI_ManageTrackers = 1,
|
||||
ShowUI_QuickStart = 2,
|
||||
ShowUI_Pairing = 3,
|
||||
ShowUI_Settings = 4,
|
||||
};
|
||||
|
||||
struct VREvent_ShowUI_t
|
||||
@@ -1094,6 +1109,25 @@ struct VREvent_ShowUI_t
|
||||
EShowUIType eType;
|
||||
};
|
||||
|
||||
struct VREvent_ShowDevTools_t
|
||||
{
|
||||
int32_t nBrowserIdentifier;
|
||||
};
|
||||
|
||||
enum EHDCPError
|
||||
{
|
||||
HDCPError_None = 0,
|
||||
HDCPError_LinkLost = 1,
|
||||
HDCPError_Tampered = 2,
|
||||
HDCPError_DeviceRevoked = 3,
|
||||
HDCPError_Unknown = 4
|
||||
};
|
||||
|
||||
struct VREvent_HDCPError_t
|
||||
{
|
||||
EHDCPError eCode;
|
||||
};
|
||||
|
||||
typedef union
|
||||
{
|
||||
VREvent_Reserved_t reserved;
|
||||
@@ -1124,6 +1158,8 @@ typedef union
|
||||
VREvent_SpatialAnchor_t spatialAnchor;
|
||||
VREvent_ProgressUpdate_t progressUpdate;
|
||||
VREvent_ShowUI_t showUi;
|
||||
VREvent_ShowDevTools_t showDevTools;
|
||||
VREvent_HDCPError_t hdcpError;
|
||||
/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
|
||||
} VREvent_Data_t;
|
||||
|
||||
@@ -1384,7 +1420,7 @@ enum EVRSkeletalMotionRange
|
||||
|
||||
enum EVRSkeletalTrackingLevel
|
||||
{
|
||||
// body part location can’t be directly determined by the device. Any skeletal pose provided by
|
||||
// body part location can't be directly determined by the device. Any skeletal pose provided by
|
||||
// the device is estimated by assuming the position required to active buttons, triggers, joysticks,
|
||||
// or other input sensors.
|
||||
// E.g. Vive Controller, Gamepad
|
||||
@@ -1468,6 +1504,7 @@ enum EVRInitError
|
||||
VRInitError_Init_USBServiceBusy = 140,
|
||||
VRInitError_Init_VRWebHelperStartupFailed = 141,
|
||||
VRInitError_Init_TrackerManagerInitFailed = 142,
|
||||
VRInitError_Init_AlreadyRunning = 143,
|
||||
|
||||
VRInitError_Driver_Failed = 200,
|
||||
VRInitError_Driver_Unknown = 201,
|
||||
@@ -1597,6 +1634,9 @@ enum EVRInitError
|
||||
VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113,
|
||||
|
||||
VRInitError_Steam_SteamInstallationNotFound = 2000,
|
||||
|
||||
// Strictly a placeholder
|
||||
VRInitError_LastError
|
||||
};
|
||||
|
||||
enum EVRScreenshotType
|
||||
@@ -1732,29 +1772,33 @@ struct ImuSample_t
|
||||
// figure out how to import from the VR API dll
|
||||
#if defined(_WIN32)
|
||||
|
||||
#ifdef VR_API_EXPORT
|
||||
#define VR_INTERFACE extern "C" __declspec( dllexport )
|
||||
#else
|
||||
#define VR_INTERFACE extern "C" __declspec( dllimport )
|
||||
#endif
|
||||
#if !defined(OPENVR_BUILD_STATIC)
|
||||
#ifdef VR_API_EXPORT
|
||||
#define VR_INTERFACE extern "C" __declspec( dllexport )
|
||||
#else
|
||||
#define VR_INTERFACE extern "C" __declspec( dllimport )
|
||||
#endif
|
||||
#else
|
||||
#define VR_INTERFACE extern "C"
|
||||
#endif
|
||||
|
||||
#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__)
|
||||
|
||||
#ifdef VR_API_EXPORT
|
||||
#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
|
||||
#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
|
||||
#else
|
||||
#define VR_INTERFACE extern "C"
|
||||
#define VR_INTERFACE extern "C"
|
||||
#endif
|
||||
|
||||
#else
|
||||
#error "Unsupported Platform."
|
||||
#error "Unsupported Platform."
|
||||
#endif
|
||||
|
||||
|
||||
#if defined( _WIN32 )
|
||||
#define VR_CALLTYPE __cdecl
|
||||
#define VR_CALLTYPE __cdecl
|
||||
#else
|
||||
#define VR_CALLTYPE
|
||||
#define VR_CALLTYPE
|
||||
#endif
|
||||
|
||||
} // namespace vr
|
||||
@@ -2508,6 +2552,7 @@ namespace vr
|
||||
static const char * const k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations";
|
||||
static const char * const k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2";
|
||||
static const char * const k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback";
|
||||
static const char * const k_pch_Lighthouse_NewPairing_Bool = "newPairing";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// null keys
|
||||
@@ -2609,9 +2654,10 @@ namespace vr
|
||||
static const char * const k_pch_Dashboard_Section = "dashboard";
|
||||
static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
|
||||
static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
|
||||
static const char * const k_pch_Dashboard_EnableWebUI = "webUI";
|
||||
static const char * const k_pch_Dashboard_EnableWebUIDevTools = "webUIDevTools";
|
||||
static const char * const k_pch_Dashboard_EnableWebUIDashboardReplacement = "webUIDashboard";
|
||||
static const char * const k_pch_Dashboard_UseWebDashboard = "useWebDashboard";
|
||||
static const char * const k_pch_Dashboard_UseWebSettings = "useWebSettings";
|
||||
static const char * const k_pch_Dashboard_UseWebIPD = "useWebIPD";
|
||||
static const char * const k_pch_Dashboard_UseWebPowerMenu = "useWebPowerMenu";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// model skin keys
|
||||
@@ -3178,7 +3224,7 @@ struct NotificationBitmap_t
|
||||
, m_nHeight( 0 )
|
||||
, m_nBytesPerPixel( 0 )
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
void *m_pImageData;
|
||||
int32_t m_nWidth;
|
||||
@@ -4463,6 +4509,9 @@ namespace vr
|
||||
|
||||
/** Shows the current binding all the actions in the specified action sets */
|
||||
virtual EVRInputError ShowBindingsForActionSet( VR_ARRAY_COUNT( unSetCount ) VRActiveActionSet_t *pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight ) = 0;
|
||||
|
||||
// --------------- Legacy Input ------------------- //
|
||||
virtual bool IsUsingLegacyInput() = 0;
|
||||
};
|
||||
|
||||
static const char * const IVRInput_Version = "IVRInput_005";
|
||||
|
||||
@@ -1660,6 +1660,11 @@ public struct IVRInput
|
||||
[MarshalAs(UnmanagedType.FunctionPtr)]
|
||||
internal _ShowBindingsForActionSet ShowBindingsForActionSet;
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
|
||||
internal delegate bool _IsUsingLegacyInput();
|
||||
[MarshalAs(UnmanagedType.FunctionPtr)]
|
||||
internal _IsUsingLegacyInput IsUsingLegacyInput;
|
||||
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
@@ -3589,6 +3594,11 @@ public class CVRInput
|
||||
EVRInputError result = FnTable.ShowBindingsForActionSet(pSets,unSizeOfVRSelectedActionSet_t,(uint) pSets.Length,originToHighlight);
|
||||
return result;
|
||||
}
|
||||
public bool IsUsingLegacyInput()
|
||||
{
|
||||
bool result = FnTable.IsUsingLegacyInput();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3803,6 +3813,8 @@ public enum ETrackedDeviceProperty
|
||||
Prop_AdditionalDeviceSettingsPath_String = 1042,
|
||||
Prop_Identifiable_Bool = 1043,
|
||||
Prop_BootloaderVersion_Uint64 = 1044,
|
||||
Prop_AdditionalSystemReportData_String = 1045,
|
||||
Prop_CompositeFirmwareVersion_String = 1046,
|
||||
Prop_ReportsTimeSinceVSync_Bool = 2000,
|
||||
Prop_SecondsFromVsyncToPhotons_Float = 2001,
|
||||
Prop_DisplayFrequency_Float = 2002,
|
||||
@@ -3899,6 +3911,8 @@ public enum ETrackedDeviceProperty
|
||||
Prop_TrackingRangeMinimumMeters_Float = 4004,
|
||||
Prop_TrackingRangeMaximumMeters_Float = 4005,
|
||||
Prop_ModeLabel_String = 4006,
|
||||
Prop_CanWirelessIdentify_Bool = 4007,
|
||||
Prop_Nonce_Int32 = 4008,
|
||||
Prop_IconPathName_String = 5000,
|
||||
Prop_NamedIconPathDeviceOff_String = 5001,
|
||||
Prop_NamedIconPathDeviceSearching_String = 5002,
|
||||
@@ -4021,7 +4035,6 @@ public enum EVREventType
|
||||
VREvent_OverlayHidden = 501,
|
||||
VREvent_DashboardActivated = 502,
|
||||
VREvent_DashboardDeactivated = 503,
|
||||
VREvent_DashboardThumbSelected = 504,
|
||||
VREvent_DashboardRequested = 505,
|
||||
VREvent_ResetDashboard = 506,
|
||||
VREvent_RenderToast = 507,
|
||||
@@ -4044,6 +4057,7 @@ public enum EVREventType
|
||||
VREvent_RoomViewShown = 526,
|
||||
VREvent_RoomViewHidden = 527,
|
||||
VREvent_ShowUI = 528,
|
||||
VREvent_ShowDevTools = 529,
|
||||
VREvent_Notification_Shown = 600,
|
||||
VREvent_Notification_Hidden = 601,
|
||||
VREvent_Notification_BeginInteraction = 602,
|
||||
@@ -4053,6 +4067,7 @@ public enum EVREventType
|
||||
VREvent_QuitAborted_UserPrompt = 702,
|
||||
VREvent_QuitAcknowledged = 703,
|
||||
VREvent_DriverRequestedQuit = 704,
|
||||
VREvent_RestartRequested = 705,
|
||||
VREvent_ChaperoneDataHasChanged = 800,
|
||||
VREvent_ChaperoneUniverseHasChanged = 801,
|
||||
VREvent_ChaperoneTempDataHasChanged = 802,
|
||||
@@ -4099,6 +4114,11 @@ public enum EVREventType
|
||||
VREvent_Compositor_MirrorWindowHidden = 1401,
|
||||
VREvent_Compositor_ChaperoneBoundsShown = 1410,
|
||||
VREvent_Compositor_ChaperoneBoundsHidden = 1411,
|
||||
VREvent_Compositor_DisplayDisconnected = 1412,
|
||||
VREvent_Compositor_DisplayReconnected = 1413,
|
||||
VREvent_Compositor_HDCPError = 1414,
|
||||
VREvent_Compositor_ApplicationNotResponding = 1415,
|
||||
VREvent_Compositor_ApplicationResumed = 1416,
|
||||
VREvent_TrackedCamera_StartVideoStream = 1500,
|
||||
VREvent_TrackedCamera_StopVideoStream = 1501,
|
||||
VREvent_TrackedCamera_PauseVideoStream = 1502,
|
||||
@@ -4121,6 +4141,7 @@ public enum EVREventType
|
||||
VREvent_SpatialAnchors_DescriptorUpdated = 1801,
|
||||
VREvent_SpatialAnchors_RequestPoseUpdate = 1802,
|
||||
VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803,
|
||||
VREvent_SystemReport_Started = 1900,
|
||||
VREvent_VendorSpecific_Reserved_Start = 10000,
|
||||
VREvent_VendorSpecific_Reserved_End = 19999,
|
||||
}
|
||||
@@ -4173,6 +4194,15 @@ public enum EShowUIType
|
||||
ShowUI_ManageTrackers = 1,
|
||||
ShowUI_QuickStart = 2,
|
||||
ShowUI_Pairing = 3,
|
||||
ShowUI_Settings = 4,
|
||||
}
|
||||
public enum EHDCPError
|
||||
{
|
||||
None = 0,
|
||||
LinkLost = 1,
|
||||
Tampered = 2,
|
||||
DeviceRevoked = 3,
|
||||
Unknown = 4,
|
||||
}
|
||||
public enum EVRInputError
|
||||
{
|
||||
@@ -4354,6 +4384,7 @@ public enum EVRInitError
|
||||
Init_USBServiceBusy = 140,
|
||||
Init_VRWebHelperStartupFailed = 141,
|
||||
Init_TrackerManagerInitFailed = 142,
|
||||
Init_AlreadyRunning = 143,
|
||||
Driver_Failed = 200,
|
||||
Driver_Unknown = 201,
|
||||
Driver_HmdUnknown = 202,
|
||||
@@ -4476,6 +4507,7 @@ public enum EVRInitError
|
||||
VendorSpecific_HmdFound_UserDataError = 1112,
|
||||
VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113,
|
||||
Steam_SteamInstallationNotFound = 2000,
|
||||
LastError = 2001,
|
||||
}
|
||||
public enum EVRScreenshotType
|
||||
{
|
||||
@@ -4857,6 +4889,8 @@ public enum EIOBufferMode
|
||||
[FieldOffset(0)] public VREvent_InputActionManifestLoad_t actionManifest;
|
||||
[FieldOffset(0)] public VREvent_ProgressUpdate_t progressUpdate;
|
||||
[FieldOffset(0)] public VREvent_ShowUI_t showUi;
|
||||
[FieldOffset(0)] public VREvent_ShowDevTools_t showDevTools;
|
||||
[FieldOffset(0)] public VREvent_HDCPError_t hdcpError;
|
||||
[FieldOffset(0)] public VREvent_Keyboard_t keyboard; // This has to be at the end due to a mono bug
|
||||
}
|
||||
|
||||
@@ -5054,7 +5088,8 @@ public enum EIOBufferMode
|
||||
{
|
||||
public float xdelta;
|
||||
public float ydelta;
|
||||
public uint repeatCount;
|
||||
public uint unused;
|
||||
public float viewportscale;
|
||||
}
|
||||
[StructLayout(LayoutKind.Sequential)] public struct VREvent_TouchPadMove_t
|
||||
{
|
||||
@@ -5216,6 +5251,14 @@ public enum EIOBufferMode
|
||||
{
|
||||
public EShowUIType eType;
|
||||
}
|
||||
[StructLayout(LayoutKind.Sequential)] public struct VREvent_ShowDevTools_t
|
||||
{
|
||||
public int nBrowserIdentifier;
|
||||
}
|
||||
[StructLayout(LayoutKind.Sequential)] public struct VREvent_HDCPError_t
|
||||
{
|
||||
public EHDCPError eCode;
|
||||
}
|
||||
[StructLayout(LayoutKind.Sequential)] public struct VREvent_t
|
||||
{
|
||||
public uint eventType;
|
||||
@@ -5932,6 +5975,7 @@ public class OpenVR
|
||||
public const string k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations";
|
||||
public const string k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2";
|
||||
public const string k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback";
|
||||
public const string k_pch_Lighthouse_NewPairing_Bool = "newPairing";
|
||||
public const string k_pch_Null_Section = "driver_null";
|
||||
public const string k_pch_Null_SerialNumber_String = "serialNumber";
|
||||
public const string k_pch_Null_ModelNumber_String = "modelNumber";
|
||||
@@ -6003,9 +6047,10 @@ public class OpenVR
|
||||
public const string k_pch_Dashboard_Section = "dashboard";
|
||||
public const string k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
|
||||
public const string k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
|
||||
public const string k_pch_Dashboard_EnableWebUI = "webUI";
|
||||
public const string k_pch_Dashboard_EnableWebUIDevTools = "webUIDevTools";
|
||||
public const string k_pch_Dashboard_EnableWebUIDashboardReplacement = "webUIDashboard";
|
||||
public const string k_pch_Dashboard_UseWebDashboard = "useWebDashboard";
|
||||
public const string k_pch_Dashboard_UseWebSettings = "useWebSettings";
|
||||
public const string k_pch_Dashboard_UseWebIPD = "useWebIPD";
|
||||
public const string k_pch_Dashboard_UseWebPowerMenu = "useWebPowerMenu";
|
||||
public const string k_pch_modelskin_Section = "modelskins";
|
||||
public const string k_pch_Driver_Enable_Bool = "enable";
|
||||
public const string k_pch_WebInterface_Section = "WebInterface";
|
||||
@@ -6059,7 +6104,7 @@ public class OpenVR
|
||||
m_pVRScreenshots = null;
|
||||
m_pVRTrackedCamera = null;
|
||||
m_pVRInput = null;
|
||||
m_pIOBuffer = null;
|
||||
m_pVRIOBuffer = null;
|
||||
m_pVRSpatialAnchors = null;
|
||||
m_pVRNotifications = null;
|
||||
}
|
||||
|
||||
@@ -142,6 +142,8 @@
|
||||
,{"name": "Prop_AdditionalDeviceSettingsPath_String","value": "1042"}
|
||||
,{"name": "Prop_Identifiable_Bool","value": "1043"}
|
||||
,{"name": "Prop_BootloaderVersion_Uint64","value": "1044"}
|
||||
,{"name": "Prop_AdditionalSystemReportData_String","value": "1045"}
|
||||
,{"name": "Prop_CompositeFirmwareVersion_String","value": "1046"}
|
||||
,{"name": "Prop_ReportsTimeSinceVSync_Bool","value": "2000"}
|
||||
,{"name": "Prop_SecondsFromVsyncToPhotons_Float","value": "2001"}
|
||||
,{"name": "Prop_DisplayFrequency_Float","value": "2002"}
|
||||
@@ -238,6 +240,8 @@
|
||||
,{"name": "Prop_TrackingRangeMinimumMeters_Float","value": "4004"}
|
||||
,{"name": "Prop_TrackingRangeMaximumMeters_Float","value": "4005"}
|
||||
,{"name": "Prop_ModeLabel_String","value": "4006"}
|
||||
,{"name": "Prop_CanWirelessIdentify_Bool","value": "4007"}
|
||||
,{"name": "Prop_Nonce_Int32","value": "4008"}
|
||||
,{"name": "Prop_IconPathName_String","value": "5000"}
|
||||
,{"name": "Prop_NamedIconPathDeviceOff_String","value": "5001"}
|
||||
,{"name": "Prop_NamedIconPathDeviceSearching_String","value": "5002"}
|
||||
@@ -356,7 +360,6 @@
|
||||
,{"name": "VREvent_OverlayHidden","value": "501"}
|
||||
,{"name": "VREvent_DashboardActivated","value": "502"}
|
||||
,{"name": "VREvent_DashboardDeactivated","value": "503"}
|
||||
,{"name": "VREvent_DashboardThumbSelected","value": "504"}
|
||||
,{"name": "VREvent_DashboardRequested","value": "505"}
|
||||
,{"name": "VREvent_ResetDashboard","value": "506"}
|
||||
,{"name": "VREvent_RenderToast","value": "507"}
|
||||
@@ -379,6 +382,7 @@
|
||||
,{"name": "VREvent_RoomViewShown","value": "526"}
|
||||
,{"name": "VREvent_RoomViewHidden","value": "527"}
|
||||
,{"name": "VREvent_ShowUI","value": "528"}
|
||||
,{"name": "VREvent_ShowDevTools","value": "529"}
|
||||
,{"name": "VREvent_Notification_Shown","value": "600"}
|
||||
,{"name": "VREvent_Notification_Hidden","value": "601"}
|
||||
,{"name": "VREvent_Notification_BeginInteraction","value": "602"}
|
||||
@@ -388,6 +392,7 @@
|
||||
,{"name": "VREvent_QuitAborted_UserPrompt","value": "702"}
|
||||
,{"name": "VREvent_QuitAcknowledged","value": "703"}
|
||||
,{"name": "VREvent_DriverRequestedQuit","value": "704"}
|
||||
,{"name": "VREvent_RestartRequested","value": "705"}
|
||||
,{"name": "VREvent_ChaperoneDataHasChanged","value": "800"}
|
||||
,{"name": "VREvent_ChaperoneUniverseHasChanged","value": "801"}
|
||||
,{"name": "VREvent_ChaperoneTempDataHasChanged","value": "802"}
|
||||
@@ -434,6 +439,11 @@
|
||||
,{"name": "VREvent_Compositor_MirrorWindowHidden","value": "1401"}
|
||||
,{"name": "VREvent_Compositor_ChaperoneBoundsShown","value": "1410"}
|
||||
,{"name": "VREvent_Compositor_ChaperoneBoundsHidden","value": "1411"}
|
||||
,{"name": "VREvent_Compositor_DisplayDisconnected","value": "1412"}
|
||||
,{"name": "VREvent_Compositor_DisplayReconnected","value": "1413"}
|
||||
,{"name": "VREvent_Compositor_HDCPError","value": "1414"}
|
||||
,{"name": "VREvent_Compositor_ApplicationNotResponding","value": "1415"}
|
||||
,{"name": "VREvent_Compositor_ApplicationResumed","value": "1416"}
|
||||
,{"name": "VREvent_TrackedCamera_StartVideoStream","value": "1500"}
|
||||
,{"name": "VREvent_TrackedCamera_StopVideoStream","value": "1501"}
|
||||
,{"name": "VREvent_TrackedCamera_PauseVideoStream","value": "1502"}
|
||||
@@ -456,6 +466,7 @@
|
||||
,{"name": "VREvent_SpatialAnchors_DescriptorUpdated","value": "1801"}
|
||||
,{"name": "VREvent_SpatialAnchors_RequestPoseUpdate","value": "1802"}
|
||||
,{"name": "VREvent_SpatialAnchors_RequestDescriptorUpdate","value": "1803"}
|
||||
,{"name": "VREvent_SystemReport_Started","value": "1900"}
|
||||
,{"name": "VREvent_VendorSpecific_Reserved_Start","value": "10000"}
|
||||
,{"name": "VREvent_VendorSpecific_Reserved_End","value": "19999"}
|
||||
]}
|
||||
@@ -503,6 +514,14 @@
|
||||
,{"name": "ShowUI_ManageTrackers","value": "1"}
|
||||
,{"name": "ShowUI_QuickStart","value": "2"}
|
||||
,{"name": "ShowUI_Pairing","value": "3"}
|
||||
,{"name": "ShowUI_Settings","value": "4"}
|
||||
]}
|
||||
, {"enumname": "vr::EHDCPError","values": [
|
||||
{"name": "HDCPError_None","value": "0"}
|
||||
,{"name": "HDCPError_LinkLost","value": "1"}
|
||||
,{"name": "HDCPError_Tampered","value": "2"}
|
||||
,{"name": "HDCPError_DeviceRevoked","value": "3"}
|
||||
,{"name": "HDCPError_Unknown","value": "4"}
|
||||
]}
|
||||
, {"enumname": "vr::EVRInputError","values": [
|
||||
{"name": "VRInputError_None","value": "0"}
|
||||
@@ -671,6 +690,7 @@
|
||||
,{"name": "VRInitError_Init_USBServiceBusy","value": "140"}
|
||||
,{"name": "VRInitError_Init_VRWebHelperStartupFailed","value": "141"}
|
||||
,{"name": "VRInitError_Init_TrackerManagerInitFailed","value": "142"}
|
||||
,{"name": "VRInitError_Init_AlreadyRunning","value": "143"}
|
||||
,{"name": "VRInitError_Driver_Failed","value": "200"}
|
||||
,{"name": "VRInitError_Driver_Unknown","value": "201"}
|
||||
,{"name": "VRInitError_Driver_HmdUnknown","value": "202"}
|
||||
@@ -793,6 +813,7 @@
|
||||
,{"name": "VRInitError_VendorSpecific_HmdFound_UserDataError","value": "1112"}
|
||||
,{"name": "VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck","value": "1113"}
|
||||
,{"name": "VRInitError_Steam_SteamInstallationNotFound","value": "2000"}
|
||||
,{"name": "VRInitError_LastError","value": "2001"}
|
||||
]}
|
||||
, {"enumname": "vr::EVRScreenshotType","values": [
|
||||
{"name": "VRScreenshotType_None","value": "0"}
|
||||
@@ -1378,6 +1399,8 @@
|
||||
"constname": "k_pch_Lighthouse_PowerManagedBaseStations2_String","consttype": "const char *const", "constval": "PowerManagedBaseStations2"}
|
||||
,{
|
||||
"constname": "k_pch_Lighthouse_EnableImuFallback_Bool","consttype": "const char *const", "constval": "enableImuFallback"}
|
||||
,{
|
||||
"constname": "k_pch_Lighthouse_NewPairing_Bool","consttype": "const char *const", "constval": "newPairing"}
|
||||
,{
|
||||
"constname": "k_pch_Null_Section","consttype": "const char *const", "constval": "driver_null"}
|
||||
,{
|
||||
@@ -1521,11 +1544,13 @@
|
||||
,{
|
||||
"constname": "k_pch_Dashboard_ArcadeMode_Bool","consttype": "const char *const", "constval": "arcadeMode"}
|
||||
,{
|
||||
"constname": "k_pch_Dashboard_EnableWebUI","consttype": "const char *const", "constval": "webUI"}
|
||||
"constname": "k_pch_Dashboard_UseWebDashboard","consttype": "const char *const", "constval": "useWebDashboard"}
|
||||
,{
|
||||
"constname": "k_pch_Dashboard_EnableWebUIDevTools","consttype": "const char *const", "constval": "webUIDevTools"}
|
||||
"constname": "k_pch_Dashboard_UseWebSettings","consttype": "const char *const", "constval": "useWebSettings"}
|
||||
,{
|
||||
"constname": "k_pch_Dashboard_EnableWebUIDashboardReplacement","consttype": "const char *const", "constval": "webUIDashboard"}
|
||||
"constname": "k_pch_Dashboard_UseWebIPD","consttype": "const char *const", "constval": "useWebIPD"}
|
||||
,{
|
||||
"constname": "k_pch_Dashboard_UseWebPowerMenu","consttype": "const char *const", "constval": "useWebPowerMenu"}
|
||||
,{
|
||||
"constname": "k_pch_modelskin_Section","consttype": "const char *const", "constval": "modelskins"}
|
||||
,{
|
||||
@@ -1675,7 +1700,8 @@
|
||||
,{"struct": "vr::VREvent_Scroll_t","fields": [
|
||||
{ "fieldname": "xdelta", "fieldtype": "float"},
|
||||
{ "fieldname": "ydelta", "fieldtype": "float"},
|
||||
{ "fieldname": "repeatCount", "fieldtype": "uint32_t"}]}
|
||||
{ "fieldname": "unused", "fieldtype": "uint32_t"},
|
||||
{ "fieldname": "viewportscale", "fieldtype": "float"}]}
|
||||
,{"struct": "vr::VREvent_TouchPadMove_t","fields": [
|
||||
{ "fieldname": "bFingerDown", "fieldtype": "_Bool"},
|
||||
{ "fieldname": "flSecondsFingerDown", "fieldtype": "float"},
|
||||
@@ -1766,6 +1792,10 @@
|
||||
{ "fieldname": "fProgress", "fieldtype": "float"}]}
|
||||
,{"struct": "vr::VREvent_ShowUI_t","fields": [
|
||||
{ "fieldname": "eType", "fieldtype": "enum vr::EShowUIType"}]}
|
||||
,{"struct": "vr::VREvent_ShowDevTools_t","fields": [
|
||||
{ "fieldname": "nBrowserIdentifier", "fieldtype": "int32_t"}]}
|
||||
,{"struct": "vr::VREvent_HDCPError_t","fields": [
|
||||
{ "fieldname": "eCode", "fieldtype": "enum vr::EHDCPError"}]}
|
||||
,{"struct": "vr::(anonymous)","fields": [
|
||||
{ "fieldname": "reserved", "fieldtype": "struct vr::VREvent_Reserved_t"},
|
||||
{ "fieldname": "controller", "fieldtype": "struct vr::VREvent_Controller_t"},
|
||||
@@ -1794,7 +1824,9 @@
|
||||
{ "fieldname": "actionManifest", "fieldtype": "struct vr::VREvent_InputActionManifestLoad_t"},
|
||||
{ "fieldname": "spatialAnchor", "fieldtype": "struct vr::VREvent_SpatialAnchor_t"},
|
||||
{ "fieldname": "progressUpdate", "fieldtype": "struct vr::VREvent_ProgressUpdate_t"},
|
||||
{ "fieldname": "showUi", "fieldtype": "struct vr::VREvent_ShowUI_t"}]}
|
||||
{ "fieldname": "showUi", "fieldtype": "struct vr::VREvent_ShowUI_t"},
|
||||
{ "fieldname": "showDevTools", "fieldtype": "struct vr::VREvent_ShowDevTools_t"},
|
||||
{ "fieldname": "hdcpError", "fieldtype": "struct vr::VREvent_HDCPError_t"}]}
|
||||
,{"struct": "vr::VREvent_t","fields": [
|
||||
{ "fieldname": "eventType", "fieldtype": "uint32_t"},
|
||||
{ "fieldname": "trackedDeviceIndex", "fieldtype": "TrackedDeviceIndex_t"},
|
||||
@@ -4816,6 +4848,11 @@
|
||||
{ "paramname": "originToHighlight" ,"paramtype": "vr::VRInputValueHandle_t"}
|
||||
]
|
||||
}
|
||||
,{
|
||||
"classname": "vr::IVRInput",
|
||||
"methodname": "IsUsingLegacyInput",
|
||||
"returntype": "bool"
|
||||
}
|
||||
,{
|
||||
"classname": "vr::IVRIOBuffer",
|
||||
"methodname": "Open",
|
||||
|
||||
@@ -199,6 +199,7 @@ static const char * k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth";
|
||||
static const char * k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations";
|
||||
static const char * k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2";
|
||||
static const char * k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback";
|
||||
static const char * k_pch_Lighthouse_NewPairing_Bool = "newPairing";
|
||||
static const char * k_pch_Null_Section = "driver_null";
|
||||
static const char * k_pch_Null_SerialNumber_String = "serialNumber";
|
||||
static const char * k_pch_Null_ModelNumber_String = "modelNumber";
|
||||
@@ -270,9 +271,10 @@ static const char * k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositor
|
||||
static const char * k_pch_Dashboard_Section = "dashboard";
|
||||
static const char * k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
|
||||
static const char * k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
|
||||
static const char * k_pch_Dashboard_EnableWebUI = "webUI";
|
||||
static const char * k_pch_Dashboard_EnableWebUIDevTools = "webUIDevTools";
|
||||
static const char * k_pch_Dashboard_EnableWebUIDashboardReplacement = "webUIDashboard";
|
||||
static const char * k_pch_Dashboard_UseWebDashboard = "useWebDashboard";
|
||||
static const char * k_pch_Dashboard_UseWebSettings = "useWebSettings";
|
||||
static const char * k_pch_Dashboard_UseWebIPD = "useWebIPD";
|
||||
static const char * k_pch_Dashboard_UseWebPowerMenu = "useWebPowerMenu";
|
||||
static const char * k_pch_modelskin_Section = "modelskins";
|
||||
static const char * k_pch_Driver_Enable_Bool = "enable";
|
||||
static const char * k_pch_WebInterface_Section = "WebInterface";
|
||||
@@ -425,6 +427,8 @@ typedef enum ETrackedDeviceProperty
|
||||
ETrackedDeviceProperty_Prop_AdditionalDeviceSettingsPath_String = 1042,
|
||||
ETrackedDeviceProperty_Prop_Identifiable_Bool = 1043,
|
||||
ETrackedDeviceProperty_Prop_BootloaderVersion_Uint64 = 1044,
|
||||
ETrackedDeviceProperty_Prop_AdditionalSystemReportData_String = 1045,
|
||||
ETrackedDeviceProperty_Prop_CompositeFirmwareVersion_String = 1046,
|
||||
ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000,
|
||||
ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001,
|
||||
ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002,
|
||||
@@ -521,6 +525,8 @@ typedef enum ETrackedDeviceProperty
|
||||
ETrackedDeviceProperty_Prop_TrackingRangeMinimumMeters_Float = 4004,
|
||||
ETrackedDeviceProperty_Prop_TrackingRangeMaximumMeters_Float = 4005,
|
||||
ETrackedDeviceProperty_Prop_ModeLabel_String = 4006,
|
||||
ETrackedDeviceProperty_Prop_CanWirelessIdentify_Bool = 4007,
|
||||
ETrackedDeviceProperty_Prop_Nonce_Int32 = 4008,
|
||||
ETrackedDeviceProperty_Prop_IconPathName_String = 5000,
|
||||
ETrackedDeviceProperty_Prop_NamedIconPathDeviceOff_String = 5001,
|
||||
ETrackedDeviceProperty_Prop_NamedIconPathDeviceSearching_String = 5002,
|
||||
@@ -647,7 +653,6 @@ typedef enum EVREventType
|
||||
EVREventType_VREvent_OverlayHidden = 501,
|
||||
EVREventType_VREvent_DashboardActivated = 502,
|
||||
EVREventType_VREvent_DashboardDeactivated = 503,
|
||||
EVREventType_VREvent_DashboardThumbSelected = 504,
|
||||
EVREventType_VREvent_DashboardRequested = 505,
|
||||
EVREventType_VREvent_ResetDashboard = 506,
|
||||
EVREventType_VREvent_RenderToast = 507,
|
||||
@@ -670,6 +675,7 @@ typedef enum EVREventType
|
||||
EVREventType_VREvent_RoomViewShown = 526,
|
||||
EVREventType_VREvent_RoomViewHidden = 527,
|
||||
EVREventType_VREvent_ShowUI = 528,
|
||||
EVREventType_VREvent_ShowDevTools = 529,
|
||||
EVREventType_VREvent_Notification_Shown = 600,
|
||||
EVREventType_VREvent_Notification_Hidden = 601,
|
||||
EVREventType_VREvent_Notification_BeginInteraction = 602,
|
||||
@@ -679,6 +685,7 @@ typedef enum EVREventType
|
||||
EVREventType_VREvent_QuitAborted_UserPrompt = 702,
|
||||
EVREventType_VREvent_QuitAcknowledged = 703,
|
||||
EVREventType_VREvent_DriverRequestedQuit = 704,
|
||||
EVREventType_VREvent_RestartRequested = 705,
|
||||
EVREventType_VREvent_ChaperoneDataHasChanged = 800,
|
||||
EVREventType_VREvent_ChaperoneUniverseHasChanged = 801,
|
||||
EVREventType_VREvent_ChaperoneTempDataHasChanged = 802,
|
||||
@@ -725,6 +732,11 @@ typedef enum EVREventType
|
||||
EVREventType_VREvent_Compositor_MirrorWindowHidden = 1401,
|
||||
EVREventType_VREvent_Compositor_ChaperoneBoundsShown = 1410,
|
||||
EVREventType_VREvent_Compositor_ChaperoneBoundsHidden = 1411,
|
||||
EVREventType_VREvent_Compositor_DisplayDisconnected = 1412,
|
||||
EVREventType_VREvent_Compositor_DisplayReconnected = 1413,
|
||||
EVREventType_VREvent_Compositor_HDCPError = 1414,
|
||||
EVREventType_VREvent_Compositor_ApplicationNotResponding = 1415,
|
||||
EVREventType_VREvent_Compositor_ApplicationResumed = 1416,
|
||||
EVREventType_VREvent_TrackedCamera_StartVideoStream = 1500,
|
||||
EVREventType_VREvent_TrackedCamera_StopVideoStream = 1501,
|
||||
EVREventType_VREvent_TrackedCamera_PauseVideoStream = 1502,
|
||||
@@ -747,6 +759,7 @@ typedef enum EVREventType
|
||||
EVREventType_VREvent_SpatialAnchors_DescriptorUpdated = 1801,
|
||||
EVREventType_VREvent_SpatialAnchors_RequestPoseUpdate = 1802,
|
||||
EVREventType_VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803,
|
||||
EVREventType_VREvent_SystemReport_Started = 1900,
|
||||
EVREventType_VREvent_VendorSpecific_Reserved_Start = 10000,
|
||||
EVREventType_VREvent_VendorSpecific_Reserved_End = 19999,
|
||||
} EVREventType;
|
||||
@@ -804,8 +817,18 @@ typedef enum EShowUIType
|
||||
EShowUIType_ShowUI_ManageTrackers = 1,
|
||||
EShowUIType_ShowUI_QuickStart = 2,
|
||||
EShowUIType_ShowUI_Pairing = 3,
|
||||
EShowUIType_ShowUI_Settings = 4,
|
||||
} EShowUIType;
|
||||
|
||||
typedef enum EHDCPError
|
||||
{
|
||||
EHDCPError_HDCPError_None = 0,
|
||||
EHDCPError_HDCPError_LinkLost = 1,
|
||||
EHDCPError_HDCPError_Tampered = 2,
|
||||
EHDCPError_HDCPError_DeviceRevoked = 3,
|
||||
EHDCPError_HDCPError_Unknown = 4,
|
||||
} EHDCPError;
|
||||
|
||||
typedef enum EVRInputError
|
||||
{
|
||||
EVRInputError_VRInputError_None = 0,
|
||||
@@ -998,6 +1021,7 @@ typedef enum EVRInitError
|
||||
EVRInitError_VRInitError_Init_USBServiceBusy = 140,
|
||||
EVRInitError_VRInitError_Init_VRWebHelperStartupFailed = 141,
|
||||
EVRInitError_VRInitError_Init_TrackerManagerInitFailed = 142,
|
||||
EVRInitError_VRInitError_Init_AlreadyRunning = 143,
|
||||
EVRInitError_VRInitError_Driver_Failed = 200,
|
||||
EVRInitError_VRInitError_Driver_Unknown = 201,
|
||||
EVRInitError_VRInitError_Driver_HmdUnknown = 202,
|
||||
@@ -1120,6 +1144,7 @@ typedef enum EVRInitError
|
||||
EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataError = 1112,
|
||||
EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113,
|
||||
EVRInitError_VRInitError_Steam_SteamInstallationNotFound = 2000,
|
||||
EVRInitError_VRInitError_LastError = 2001,
|
||||
} EVRInitError;
|
||||
|
||||
typedef enum EVRScreenshotType
|
||||
@@ -1719,7 +1744,8 @@ typedef struct VREvent_Scroll_t
|
||||
{
|
||||
float xdelta;
|
||||
float ydelta;
|
||||
uint32_t repeatCount;
|
||||
uint32_t unused;
|
||||
float viewportscale;
|
||||
} VREvent_Scroll_t;
|
||||
|
||||
typedef struct VREvent_TouchPadMove_t
|
||||
@@ -1887,6 +1913,16 @@ typedef struct VREvent_ShowUI_t
|
||||
enum EShowUIType eType;
|
||||
} VREvent_ShowUI_t;
|
||||
|
||||
typedef struct VREvent_ShowDevTools_t
|
||||
{
|
||||
int32_t nBrowserIdentifier;
|
||||
} VREvent_ShowDevTools_t;
|
||||
|
||||
typedef struct VREvent_HDCPError_t
|
||||
{
|
||||
enum EHDCPError eCode;
|
||||
} VREvent_HDCPError_t;
|
||||
|
||||
typedef struct HiddenAreaMesh_t
|
||||
{
|
||||
struct HmdVector2_t * pVertexData; // const struct vr::HmdVector2_t *
|
||||
@@ -2627,6 +2663,7 @@ struct VR_IVRInput_FnTable
|
||||
EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetOriginTrackedDeviceInfo)(VRInputValueHandle_t origin, struct InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize);
|
||||
EVRInputError (OPENVR_FNTABLE_CALLTYPE *ShowActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle);
|
||||
EVRInputError (OPENVR_FNTABLE_CALLTYPE *ShowBindingsForActionSet)(struct VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight);
|
||||
bool (OPENVR_FNTABLE_CALLTYPE *IsUsingLegacyInput)();
|
||||
};
|
||||
|
||||
struct VR_IVRIOBuffer_FnTable
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
namespace vr
|
||||
{
|
||||
static const uint32_t k_nSteamVRVersionMajor = 1;
|
||||
static const uint32_t k_nSteamVRVersionMinor = 2;
|
||||
static const uint32_t k_nSteamVRVersionBuild = 10;
|
||||
static const uint32_t k_nSteamVRVersionMinor = 3;
|
||||
static const uint32_t k_nSteamVRVersionBuild = 20;
|
||||
} // namespace vr
|
||||
|
||||
// vrtypes.h
|
||||
@@ -352,6 +352,8 @@ enum ETrackedDeviceProperty
|
||||
Prop_AdditionalDeviceSettingsPath_String = 1042, // driver-relative path to additional device and global configuration settings
|
||||
Prop_Identifiable_Bool = 1043, // Whether device supports being identified from vrmonitor (e.g. blink LED, vibrate haptics, etc)
|
||||
Prop_BootloaderVersion_Uint64 = 1044,
|
||||
Prop_AdditionalSystemReportData_String = 1045, // additional string to include in system reports about a tracked device
|
||||
Prop_CompositeFirmwareVersion_String = 1046, // additional FW components from a device that gets propagated into reports
|
||||
|
||||
// Properties that are unique to TrackedDeviceClass_HMD
|
||||
Prop_ReportsTimeSinceVSync_Bool = 2000,
|
||||
@@ -457,6 +459,8 @@ enum ETrackedDeviceProperty
|
||||
Prop_TrackingRangeMinimumMeters_Float = 4004,
|
||||
Prop_TrackingRangeMaximumMeters_Float = 4005,
|
||||
Prop_ModeLabel_String = 4006,
|
||||
Prop_CanWirelessIdentify_Bool = 4007, // volatile, based on radio presence and fw discovery
|
||||
Prop_Nonce_Int32 = 4008,
|
||||
|
||||
// Properties that are used for user interface like icons names
|
||||
Prop_IconPathName_String = 5000, // DEPRECATED. Value not referenced. Now expected to be part of icon path properties.
|
||||
@@ -688,7 +692,7 @@ enum EVREventType
|
||||
VREvent_OverlayHidden = 501,
|
||||
VREvent_DashboardActivated = 502,
|
||||
VREvent_DashboardDeactivated = 503,
|
||||
VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay
|
||||
//VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay - No longer sent
|
||||
VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay
|
||||
VREvent_ResetDashboard = 506, // Send to the overlay manager
|
||||
VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID
|
||||
@@ -716,6 +720,7 @@ enum EVREventType
|
||||
VREvent_RoomViewShown = 526, // Sent by compositor whenever room-view is enabled
|
||||
VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled
|
||||
VREvent_ShowUI = 528, // data is showUi
|
||||
VREvent_ShowDevTools = 529, // data is showDevTools
|
||||
|
||||
VREvent_Notification_Shown = 600,
|
||||
VREvent_Notification_Hidden = 601,
|
||||
@@ -727,6 +732,7 @@ enum EVREventType
|
||||
VREvent_QuitAborted_UserPrompt = 702, // data is process
|
||||
VREvent_QuitAcknowledged = 703, // data is process
|
||||
VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down
|
||||
VREvent_RestartRequested = 705, // A driver or other component wants the user to restart SteamVR
|
||||
|
||||
VREvent_ChaperoneDataHasChanged = 800, // Sent when the process needs to call VRChaperone()->ReloadInfo()
|
||||
VREvent_ChaperoneUniverseHasChanged = 801,
|
||||
@@ -783,6 +789,11 @@ enum EVREventType
|
||||
VREvent_Compositor_MirrorWindowHidden = 1401,
|
||||
VREvent_Compositor_ChaperoneBoundsShown = 1410,
|
||||
VREvent_Compositor_ChaperoneBoundsHidden = 1411,
|
||||
VREvent_Compositor_DisplayDisconnected = 1412,
|
||||
VREvent_Compositor_DisplayReconnected = 1413,
|
||||
VREvent_Compositor_HDCPError = 1414, // data is hdcpError
|
||||
VREvent_Compositor_ApplicationNotResponding = 1415,
|
||||
VREvent_Compositor_ApplicationResumed = 1416,
|
||||
|
||||
VREvent_TrackedCamera_StartVideoStream = 1500,
|
||||
VREvent_TrackedCamera_StopVideoStream = 1501,
|
||||
@@ -811,6 +822,8 @@ enum EVREventType
|
||||
VREvent_SpatialAnchors_RequestPoseUpdate = 1802, // data is spatialAnchor. sent to specific driver
|
||||
VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, // data is spatialAnchor. sent to specific driver
|
||||
|
||||
VREvent_SystemReport_Started = 1900, // user or system initiated generation of a system report. broadcast
|
||||
|
||||
// Vendors are free to expose private events in this reserved region
|
||||
VREvent_VendorSpecific_Reserved_Start = 10000,
|
||||
VREvent_VendorSpecific_Reserved_End = 19999,
|
||||
@@ -890,11 +903,12 @@ struct VREvent_Mouse_t
|
||||
uint32_t button; // EVRMouseButton enum
|
||||
};
|
||||
|
||||
/** used for simulated mouse wheel scroll in overlay space */
|
||||
/** used for simulated mouse wheel scroll */
|
||||
struct VREvent_Scroll_t
|
||||
{
|
||||
float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe
|
||||
uint32_t repeatCount;
|
||||
float xdelta, ydelta;
|
||||
uint32_t unused;
|
||||
float viewportscale; // For scrolling on an overlay with laser mouse, this is the overlay's vertical size relative to the overlay height. Range: [0,1]
|
||||
};
|
||||
|
||||
/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger
|
||||
@@ -1087,6 +1101,7 @@ enum EShowUIType
|
||||
ShowUI_ManageTrackers = 1,
|
||||
ShowUI_QuickStart = 2,
|
||||
ShowUI_Pairing = 3,
|
||||
ShowUI_Settings = 4,
|
||||
};
|
||||
|
||||
struct VREvent_ShowUI_t
|
||||
@@ -1094,6 +1109,25 @@ struct VREvent_ShowUI_t
|
||||
EShowUIType eType;
|
||||
};
|
||||
|
||||
struct VREvent_ShowDevTools_t
|
||||
{
|
||||
int32_t nBrowserIdentifier;
|
||||
};
|
||||
|
||||
enum EHDCPError
|
||||
{
|
||||
HDCPError_None = 0,
|
||||
HDCPError_LinkLost = 1,
|
||||
HDCPError_Tampered = 2,
|
||||
HDCPError_DeviceRevoked = 3,
|
||||
HDCPError_Unknown = 4
|
||||
};
|
||||
|
||||
struct VREvent_HDCPError_t
|
||||
{
|
||||
EHDCPError eCode;
|
||||
};
|
||||
|
||||
typedef union
|
||||
{
|
||||
VREvent_Reserved_t reserved;
|
||||
@@ -1124,6 +1158,8 @@ typedef union
|
||||
VREvent_SpatialAnchor_t spatialAnchor;
|
||||
VREvent_ProgressUpdate_t progressUpdate;
|
||||
VREvent_ShowUI_t showUi;
|
||||
VREvent_ShowDevTools_t showDevTools;
|
||||
VREvent_HDCPError_t hdcpError;
|
||||
/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
|
||||
} VREvent_Data_t;
|
||||
|
||||
@@ -1384,7 +1420,7 @@ enum EVRSkeletalMotionRange
|
||||
|
||||
enum EVRSkeletalTrackingLevel
|
||||
{
|
||||
// body part location can’t be directly determined by the device. Any skeletal pose provided by
|
||||
// body part location can't be directly determined by the device. Any skeletal pose provided by
|
||||
// the device is estimated by assuming the position required to active buttons, triggers, joysticks,
|
||||
// or other input sensors.
|
||||
// E.g. Vive Controller, Gamepad
|
||||
@@ -1468,6 +1504,7 @@ enum EVRInitError
|
||||
VRInitError_Init_USBServiceBusy = 140,
|
||||
VRInitError_Init_VRWebHelperStartupFailed = 141,
|
||||
VRInitError_Init_TrackerManagerInitFailed = 142,
|
||||
VRInitError_Init_AlreadyRunning = 143,
|
||||
|
||||
VRInitError_Driver_Failed = 200,
|
||||
VRInitError_Driver_Unknown = 201,
|
||||
@@ -1597,6 +1634,9 @@ enum EVRInitError
|
||||
VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113,
|
||||
|
||||
VRInitError_Steam_SteamInstallationNotFound = 2000,
|
||||
|
||||
// Strictly a placeholder
|
||||
VRInitError_LastError
|
||||
};
|
||||
|
||||
enum EVRScreenshotType
|
||||
@@ -1732,29 +1772,33 @@ struct ImuSample_t
|
||||
// figure out how to import from the VR API dll
|
||||
#if defined(_WIN32)
|
||||
|
||||
#ifdef VR_API_EXPORT
|
||||
#define VR_INTERFACE extern "C" __declspec( dllexport )
|
||||
#else
|
||||
#define VR_INTERFACE extern "C" __declspec( dllimport )
|
||||
#endif
|
||||
#if !defined(OPENVR_BUILD_STATIC)
|
||||
#ifdef VR_API_EXPORT
|
||||
#define VR_INTERFACE extern "C" __declspec( dllexport )
|
||||
#else
|
||||
#define VR_INTERFACE extern "C" __declspec( dllimport )
|
||||
#endif
|
||||
#else
|
||||
#define VR_INTERFACE extern "C"
|
||||
#endif
|
||||
|
||||
#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__)
|
||||
|
||||
#ifdef VR_API_EXPORT
|
||||
#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
|
||||
#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
|
||||
#else
|
||||
#define VR_INTERFACE extern "C"
|
||||
#define VR_INTERFACE extern "C"
|
||||
#endif
|
||||
|
||||
#else
|
||||
#error "Unsupported Platform."
|
||||
#error "Unsupported Platform."
|
||||
#endif
|
||||
|
||||
|
||||
#if defined( _WIN32 )
|
||||
#define VR_CALLTYPE __cdecl
|
||||
#define VR_CALLTYPE __cdecl
|
||||
#else
|
||||
#define VR_CALLTYPE
|
||||
#define VR_CALLTYPE
|
||||
#endif
|
||||
|
||||
} // namespace vr
|
||||
@@ -2091,6 +2135,7 @@ namespace vr
|
||||
static const char * const k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations";
|
||||
static const char * const k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2";
|
||||
static const char * const k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback";
|
||||
static const char * const k_pch_Lighthouse_NewPairing_Bool = "newPairing";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// null keys
|
||||
@@ -2192,9 +2237,10 @@ namespace vr
|
||||
static const char * const k_pch_Dashboard_Section = "dashboard";
|
||||
static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
|
||||
static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
|
||||
static const char * const k_pch_Dashboard_EnableWebUI = "webUI";
|
||||
static const char * const k_pch_Dashboard_EnableWebUIDevTools = "webUIDevTools";
|
||||
static const char * const k_pch_Dashboard_EnableWebUIDashboardReplacement = "webUIDashboard";
|
||||
static const char * const k_pch_Dashboard_UseWebDashboard = "useWebDashboard";
|
||||
static const char * const k_pch_Dashboard_UseWebSettings = "useWebSettings";
|
||||
static const char * const k_pch_Dashboard_UseWebIPD = "useWebIPD";
|
||||
static const char * const k_pch_Dashboard_UseWebPowerMenu = "useWebPowerMenu";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// model skin keys
|
||||
@@ -3134,6 +3180,9 @@ public:
|
||||
|
||||
/** Notifies the server that a tracked device's display component transforms have been updated. */
|
||||
virtual void TrackedDeviceDisplayTransformUpdated( uint32_t unWhichDevice, HmdMatrix34_t eyeToHeadLeft, HmdMatrix34_t eyeToHeadRight ) = 0;
|
||||
|
||||
/** Requests that SteamVR be restarted. The provided reason will be displayed to the user and should be in the current locale. */
|
||||
virtual void RequestRestart( const char *pchLocalizedReason, const char *pchExecutableToStart, const char *pchArguments, const char *pchWorkingDirectory ) = 0;
|
||||
};
|
||||
|
||||
static const char *IVRServerDriverHost_Version = "IVRServerDriverHost_005";
|
||||
|
||||