本文整理汇总了C++中CGameSettings::GetDrawDistance方法的典型用法代码示例。如果您正苦于以下问题:C++ CGameSettings::GetDrawDistance方法的具体用法?C++ CGameSettings::GetDrawDistance怎么用?C++ CGameSettings::GetDrawDistance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGameSettings
的用法示例。
在下文中一共展示了CGameSettings::GetDrawDistance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetDxStatus
////////////////////////////////////////////////////////////////
//
// CRenderItemManager::GetDxStatus
//
//
//
////////////////////////////////////////////////////////////////
void CRenderItemManager::GetDxStatus ( SDxStatus& outStatus )
{
outStatus.testMode = m_TestMode;
// Copy hardware settings
outStatus.videoCard.strName = m_strVideoCardName;
outStatus.videoCard.iInstalledMemoryKB = m_iVideoCardMemoryKBTotal;
outStatus.videoCard.strPSVersion = m_strVideoCardPSVersion;
outStatus.videoCard.depthBufferFormat = m_depthBufferFormat;
outStatus.videoCard.iMaxAnisotropy = g_pDeviceState->AdapterState.MaxAnisotropicSetting;
outStatus.videoCard.iNumSimultaneousRTs = g_pDeviceState->DeviceCaps.NumSimultaneousRTs;
// State
outStatus.state.iNumShadersUsingReadableDepthBuffer = m_ShadersUsingDepthBuffer.size();
// Memory usage
outStatus.videoMemoryKB.iFreeForMTA = m_iMemoryKBFreeForMTA;
outStatus.videoMemoryKB.iUsedByFonts = m_iFontMemoryKBUsed;
outStatus.videoMemoryKB.iUsedByTextures = m_iTextureMemoryKBUsed;
outStatus.videoMemoryKB.iUsedByRenderTargets = m_iRenderTargetMemoryKBUsed;
// Option settings
CGameSettings* gameSettings = CCore::GetSingleton ().GetGame ()->GetSettings ();
outStatus.settings.bWindowed = GetVideoModeManager()->IsDisplayModeWindowed();
outStatus.settings.iFullScreenStyle = GetVideoModeManager()->GetFullScreenStyle();
outStatus.settings.iFXQuality = gameSettings->GetFXQuality(); ;
outStatus.settings.iDrawDistance = ( gameSettings->GetDrawDistance () - 0.925f ) / 0.8749f * 100;
outStatus.settings.iAntiAliasing = gameSettings->GetAntiAliasing() - 1;
outStatus.settings.bVolumetricShadows = false;
outStatus.settings.bAllowScreenUpload = true;
outStatus.settings.iStreamingMemory = 0;
outStatus.settings.bGrassEffect = false;
outStatus.settings.bHeatHaze = false;
outStatus.settings.iAnisotropicFiltering = 0;
outStatus.settings.aspectRatio = gameSettings->GetAspectRatio ();
outStatus.settings.bHUDMatchAspectRatio = true;
outStatus.settings.fFieldOfView = 70;
outStatus.settings.bHighDetailVehicles = false;
CVARS_GET ( "streaming_memory", outStatus.settings.iStreamingMemory );
CVARS_GET ( "volumetric_shadows", outStatus.settings.bVolumetricShadows );
CVARS_GET ( "allow_screen_upload", outStatus.settings.bAllowScreenUpload );
CVARS_GET ( "grass", outStatus.settings.bGrassEffect );
CVARS_GET ( "heat_haze", outStatus.settings.bHeatHaze );
CVARS_GET ( "anisotropic", outStatus.settings.iAnisotropicFiltering );
CVARS_GET ( "hud_match_aspect_ratio", outStatus.settings.bHUDMatchAspectRatio );
CVARS_GET ( "fov", outStatus.settings.fFieldOfView );
CVARS_GET ( "high_detail_vehicles", outStatus.settings.bHighDetailVehicles );
if ( outStatus.settings.iFXQuality == 0 )
{
// These are always off with low fx quality
outStatus.settings.bVolumetricShadows = false;
outStatus.settings.bGrassEffect = false;
}
// Display color depth
D3DFORMAT BackBufferFormat = g_pDeviceState->CreationState.PresentationParameters.BackBufferFormat;
if ( BackBufferFormat >= D3DFMT_R5G6B5 && BackBufferFormat < D3DFMT_A8R3G3B2 )
outStatus.settings.b32BitColor = 0;
else
outStatus.settings.b32BitColor = 1;
// Modify if using test mode
if ( m_TestMode == DX_TEST_MODE_NO_MEM )
outStatus.videoMemoryKB.iFreeForMTA = 0;
if ( m_TestMode == DX_TEST_MODE_LOW_MEM )
outStatus.videoMemoryKB.iFreeForMTA = 1;
if ( m_TestMode == DX_TEST_MODE_NO_SHADER )
outStatus.videoCard.strPSVersion = "0";
}