From c0e85b325545b27653db9228a4c7d97b29f51946 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Wed, 18 Mar 2015 23:15:57 -0400 Subject: [PATCH] MaterialDebug: remove DesktopAssetManager dependency --- .../main/java/com/jme3/util/MaterialDebugAppState.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/util/MaterialDebugAppState.java b/jme3-core/src/main/java/com/jme3/util/MaterialDebugAppState.java index 1c512e41b..6197aca35 100644 --- a/jme3-core/src/main/java/com/jme3/util/MaterialDebugAppState.java +++ b/jme3-core/src/main/java/com/jme3/util/MaterialDebugAppState.java @@ -36,7 +36,7 @@ import com.jme3.app.state.AbstractAppState; import com.jme3.app.state.AppStateManager; import com.jme3.asset.AssetInfo; import com.jme3.asset.AssetKey; -import com.jme3.asset.DesktopAssetManager; +import com.jme3.asset.AssetManager; import com.jme3.asset.plugins.UrlAssetInfo; import com.jme3.input.InputManager; import com.jme3.input.controls.ActionListener; @@ -96,7 +96,7 @@ import java.util.logging.Logger; public class MaterialDebugAppState extends AbstractAppState { private RenderManager renderManager; - private DesktopAssetManager assetManager; + private AssetManager assetManager; private InputManager inputManager; private List bindings = new ArrayList(); private Map> fileTriggers = new HashMap> (); @@ -105,7 +105,7 @@ public class MaterialDebugAppState extends AbstractAppState { @Override public void initialize(AppStateManager stateManager, Application app) { renderManager = app.getRenderManager(); - assetManager = (DesktopAssetManager) app.getAssetManager(); + assetManager = app.getAssetManager(); inputManager = app.getInputManager(); for (Binding binding : bindings) { bind(binding); @@ -197,7 +197,7 @@ public class MaterialDebugAppState extends AbstractAppState { public Material reloadMaterial(Material mat) { //clear the entire cache, there might be more clever things to do, like clearing only the matdef, and the associated shaders. - ((DesktopAssetManager) assetManager).clearCache(); + assetManager.clearCache(); //creating a dummy mat with the mat def of the mat to reload Material dummy = new Material(mat.getMaterialDef());