Skip to content

Commit

Permalink
Resources: Clear all materials when a new game is loaded
Browse files Browse the repository at this point in the history
It is presently necessary to clear all materials from the resource
system when loading a new game.

Todo for later: It should only be necessary to clear the "runtime"
(i.e., game) materials rather than all of them.
  • Loading branch information
danij-deng committed Dec 12, 2013
1 parent 8c64e8e commit 1ba7a3e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doomsday/client/src/dd_main.cpp
Expand Up @@ -1413,6 +1413,9 @@ bool App_ChangeGame(Game &game, bool allowReload)
FI_Shutdown();
titleFinale = 0; // If the title finale was in progress it isn't now.

/// @todo The entire material collection should not be destroyed during a reload.
App_ResourceSystem().clearAllMaterialSchemes();

if(!game.isNull())
{
LOG_VERBOSE("Selecting game '%s'...") << Str_Text(game.identityKey());
Expand Down

0 comments on commit 1ba7a3e

Please sign in to comment.