Ticket #3737: initRenderer.patch
File initRenderer.patch, 3.5 KB (added by , 8 years ago) |
---|
-
source/ps/ConfigDB.cpp
189 189 it->second[0] = value; 190 190 } 191 191 192 void CConfigDB::SetValueBool(EConfigNamespace ns, const CStr& name, const bool value) 193 { 194 CStr valueString = value ? "true" : "false"; 195 SetValueString(ns, name, valueString); 196 } 197 192 198 void CConfigDB::SetConfigFile(EConfigNamespace ns, const VfsPath& path) 193 199 { 194 200 CHECK_NS(;); -
source/ps/ConfigDB.h
96 96 * existed the value is replaced. 97 97 */ 98 98 void SetValueString(EConfigNamespace ns, const CStr& name, const CStr& value); 99 100 void SetValueBool(EConfigNamespace ns, const CStr& name, const bool value); 99 101 100 102 /** 101 103 * Set the path to the config file used to populate the specified namespace -
source/ps/GameSetup/GameSetup.cpp
605 605 new CRenderer; 606 606 607 607 // set renderer options from command line options - NOVBO must be set before opening the renderer 608 // and init them in the ConfigDB when needed 608 609 g_Renderer.SetOptionBool(CRenderer::OPT_NOVBO, g_NoGLVBO); 609 610 g_Renderer.SetOptionBool(CRenderer::OPT_SHADOWS, g_Shadows); 611 g_ConfigDB.SetValueBool(CFG_SYSTEM, "shadows", g_Shadows); 610 612 611 613 g_Renderer.SetOptionBool(CRenderer::OPT_WATERUGLY, g_WaterUgly); 614 g_ConfigDB.SetValueBool(CFG_SYSTEM, "waterugly", g_WaterUgly); 612 615 g_Renderer.SetOptionBool(CRenderer::OPT_WATERFANCYEFFECTS, g_WaterFancyEffects); 616 g_ConfigDB.SetValueBool(CFG_SYSTEM, "waterfancyeffects", g_WaterFancyEffects); 613 617 g_Renderer.SetOptionBool(CRenderer::OPT_WATERREALDEPTH, g_WaterRealDepth); 618 g_ConfigDB.SetValueBool(CFG_SYSTEM, "waterrealdepth", g_WaterRealDepth); 614 619 g_Renderer.SetOptionBool(CRenderer::OPT_WATERREFLECTION, g_WaterReflection); 620 g_ConfigDB.SetValueBool(CFG_SYSTEM, "waterreflection", g_WaterReflection); 615 621 g_Renderer.SetOptionBool(CRenderer::OPT_WATERREFRACTION, g_WaterRefraction); 622 g_ConfigDB.SetValueBool(CFG_SYSTEM, "waterrefraction", g_WaterRefraction); 616 623 g_Renderer.SetOptionBool(CRenderer::OPT_SHADOWSONWATER, g_WaterShadows); 624 g_ConfigDB.SetValueBool(CFG_SYSTEM, "watershadows", g_WaterShadows); 617 625 618 626 g_Renderer.SetRenderPath(CRenderer::GetRenderPathByName(g_RenderPath)); 619 627 g_Renderer.SetOptionBool(CRenderer::OPT_SHADOWPCF, g_ShadowPCF); 628 g_ConfigDB.SetValueBool(CFG_SYSTEM, "shadowpcf", g_ShadowPCF); 620 629 g_Renderer.SetOptionBool(CRenderer::OPT_PARTICLES, g_Particles); 630 g_ConfigDB.SetValueBool(CFG_SYSTEM, "particles", g_Particles); 621 631 g_Renderer.SetOptionBool(CRenderer::OPT_SILHOUETTES, g_Silhouettes); 632 g_ConfigDB.SetValueBool(CFG_SYSTEM, "silhouettes", g_Silhouettes); 622 633 g_Renderer.SetOptionBool(CRenderer::OPT_SHOWSKY, g_ShowSky); 634 g_ConfigDB.SetValueBool(CFG_SYSTEM, "showsky", g_ShowSky); 623 635 g_Renderer.SetOptionBool(CRenderer::OPT_PREFERGLSL, g_PreferGLSL); 636 g_ConfigDB.SetValueBool(CFG_SYSTEM, "preferglsl", g_PreferGLSL); 624 637 g_Renderer.SetOptionBool(CRenderer::OPT_POSTPROC, g_PostProc); 638 g_ConfigDB.SetValueBool(CFG_SYSTEM, "postproc", g_PostProc); 625 639 g_Renderer.SetOptionBool(CRenderer::OPT_SMOOTHLOS, g_SmoothLOS); 640 g_ConfigDB.SetValueBool(CFG_SYSTEM, "smoothlos", g_SmoothLOS); 626 641 627 642 // create terrain related stuff 628 643 new CTerrainTextureManager;