Files
OpenVR-AdvancedSettings-frame/src/tabcontrollers/SteamVRTabController.h
T
matzman e39c240ff5 Complete GUI overhaul (from Qt Widgets to Qt Quick Controls 2)
Added chaperone profiles
Added separate supersampling sliders for applications/compositor
Added asynchronous reprojection on/off switch
Merged in Microphone Control Overlay
Added Push-to-Talk profiles
Updated to OpenVR 1.0.3
Requires at least SteamVR beta 1477423729.
2016-10-28 18:38:05 +02:00

70 lines
2.4 KiB
C++

#pragma once
#include <QObject>
// openvr's github repo hasn't been updated yet to reflect changes in beta 1477423729.
static const char* vrsettings_steamvr_allowAsyncReprojection = "allowAsyncReprojection";
static const char* vrsettings_steamvr_allowInterleavedReprojection = "allowInterleavedReprojection";
static const char* vrsettings_compositor_category = "compositor";
class QQuickWindow;
// application namespace
namespace advsettings {
// forward declaration
class OverlayController;
class SteamVRTabController : public QObject {
Q_OBJECT
Q_PROPERTY(float superSampling READ superSampling WRITE setSuperSampling NOTIFY superSamplingChanged)
Q_PROPERTY(float compositorSuperSampling READ compositorSuperSampling WRITE setCompositorSuperSampling NOTIFY compositorSuperSamplingChanged)
Q_PROPERTY(bool allowInterleavedReprojection READ allowInterleavedReprojection WRITE setAllowInterleavedReprojection NOTIFY allowInterleavedReprojectionChanged)
Q_PROPERTY(bool allowAsyncReprojection READ allowAsyncReprojection WRITE setAllowAsyncReprojection NOTIFY allowAsyncReprojectionChanged)
Q_PROPERTY(bool forceReprojection READ forceReprojection WRITE setForceReprojection NOTIFY forceReprojectionChanged)
private:
OverlayController* parent;
QQuickWindow* widget;
float m_superSampling = 1.0;
float m_compositorSuperSampling = 1.0;
bool m_allowInterleavedReprojection = true;
bool m_allowAsyncReprojection = true;
bool m_forceReprojection = false;
unsigned settingsUpdateCounter = 0;
public:
void initStage1();
void initStage2(OverlayController* parent, QQuickWindow* widget);
void eventLoopTick();
float superSampling() const;
float compositorSuperSampling() const;
bool allowInterleavedReprojection() const;
bool allowAsyncReprojection() const;
bool forceReprojection() const;
public slots:
void setSuperSampling(float value, bool notify = true);
void setCompositorSuperSampling(float value, bool notify = true);
void setAllowInterleavedReprojection(bool value, bool notify = true);
void setAllowAsyncReprojection(bool value, bool notify = true);
void setForceReprojection(bool value, bool notify = true);
void restartSteamVR();
signals:
void superSamplingChanged(float value);
void compositorSuperSamplingChanged(float value);
void allowInterleavedReprojectionChanged(bool value);
void allowAsyncReprojectionChanged(bool value);
void forceReprojectionChanged(bool value);
};
} // namespace advsettings