cleaned up dead code
This commit is contained in:
@@ -68,11 +68,11 @@ MyStackViewPage {
|
|||||||
Layout.leftMargin: 32
|
Layout.leftMargin: 32
|
||||||
text: "Supersample Filtering"
|
text: "Supersample Filtering"
|
||||||
}
|
}
|
||||||
//MyToggleButton {
|
MyToggleButton {
|
||||||
// id: steamvrNewProfileIncludeReprojectionSettingsg
|
id: steamvrNewProfileIncludeMotionSmoothing
|
||||||
// Layout.leftMargin: 32
|
Layout.leftMargin: 32
|
||||||
// text: "Reprojection Settings"
|
text: "Motion Smoothing Setting"
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
onClosed: {
|
onClosed: {
|
||||||
if (okClicked) {
|
if (okClicked) {
|
||||||
@@ -80,13 +80,13 @@ MyStackViewPage {
|
|||||||
steamvrMessageDialog.showMessage("Create New Profile", "ERROR: Empty profile name.")
|
steamvrMessageDialog.showMessage("Create New Profile", "ERROR: Empty profile name.")
|
||||||
} else if (!steamvrNewProfileIncludeSupersampling.checked
|
} else if (!steamvrNewProfileIncludeSupersampling.checked
|
||||||
&& !steamvrNewProfileIncludeSupersampleFiltering.checked
|
&& !steamvrNewProfileIncludeSupersampleFiltering.checked
|
||||||
) {
|
&& !steamvrNewProfileIncludeMotionSmoothing.checked) {
|
||||||
steamvrMessageDialog.showMessage("Create New Profile", "ERROR: Nothing included.")
|
steamvrMessageDialog.showMessage("Create New Profile", "ERROR: Nothing included.")
|
||||||
} else {
|
} else {
|
||||||
SteamVRTabController.addSteamVRProfile(steamvrNewProfileName.text,
|
SteamVRTabController.addSteamVRProfile(steamvrNewProfileName.text,
|
||||||
steamvrNewProfileIncludeSupersampling.checked,
|
steamvrNewProfileIncludeSupersampling.checked,
|
||||||
steamvrNewProfileIncludeSupersampleFiltering.checked
|
steamvrNewProfileIncludeSupersampleFiltering.checked,
|
||||||
// steamvrNewProfileIncludeReprojectionSettingsg.checked
|
steamvrNewProfileIncludeMotionSmoothing.checked
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ MyStackViewPage {
|
|||||||
steamvrNewProfileName.text = ""
|
steamvrNewProfileName.text = ""
|
||||||
steamvrNewProfileIncludeSupersampling.checked = false
|
steamvrNewProfileIncludeSupersampling.checked = false
|
||||||
steamvrNewProfileIncludeSupersampleFiltering.checked = false
|
steamvrNewProfileIncludeSupersampleFiltering.checked = false
|
||||||
//steamvrNewProfileIncludeReprojectionSettingsg.checked = false
|
steamvrNewProfileIncludeMotionSmoothing.checked = false
|
||||||
open()
|
open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -142,7 +142,6 @@ MyStackViewPage {
|
|||||||
onClicked: {
|
onClicked: {
|
||||||
if (steamvrProfileComboBox.currentIndex > 0) {
|
if (steamvrProfileComboBox.currentIndex > 0) {
|
||||||
SteamVRTabController.applySteamVRProfile(steamvrProfileComboBox.currentIndex - 1)
|
SteamVRTabController.applySteamVRProfile(steamvrProfileComboBox.currentIndex - 1)
|
||||||
//steamvrProfileComboBox.currentIndex = 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -324,32 +323,6 @@ MyStackViewPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//No longer Valid
|
|
||||||
/*
|
|
||||||
MyToggleButton {
|
|
||||||
id: steamvrAllowAsyncReprojectionToggle
|
|
||||||
text: "Allow Asynchronous Reprojection"
|
|
||||||
onCheckedChanged: {
|
|
||||||
SteamVRTabController.setAllowAsyncReprojection(this.checked, false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyToggleButton {
|
|
||||||
id: steamvrAllowInterleavedReprojectionToggle
|
|
||||||
text: "Allow Interleaved Reprojection"
|
|
||||||
onCheckedChanged: {
|
|
||||||
SteamVRTabController.setAllowInterleavedReprojection(this.checked, false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyToggleButton {
|
|
||||||
id: steamvrForceReprojectionToggle
|
|
||||||
text: "Enable Always-on Reprojection"
|
|
||||||
onCheckedChanged: {
|
|
||||||
SteamVRTabController.setForceReprojection(this.checked, false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
Item { Layout.fillHeight: true; Layout.fillWidth: true}
|
Item { Layout.fillHeight: true; Layout.fillWidth: true}
|
||||||
|
|
||||||
MyText {
|
MyText {
|
||||||
@@ -395,9 +368,6 @@ MyStackViewPage {
|
|||||||
}
|
}
|
||||||
steamvrCompositorSupersamplingText.text = s2
|
steamvrCompositorSupersamplingText.text = s2
|
||||||
steamvrAllowSupersampleFilteringToggle.checked = SteamVRTabController.allowSupersampleFiltering
|
steamvrAllowSupersampleFilteringToggle.checked = SteamVRTabController.allowSupersampleFiltering
|
||||||
//steamvrAllowInterleavedReprojectionToggle.checked = SteamVRTabController.allowInterleavedReprojection
|
|
||||||
//steamvrAllowAsyncReprojectionToggle.checked = SteamVRTabController.allowAsyncReprojection
|
|
||||||
//steamvrForceReprojectionToggle.checked = SteamVRTabController.forceReprojection
|
|
||||||
steamvrMotionSmoothingToggle.checked = SteamVRTabController.motionSmoothing
|
steamvrMotionSmoothingToggle.checked = SteamVRTabController.motionSmoothing
|
||||||
reloadSteamVRProfiles()
|
reloadSteamVRProfiles()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ static const char* vrsettings_compositor_category = "compositor";
|
|||||||
|
|
||||||
void SteamVRTabController::initStage1()
|
void SteamVRTabController::initStage1()
|
||||||
{
|
{
|
||||||
initMotionSmoothing();
|
initMotionSmoothing();
|
||||||
eventLoopTick();
|
eventLoopTick();
|
||||||
reloadSteamVRProfiles();
|
reloadSteamVRProfiles();
|
||||||
}
|
}
|
||||||
@@ -75,20 +75,13 @@ void SteamVRTabController::reloadSteamVRProfiles()
|
|||||||
entry.supersampleFiltering
|
entry.supersampleFiltering
|
||||||
= settings->value( "supersampleFiltering", true ).toBool();
|
= settings->value( "supersampleFiltering", true ).toBool();
|
||||||
}
|
}
|
||||||
entry.motionSmooth = settings->value("motionSmooth", true).toBool();
|
entry.includesMotionSmoothing
|
||||||
/*
|
= settings->value( "includesMotionSmoothing", false ).toBool();
|
||||||
entry.includesReprojectionSettings
|
if ( entry.includesMotionSmoothing )
|
||||||
= settings->value( "includesReprojectionSettings", false ).toBool();
|
|
||||||
if ( entry.includesReprojectionSettings )
|
|
||||||
{
|
{
|
||||||
entry.asynchronousReprojection
|
entry.motionSmooth
|
||||||
= settings->value( "asynchronousReprojection", true ).toBool();
|
= settings->value( "motionSmooth", true ).toBool();
|
||||||
entry.interleavedReprojection
|
|
||||||
= settings->value( "interleavedReprojection", true ).toBool();
|
|
||||||
entry.alwaysOnReprojection
|
|
||||||
= settings->value( "alwaysOnReprojection", true ).toBool();
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
settings->endArray();
|
settings->endArray();
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
@@ -117,20 +110,13 @@ void SteamVRTabController::saveSteamVRProfiles()
|
|||||||
settings->setValue( "supersampleFiltering",
|
settings->setValue( "supersampleFiltering",
|
||||||
p.supersampleFiltering );
|
p.supersampleFiltering );
|
||||||
}
|
}
|
||||||
settings->setValue("motionSmooth", p.motionSmooth);
|
settings->setValue( "includesMotionSmoothing",
|
||||||
/*
|
p.includesMotionSmoothing );
|
||||||
settings->setValue( "includesReprojectionSettings",
|
if ( p.includesMotionSmoothing )
|
||||||
p.includesReprojectionSettings );
|
|
||||||
if ( p.includesReprojectionSettings )
|
|
||||||
{
|
{
|
||||||
settings->setValue( "asynchronousReprojection",
|
settings->setValue( "motionSmooth", p.motionSmooth );
|
||||||
p.asynchronousReprojection );
|
|
||||||
settings->setValue( "interleavedReprojection",
|
|
||||||
p.interleavedReprojection );
|
|
||||||
settings->setValue( "alwaysOnReprojection",
|
|
||||||
p.alwaysOnReprojection );
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
settings->endArray();
|
settings->endArray();
|
||||||
@@ -217,47 +203,6 @@ void SteamVRTabController::eventLoopTick()
|
|||||||
<< m_compositorSuperSampling << " => " << css;
|
<< m_compositorSuperSampling << " => " << css;
|
||||||
setCompositorSuperSampling( css );
|
setCompositorSuperSampling( css );
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
auto air = vr::VRSettings()->GetBool(
|
|
||||||
vr::k_pch_SteamVR_Section,
|
|
||||||
vr::k_pch_SteamVR_AllowReprojection_Bool,
|
|
||||||
&vrSettingsError );
|
|
||||||
if ( vrSettingsError != vr::VRSettingsError_None )
|
|
||||||
{
|
|
||||||
LOG( WARNING ) << "Could not read \""
|
|
||||||
<< vr::k_pch_SteamVR_AllowReprojection_Bool
|
|
||||||
<< "\" setting: "
|
|
||||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
|
||||||
vrSettingsError );
|
|
||||||
}
|
|
||||||
setAllowInterleavedReprojection( air );
|
|
||||||
auto aar = vr::VRSettings()->GetBool(
|
|
||||||
vr::k_pch_SteamVR_Section,
|
|
||||||
vr::k_pch_SteamVR_AllowAsyncReprojection_Bool,
|
|
||||||
&vrSettingsError );
|
|
||||||
if ( vrSettingsError != vr::VRSettingsError_None )
|
|
||||||
{
|
|
||||||
LOG( WARNING ) << "Could not read \""
|
|
||||||
<< vr::k_pch_SteamVR_AllowAsyncReprojection_Bool
|
|
||||||
<< "\" setting: "
|
|
||||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
|
||||||
vrSettingsError );
|
|
||||||
}
|
|
||||||
setAllowAsyncReprojection( aar );
|
|
||||||
auto fr = vr::VRSettings()->GetBool(
|
|
||||||
vr::k_pch_SteamVR_Section,
|
|
||||||
vr::k_pch_SteamVR_ForceReprojection_Bool,
|
|
||||||
&vrSettingsError );
|
|
||||||
if ( vrSettingsError != vr::VRSettingsError_None )
|
|
||||||
{
|
|
||||||
LOG( WARNING ) << "Could not read \""
|
|
||||||
<< vr::k_pch_SteamVR_ForceReprojection_Bool
|
|
||||||
<< "\" setting: "
|
|
||||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
|
||||||
vrSettingsError );
|
|
||||||
}
|
|
||||||
setForceReprojection( fr );
|
|
||||||
*/
|
|
||||||
auto sf = vr::VRSettings()->GetBool(
|
auto sf = vr::VRSettings()->GetBool(
|
||||||
vr::k_pch_SteamVR_Section,
|
vr::k_pch_SteamVR_Section,
|
||||||
vrsettings_steamvr_allowSupersampleFiltering,
|
vrsettings_steamvr_allowSupersampleFiltering,
|
||||||
@@ -343,10 +288,9 @@ float SteamVRTabController::compositorSuperSampling() const
|
|||||||
return m_compositorSuperSampling;
|
return m_compositorSuperSampling;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SteamVRTabController::motionSmoothing() const
|
||||||
|
{
|
||||||
bool SteamVRTabController::motionSmoothing() const {
|
return m_motionSmoothing;
|
||||||
return m_motionSmoothing;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -362,22 +306,20 @@ Description:
|
|||||||
sets value of m_motionSmoothing AND applies changes in Steam/OpenVr
|
sets value of m_motionSmoothing AND applies changes in Steam/OpenVr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void SteamVRTabController::setMotionSmoothing(bool value,
|
void SteamVRTabController::setMotionSmoothing( bool value, bool notify )
|
||||||
bool notify)
|
|
||||||
{
|
{
|
||||||
if (m_motionSmoothing!= value)
|
if ( m_motionSmoothing != value )
|
||||||
{
|
{
|
||||||
m_motionSmoothing = value;
|
m_motionSmoothing = value;
|
||||||
vr::VRSettings()->SetBool(vr::k_pch_SteamVR_Section,
|
vr::VRSettings()->SetBool( vr::k_pch_SteamVR_Section,
|
||||||
vr::k_pch_SteamVR_MotionSmoothing_Bool,
|
vr::k_pch_SteamVR_MotionSmoothing_Bool,
|
||||||
m_motionSmoothing);
|
m_motionSmoothing );
|
||||||
vr::VRSettings()->Sync();
|
vr::VRSettings()->Sync();
|
||||||
if (notify)
|
if ( notify )
|
||||||
{
|
{
|
||||||
emit motionSmoothingChanged(
|
emit motionSmoothingChanged( m_motionSmoothing );
|
||||||
m_motionSmoothing);
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -391,95 +333,30 @@ Sets the member variable of motion smoothing for UI
|
|||||||
Adds error to log if unable to find variable.
|
Adds error to log if unable to find variable.
|
||||||
|
|
||||||
OnError:
|
OnError:
|
||||||
default value of true for motion smoothing is initialized, if user has disabled motion smoothing on their end,
|
default value of true for motion smoothing is initialized, if user has disabled
|
||||||
they will have to toggle the variable twice to get it to re-sync.
|
motion smoothing on their end, they will have to toggle the variable twice to
|
||||||
|
get it to re-sync.
|
||||||
*/
|
*/
|
||||||
void SteamVRTabController::initMotionSmoothing() {
|
void SteamVRTabController::initMotionSmoothing()
|
||||||
bool temporary = false;
|
|
||||||
vr::EVRSettingsError vrSettingsError;
|
|
||||||
temporary = vr::VRSettings()->GetBool(vr::k_pch_SteamVR_Section,
|
|
||||||
vr::k_pch_SteamVR_MotionSmoothing_Bool,
|
|
||||||
&vrSettingsError);
|
|
||||||
if (vrSettingsError != vr::VRSettingsError_None)
|
|
||||||
{
|
|
||||||
LOG(WARNING) << "Could not get MotionSmoothing State \""
|
|
||||||
<< vr::k_pch_SteamVR_MotionSmoothing_Bool << "\" setting: "
|
|
||||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
|
||||||
vrSettingsError);
|
|
||||||
}
|
|
||||||
vr::VRSettings()->Sync();
|
|
||||||
setMotionSmoothing(temporary, true);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
bool SteamVRTabController::allowInterleavedReprojection() const
|
|
||||||
{
|
{
|
||||||
return m_allowInterleavedReprojection;
|
bool temporary = false;
|
||||||
}
|
vr::EVRSettingsError vrSettingsError;
|
||||||
|
temporary
|
||||||
bool SteamVRTabController::allowAsyncReprojection() const
|
= vr::VRSettings()->GetBool( vr::k_pch_SteamVR_Section,
|
||||||
{
|
vr::k_pch_SteamVR_MotionSmoothing_Bool,
|
||||||
return m_allowAsyncReprojection;
|
&vrSettingsError );
|
||||||
}
|
if ( vrSettingsError != vr::VRSettingsError_None )
|
||||||
|
|
||||||
void SteamVRTabController::setAllowInterleavedReprojection( bool value,
|
|
||||||
bool notify )
|
|
||||||
{
|
|
||||||
if ( m_allowInterleavedReprojection != value )
|
|
||||||
{
|
{
|
||||||
m_allowInterleavedReprojection = value;
|
LOG( WARNING ) << "Could not get MotionSmoothing State \""
|
||||||
vr::VRSettings()->SetBool( vr::k_pch_SteamVR_Section,
|
<< vr::k_pch_SteamVR_MotionSmoothing_Bool
|
||||||
vr::k_pch_SteamVR_AllowReprojection_Bool,
|
<< "\" setting: "
|
||||||
m_allowInterleavedReprojection );
|
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
||||||
vr::VRSettings()->Sync();
|
vrSettingsError );
|
||||||
if ( notify )
|
|
||||||
{
|
|
||||||
emit allowInterleavedReprojectionChanged(
|
|
||||||
m_allowInterleavedReprojection );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
vr::VRSettings()->Sync();
|
||||||
|
setMotionSmoothing( temporary, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SteamVRTabController::setAllowAsyncReprojection( bool value, bool notify )
|
|
||||||
{
|
|
||||||
if ( m_allowAsyncReprojection != value )
|
|
||||||
{
|
|
||||||
m_allowAsyncReprojection = value;
|
|
||||||
vr::VRSettings()->SetBool(
|
|
||||||
vr::k_pch_SteamVR_Section,
|
|
||||||
vr::k_pch_SteamVR_AllowAsyncReprojection_Bool,
|
|
||||||
m_allowAsyncReprojection );
|
|
||||||
vr::VRSettings()->Sync();
|
|
||||||
if ( notify )
|
|
||||||
{
|
|
||||||
emit allowAsyncReprojectionChanged( m_allowAsyncReprojection );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SteamVRTabController::forceReprojection() const
|
|
||||||
{
|
|
||||||
return m_forceReprojection;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SteamVRTabController::setForceReprojection( bool value, bool notify )
|
|
||||||
{
|
|
||||||
if ( m_forceReprojection != value )
|
|
||||||
{
|
|
||||||
m_forceReprojection = value;
|
|
||||||
vr::VRSettings()->SetBool( vr::k_pch_SteamVR_Section,
|
|
||||||
vr::k_pch_SteamVR_ForceReprojection_Bool,
|
|
||||||
m_forceReprojection );
|
|
||||||
vr::VRSettings()->Sync();
|
|
||||||
if ( notify )
|
|
||||||
{
|
|
||||||
emit forceReprojectionChanged( m_forceReprojection );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
bool SteamVRTabController::allowSupersampleFiltering() const
|
bool SteamVRTabController::allowSupersampleFiltering() const
|
||||||
{
|
{
|
||||||
return m_allowSupersampleFiltering;
|
return m_allowSupersampleFiltering;
|
||||||
@@ -532,47 +409,7 @@ void SteamVRTabController::reset()
|
|||||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
||||||
vrSettingsError );
|
vrSettingsError );
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
vr::VRSettings()->RemoveKeyInSection(
|
|
||||||
vr::k_pch_SteamVR_Section,
|
|
||||||
vr::k_pch_SteamVR_AllowReprojection_Bool,
|
|
||||||
&vrSettingsError );
|
|
||||||
if ( vrSettingsError != vr::VRSettingsError_None )
|
|
||||||
{
|
|
||||||
LOG( WARNING ) << "Could not remove \""
|
|
||||||
<< vr::k_pch_SteamVR_AllowReprojection_Bool
|
|
||||||
<< "\" setting: "
|
|
||||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
|
||||||
vrSettingsError );
|
|
||||||
}
|
|
||||||
|
|
||||||
vr::VRSettings()->RemoveKeyInSection(
|
|
||||||
vr::k_pch_SteamVR_Section,
|
|
||||||
vr::k_pch_SteamVR_AllowAsyncReprojection_Bool,
|
|
||||||
&vrSettingsError );
|
|
||||||
if ( vrSettingsError != vr::VRSettingsError_None )
|
|
||||||
{
|
|
||||||
LOG( WARNING ) << "Could not remove \""
|
|
||||||
<< vr::k_pch_SteamVR_AllowAsyncReprojection_Bool
|
|
||||||
<< "\" setting: "
|
|
||||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
|
||||||
vrSettingsError );
|
|
||||||
}
|
|
||||||
|
|
||||||
vr::VRSettings()->RemoveKeyInSection(
|
|
||||||
vr::k_pch_SteamVR_Section,
|
|
||||||
vr::k_pch_SteamVR_ForceReprojection_Bool,
|
|
||||||
&vrSettingsError );
|
|
||||||
if ( vrSettingsError != vr::VRSettingsError_None )
|
|
||||||
{
|
|
||||||
LOG( WARNING ) << "Could not remove \""
|
|
||||||
<< vr::k_pch_SteamVR_ForceReprojection_Bool
|
|
||||||
<< "\" setting: "
|
|
||||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
|
||||||
vrSettingsError );
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
vr::VRSettings()->RemoveKeyInSection(
|
vr::VRSettings()->RemoveKeyInSection(
|
||||||
vr::k_pch_SteamVR_Section,
|
vr::k_pch_SteamVR_Section,
|
||||||
vrsettings_steamvr_allowSupersampleFiltering,
|
vrsettings_steamvr_allowSupersampleFiltering,
|
||||||
@@ -601,7 +438,8 @@ void SteamVRTabController::restartSteamVR()
|
|||||||
|
|
||||||
void SteamVRTabController::addSteamVRProfile( QString name,
|
void SteamVRTabController::addSteamVRProfile( QString name,
|
||||||
bool includeSupersampling,
|
bool includeSupersampling,
|
||||||
bool includeSupersampleFiltering)
|
bool includeSupersampleFiltering,
|
||||||
|
bool includeMotionSmoothing )
|
||||||
{
|
{
|
||||||
SteamVRProfile* profile = nullptr;
|
SteamVRProfile* profile = nullptr;
|
||||||
for ( auto& p : steamvrProfiles )
|
for ( auto& p : steamvrProfiles )
|
||||||
@@ -629,20 +467,15 @@ void SteamVRTabController::addSteamVRProfile( QString name,
|
|||||||
{
|
{
|
||||||
profile->supersampleFiltering = m_allowSupersampleFiltering;
|
profile->supersampleFiltering = m_allowSupersampleFiltering;
|
||||||
}
|
}
|
||||||
profile->motionSmooth = m_motionSmoothing;
|
profile->includesMotionSmoothing = includeMotionSmoothing;
|
||||||
/*
|
if ( includeMotionSmoothing )
|
||||||
profile->includesReprojectionSettings = includeReprojectionSettings;
|
|
||||||
if ( includeReprojectionSettings )
|
|
||||||
{
|
{
|
||||||
profile->asynchronousReprojection = m_allowAsyncReprojection;
|
profile->motionSmooth = m_motionSmoothing;
|
||||||
profile->interleavedReprojection = m_allowInterleavedReprojection;
|
|
||||||
profile->alwaysOnReprojection = m_forceReprojection;
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
saveSteamVRProfiles();
|
saveSteamVRProfiles();
|
||||||
OverlayController::appSettings()->sync();
|
OverlayController::appSettings()->sync();
|
||||||
emit steamVRProfilesUpdated();
|
emit steamVRProfilesUpdated();
|
||||||
emit steamVRProfileAdded();
|
emit steamVRProfileAdded();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SteamVRTabController::applySteamVRProfile( unsigned index )
|
void SteamVRTabController::applySteamVRProfile( unsigned index )
|
||||||
@@ -658,15 +491,10 @@ void SteamVRTabController::applySteamVRProfile( unsigned index )
|
|||||||
{
|
{
|
||||||
setAllowSupersampleFiltering( profile.supersampleFiltering );
|
setAllowSupersampleFiltering( profile.supersampleFiltering );
|
||||||
}
|
}
|
||||||
setMotionSmoothing(profile.motionSmooth);
|
if ( profile.includesMotionSmoothing )
|
||||||
/*
|
|
||||||
if ( profile.includesReprojectionSettings )
|
|
||||||
{
|
{
|
||||||
setAllowAsyncReprojection( profile.asynchronousReprojection );
|
setMotionSmoothing( profile.motionSmooth );
|
||||||
setAllowInterleavedReprojection( profile.interleavedReprojection );
|
|
||||||
setForceReprojection( profile.alwaysOnReprojection );
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
vr::VRSettings()->Sync( true );
|
vr::VRSettings()->Sync( true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,12 +19,8 @@ struct SteamVRProfile
|
|||||||
|
|
||||||
bool includesSupersampleFiltering = false;
|
bool includesSupersampleFiltering = false;
|
||||||
bool supersampleFiltering = false;
|
bool supersampleFiltering = false;
|
||||||
bool motionSmooth = false;
|
bool motionSmooth = false;
|
||||||
|
bool includesMotionSmoothing = false;
|
||||||
//bool includesReprojectionSettings = false;
|
|
||||||
//bool asynchronousReprojection = true;
|
|
||||||
//bool interleavedReprojection = true;
|
|
||||||
//bool alwaysOnReprojection = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class SteamVRTabController : public QObject
|
class SteamVRTabController : public QObject
|
||||||
@@ -35,21 +31,9 @@ class SteamVRTabController : public QObject
|
|||||||
Q_PROPERTY(
|
Q_PROPERTY(
|
||||||
float compositorSuperSampling READ compositorSuperSampling WRITE
|
float compositorSuperSampling READ compositorSuperSampling WRITE
|
||||||
setCompositorSuperSampling NOTIFY compositorSuperSamplingChanged )
|
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 )
|
|
||||||
*/
|
|
||||||
|
|
||||||
Q_PROPERTY(bool motionSmoothing READ motionSmoothing
|
Q_PROPERTY( bool motionSmoothing READ motionSmoothing WRITE
|
||||||
WRITE setMotionSmoothing NOTIFY
|
setMotionSmoothing NOTIFY motionSmoothingChanged )
|
||||||
motionSmoothingChanged)
|
|
||||||
Q_PROPERTY( bool allowSupersampleFiltering READ allowSupersampleFiltering
|
Q_PROPERTY( bool allowSupersampleFiltering READ allowSupersampleFiltering
|
||||||
WRITE setAllowSupersampleFiltering NOTIFY
|
WRITE setAllowSupersampleFiltering NOTIFY
|
||||||
allowSupersampleFilteringChanged )
|
allowSupersampleFilteringChanged )
|
||||||
@@ -60,13 +44,10 @@ private:
|
|||||||
|
|
||||||
float m_superSampling = 1.0;
|
float m_superSampling = 1.0;
|
||||||
float m_compositorSuperSampling = 1.0;
|
float m_compositorSuperSampling = 1.0;
|
||||||
//bool m_allowInterleavedReprojection = true;
|
bool m_motionSmoothing = true;
|
||||||
//bool m_allowAsyncReprojection = true;
|
|
||||||
//bool m_forceReprojection = false;
|
|
||||||
bool m_motionSmoothing = true;
|
|
||||||
bool m_allowSupersampleFiltering = true;
|
bool m_allowSupersampleFiltering = true;
|
||||||
|
|
||||||
void initMotionSmoothing();
|
void initMotionSmoothing();
|
||||||
|
|
||||||
std::vector<SteamVRProfile> steamvrProfiles;
|
std::vector<SteamVRProfile> steamvrProfiles;
|
||||||
|
|
||||||
@@ -80,10 +61,7 @@ public:
|
|||||||
|
|
||||||
float superSampling() const;
|
float superSampling() const;
|
||||||
float compositorSuperSampling() const;
|
float compositorSuperSampling() const;
|
||||||
//bool allowInterleavedReprojection() const;
|
bool motionSmoothing() const;
|
||||||
//bool allowAsyncReprojection() const;
|
|
||||||
//bool forceReprojection() const;
|
|
||||||
bool motionSmoothing() const;
|
|
||||||
bool allowSupersampleFiltering() const;
|
bool allowSupersampleFiltering() const;
|
||||||
|
|
||||||
void reloadSteamVRProfiles();
|
void reloadSteamVRProfiles();
|
||||||
@@ -95,15 +73,13 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
void setSuperSampling( float value, bool notify = true );
|
void setSuperSampling( float value, bool notify = true );
|
||||||
void setCompositorSuperSampling( float value, bool notify = true );
|
void setCompositorSuperSampling( float value, bool notify = true );
|
||||||
//void setAllowInterleavedReprojection( bool value, bool notify = true );
|
void setMotionSmoothing( bool value, bool notify = true );
|
||||||
//void setAllowAsyncReprojection( bool value, bool notify = true );
|
|
||||||
//void setForceReprojection( bool value, bool notify = true );
|
|
||||||
void setMotionSmoothing(bool value, bool notify = true);
|
|
||||||
void setAllowSupersampleFiltering( bool value, bool notify = true );
|
void setAllowSupersampleFiltering( bool value, bool notify = true );
|
||||||
|
|
||||||
void addSteamVRProfile( QString name,
|
void addSteamVRProfile( QString name,
|
||||||
bool includeSupersampling,
|
bool includeSupersampling,
|
||||||
bool includeSupersampleFiltering);
|
bool includeSupersampleFiltering,
|
||||||
|
bool includeMotionSmoothing );
|
||||||
void applySteamVRProfile( unsigned index );
|
void applySteamVRProfile( unsigned index );
|
||||||
void deleteSteamVRProfile( unsigned index );
|
void deleteSteamVRProfile( unsigned index );
|
||||||
|
|
||||||
@@ -113,14 +89,11 @@ public slots:
|
|||||||
signals:
|
signals:
|
||||||
void superSamplingChanged( float value );
|
void superSamplingChanged( float value );
|
||||||
void compositorSuperSamplingChanged( float value );
|
void compositorSuperSamplingChanged( float value );
|
||||||
//void allowInterleavedReprojectionChanged( bool value );
|
void motionSmoothingChanged( bool value );
|
||||||
//void allowAsyncReprojectionChanged( bool value );
|
|
||||||
//void forceReprojectionChanged( bool value );
|
|
||||||
void motionSmoothingChanged(bool value);
|
|
||||||
void allowSupersampleFilteringChanged( bool value );
|
void allowSupersampleFilteringChanged( bool value );
|
||||||
|
|
||||||
void steamVRProfilesUpdated();
|
void steamVRProfilesUpdated();
|
||||||
void steamVRProfileAdded();
|
void steamVRProfileAdded();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace advsettings
|
} // namespace advsettings
|
||||||
|
|||||||
Reference in New Issue
Block a user