本文整理汇总了C++中TAutoConsoleVariable::AsVariable方法的典型用法代码示例。如果您正苦于以下问题:C++ TAutoConsoleVariable::AsVariable方法的具体用法?C++ TAutoConsoleVariable::AsVariable怎么用?C++ TAutoConsoleVariable::AsVariable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TAutoConsoleVariable
的用法示例。
在下文中一共展示了TAutoConsoleVariable::AsVariable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ApplyOverrides
void FSystemSettings::ApplyOverrides()
{
EConsoleVariableFlags SetBy = ECVF_SetByMask;
if (FPlatformProperties::SupportsWindowedMode())
{
if (CVarUseMaxQualityMode.GetValueOnGameThread() != 0)
{
SetBy = (EConsoleVariableFlags)(CVarUseMaxQualityMode.AsVariable()->GetFlags() & ECVF_SetByMask);
}
if (FParse::Param(FCommandLine::Get(),TEXT("MAXQUALITYMODE")))
{
SetBy = ECVF_SetByCommandline;
}
}
if (SetBy != ECVF_SetByMask)
{
// Modify various system settings to get the best quality regardless of performance impact
{
static auto CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Shadow.MinResolution"));
CVar->Set(16, SetBy);
}
// Disable shadow fading out over distance
{
static auto CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Shadow.FadeResolution"));
CVar->Set(1, SetBy);
}
// Increase minimum preshadow resolution
{
static auto CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Shadow.MinPreShadowResolution"));
CVar->Set(16, SetBy);
}
// Disable preshadow fading out over distance
{
static auto CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Shadow.PreShadowFadeResolution"));
CVar->Set(1, SetBy);
}
// Increase shadow texel density
{
static auto CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Shadow.TexelsPerPixel"));
CVar->Set(4.0f, SetBy);
}
// Don't downsample preshadows
{
static auto CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Shadow.PreShadowResolutionFactor"));
CVar->Set(1.0f, SetBy);
}
}
}
示例2: EnableInvalidationDebugging
void SInvalidationPanel::EnableInvalidationDebugging(bool bEnable)
{
InvalidationDebugging.AsVariable()->Set(bEnable);
}
示例3: ApplyOverrides
void FSystemSettings::ApplyOverrides()
{
EConsoleVariableFlags SetBy = ECVF_SetByMask;
if (FPlatformProperties::SupportsWindowedMode())
{
if (CVarUseMaxQualityMode.GetValueOnGameThread() != 0)
{
SetBy = (EConsoleVariableFlags)(CVarUseMaxQualityMode.AsVariable()->GetFlags() & ECVF_SetByMask);
}
if (FParse::Param(FCommandLine::Get(),TEXT("MAXQUALITYMODE")))
{
SetBy = ECVF_SetByCommandline;
}
}
if (SetBy != ECVF_SetByMask)
{
// Modify various system settings to get the best quality regardless of performance impact
{
static auto CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Shadow.MinResolution"));
CVar->Set(16, SetBy);
}
// Disable shadow fading out over distance
{
static auto CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Shadow.FadeResolution"));
CVar->Set(1, SetBy);
}
// Increase minimum preshadow resolution
{
static auto CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Shadow.MinPreShadowResolution"));
CVar->Set(16, SetBy);
}
// Disable preshadow fading out over distance
{
static auto CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Shadow.PreShadowFadeResolution"));
CVar->Set(1, SetBy);
}
// Increase shadow texel density
{
static auto CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Shadow.TexelsPerPixel"));
CVar->Set(4.0f, SetBy);
}
// Don't downsample preshadows
{
static auto CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Shadow.PreShadowResolutionFactor"));
CVar->Set(1.0f, SetBy);
}
for (int32 GroupIndex = 0; GroupIndex < TEXTUREGROUP_MAX; GroupIndex++)
{
FTextureLODSettings::FTextureLODGroup& CurrentGroup = TextureLODSettings.GetTextureLODGroup(GroupIndex);
// Use the best quality texture filtering
CurrentGroup.Filter = SF_AnisotropicLinear;
// Raise texture max sizes to 4096
CurrentGroup.MinLODMipCount = 12;
CurrentGroup.MaxLODMipCount = 12;
CurrentGroup.LODBias = -1000;
}
}
}