Changeset View
Changeset View
Standalone View
Standalone View
source/ps/GameSetup/GameSetup.cpp
Show First 20 Lines • Show All 587 Lines • ▼ Show 20 Lines | |||||
static void InitRenderer() | static void InitRenderer() | ||||
{ | { | ||||
TIMER(L"InitRenderer"); | TIMER(L"InitRenderer"); | ||||
// create renderer | // create renderer | ||||
new CRenderer; | new CRenderer; | ||||
g_RenderingOptions.ReadConfig(); | |||||
// create terrain related stuff | // create terrain related stuff | ||||
new CTerrainTextureManager; | new CTerrainTextureManager; | ||||
g_RenderingOptions.ReadConfigAndSetupHooks(); | |||||
g_Renderer.Open(g_xres, g_yres); | g_Renderer.Open(g_xres, g_yres); | ||||
// Setup lighting environment. Since the Renderer accesses the | // Setup lighting environment. Since the Renderer accesses the | ||||
// lighting environment through a pointer, this has to be done before | // lighting environment through a pointer, this has to be done before | ||||
// the first Frame. | // the first Frame. | ||||
g_Renderer.SetLightEnv(&g_LightEnv); | g_Renderer.SetLightEnv(&g_LightEnv); | ||||
// I haven't seen the camera affecting GUI rendering and such, but the | // I haven't seen the camera affecting GUI rendering and such, but the | ||||
▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | void Shutdown(int flags) | ||||
if (hasRenderer) | if (hasRenderer) | ||||
{ | { | ||||
TIMER_BEGIN(L"shutdown Renderer"); | TIMER_BEGIN(L"shutdown Renderer"); | ||||
g_Renderer.~CRenderer(); | g_Renderer.~CRenderer(); | ||||
g_VBMan.Shutdown(); | g_VBMan.Shutdown(); | ||||
TIMER_END(L"shutdown Renderer"); | TIMER_END(L"shutdown Renderer"); | ||||
} | } | ||||
g_RenderingOptions.ClearHooks(); | |||||
g_Profiler2.ShutdownGPU(); | g_Profiler2.ShutdownGPU(); | ||||
// Free cursors before shutting down SDL, as they may depend on SDL. | // Free cursors before shutting down SDL, as they may depend on SDL. | ||||
cursor_shutdown(); | cursor_shutdown(); | ||||
TIMER_BEGIN(L"shutdown SDL"); | TIMER_BEGIN(L"shutdown SDL"); | ||||
ShutdownSDL(); | ShutdownSDL(); | ||||
TIMER_END(L"shutdown SDL"); | TIMER_END(L"shutdown SDL"); | ||||
▲ Show 20 Lines • Show All 931 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator