the MaterialPreviewRenderer now properly clears the cache before rendering a preview

This commit is contained in:
Nehon 2015-01-26 18:35:42 +01:00
parent 98f0d2c08a
commit 4668621c95

View File

@ -126,8 +126,8 @@ public class MaterialPreviewRenderer implements SceneListener {
public Material reloadMaterial(Material mat, DesktopAssetManager assetManager) {
// MaterialKey key = new MaterialKey(mat.getMaterialDef().getAssetName());
// assetManager.deleteFromCache(key);
MaterialKey key = new MaterialKey(mat.getMaterialDef().getAssetName());
assetManager.deleteFromCache(key);
//creating a dummy mat with the mat def of the mat to reload
Material dummy = new Material(mat.getMaterialDef());