44 lines
1.4 KiB
C
44 lines
1.4 KiB
C
|
// @lint-ignore-every LICENSELINT
|
||
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
||
|
|
||
|
#pragma once
|
||
|
#include "OculusXRHMDPrivate.h"
|
||
|
|
||
|
#if OCULUS_HMD_SUPPORTED_PLATFORMS
|
||
|
#include "OculusXRHMD_Settings.h"
|
||
|
#include "DynamicResolutionState.h"
|
||
|
|
||
|
namespace OculusXRHMD
|
||
|
{
|
||
|
|
||
|
//-------------------------------------------------------------------------------------------------
|
||
|
// FDynamicResolutionState
|
||
|
//-------------------------------------------------------------------------------------------------
|
||
|
|
||
|
class FDynamicResolutionState : public IDynamicResolutionState
|
||
|
{
|
||
|
public:
|
||
|
FDynamicResolutionState(const OculusXRHMD::FSettingsPtr InSettings);
|
||
|
|
||
|
// ISceneViewFamilyScreenPercentage
|
||
|
virtual void ResetHistory() override;
|
||
|
virtual bool IsSupported() const override;
|
||
|
virtual void SetupMainViewFamily(class FSceneViewFamily& ViewFamily) override;
|
||
|
|
||
|
protected:
|
||
|
virtual DynamicRenderScaling::TMap<float> GetResolutionFractionsApproximation() const override;
|
||
|
virtual DynamicRenderScaling::TMap<float> GetResolutionFractionsUpperBound() const override;
|
||
|
virtual void SetEnabled(bool bEnable) override;
|
||
|
virtual bool IsEnabled() const override;
|
||
|
virtual void ProcessEvent(EDynamicResolutionStateEvent Event) override;
|
||
|
|
||
|
private:
|
||
|
const OculusXRHMD::FSettingsPtr Settings;
|
||
|
float ResolutionFraction;
|
||
|
float ResolutionFractionUpperBound;
|
||
|
};
|
||
|
|
||
|
} // namespace OculusXRHMD
|
||
|
|
||
|
#endif //OCULUS_HMD_SUPPORTED_PLATFORMS
|