Skip to content

Commit

Permalink
ResourceSystem: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Dec 10, 2013
1 parent 3a98e53 commit 895b4f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 4 additions & 0 deletions doomsday/client/src/dd_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1727,6 +1727,8 @@ boolean DD_Init(void)
#ifdef __CLIENT__
GL_Init();
GL_InitRefresh();
App_ResourceSystem().clearAllTextureSpecs();
App_ResourceSystem().initSystemTextures();
LensFx_Init();
#endif

Expand Down Expand Up @@ -2102,6 +2104,8 @@ static int DD_UpdateEngineStateWorker(void *context)
if(!novideo)
{
GL_InitRefresh();
App_ResourceSystem().clearAllTextureSpecs();
App_ResourceSystem().initSystemTextures();
}
#endif

Expand Down
8 changes: 1 addition & 7 deletions doomsday/client/src/gl/gl_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,21 +364,15 @@ void GL_Init()
void GL_InitRefresh()
{
if(novideo) return;
GL_InitTextureManager();
App_ResourceSystem().clearAllTextureSpecs();

// Register/create Texture objects for the system textures.
App_ResourceSystem().initSystemTextures();
GL_InitTextureManager();

initFullGLOk = true;
}

void GL_ShutdownRefresh()
{
initFullGLOk = false;

App_ResourceSystem().clearAllColorPalettes();
App_ResourceSystem().clearAllTextureSpecs();
}

void GL_Shutdown()
Expand Down
2 changes: 2 additions & 0 deletions doomsday/client/src/resource/resourcesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,15 @@ DENG2_PIMPL(ResourceSystem)
clearMaterialManifests();

#ifdef __CLIENT__
clearAllTextureSpecs();
clearMaterialSpecs();
#endif

clearSprites();
#ifdef __CLIENT__
clearModels();
#endif
self.clearAllColorPalettes();
}

inline de::FS1 &fileSystem()
Expand Down

0 comments on commit 895b4f7

Please sign in to comment.