From c212fab37a7c20dcb42534124c866d7c990bdb56 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Sun, 1 Feb 2015 17:22:12 -0500 Subject: [PATCH] Deprecate TechniqueDef.isUsingShaders(). Do not use it anywhere in the engine. --- .../jme3tools/shadercheck/ShaderCheck.java | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/jme3-core/src/tools/java/jme3tools/shadercheck/ShaderCheck.java b/jme3-core/src/tools/java/jme3tools/shadercheck/ShaderCheck.java index 24dfab3c4..ddd2993e8 100644 --- a/jme3-core/src/tools/java/jme3tools/shadercheck/ShaderCheck.java +++ b/jme3-core/src/tools/java/jme3tools/shadercheck/ShaderCheck.java @@ -36,23 +36,21 @@ public class ShaderCheck { private static void checkMatDef(String matdefName){ MaterialDef def = (MaterialDef) assetManager.loadAsset(matdefName); for (TechniqueDef techDef : def.getDefaultTechniques()){ - if (techDef.isUsingShaders()){ - DefineList dl = new DefineList(); - dl.addFrom(techDef.getShaderPresetDefines()); - ShaderKey shaderKey = new ShaderKey(techDef.getVertexShaderName(), - techDef.getFragmentShaderName(), - dl, - techDef.getVertexShaderLanguage(), - techDef.getFragmentShaderLanguage()); - Shader shader = assetManager.loadShader(shaderKey); - - for (Validator validator : validators){ - StringBuilder sb = new StringBuilder(); - validator.validate(shader, sb); - System.out.println("==== Validator: " + validator.getName() + " " + - validator.getInstalledVersion() + " ===="); - System.out.println(sb.toString()); - } + DefineList dl = new DefineList(); + dl.addFrom(techDef.getShaderPresetDefines()); + ShaderKey shaderKey = new ShaderKey(techDef.getVertexShaderName(), + techDef.getFragmentShaderName(), + dl, + techDef.getVertexShaderLanguage(), + techDef.getFragmentShaderLanguage()); + Shader shader = assetManager.loadShader(shaderKey); + + for (Validator validator : validators){ + StringBuilder sb = new StringBuilder(); + validator.validate(shader, sb); + System.out.println("==== Validator: " + validator.getName() + " " + + validator.getInstalledVersion() + " ===="); + System.out.println(sb.toString()); } } }