|
|
@ -431,6 +431,7 @@ public class J3MLoader implements AssetLoader { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void readTechnique(Statement techStat) throws IOException{ |
|
|
|
private void readTechnique(Statement techStat) throws IOException{ |
|
|
|
|
|
|
|
isUseNodes = false; |
|
|
|
String[] split = techStat.getLine().split(whitespacePattern); |
|
|
|
String[] split = techStat.getLine().split(whitespacePattern); |
|
|
|
if (split.length == 1) { |
|
|
|
if (split.length == 1) { |
|
|
|
technique = new TechniqueDef(null); |
|
|
|
technique = new TechniqueDef(null); |
|
|
@ -468,8 +469,7 @@ public class J3MLoader implements AssetLoader { |
|
|
|
fragLanguage = null; |
|
|
|
fragLanguage = null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void loadFromRoot(List<Statement> roots) throws IOException{ |
|
|
|
private void loadFromRoot(List<Statement> roots) throws IOException{ |
|
|
|
isUseNodes = false; |
|
|
|
|
|
|
|
if (roots.size() == 2){ |
|
|
|
if (roots.size() == 2){ |
|
|
|
Statement exception = roots.get(0); |
|
|
|
Statement exception = roots.get(0); |
|
|
|
String line = exception.getLine(); |
|
|
|
String line = exception.getLine(); |
|
|
@ -585,13 +585,17 @@ public class J3MLoader implements AssetLoader { |
|
|
|
protected void initNodesLoader() { |
|
|
|
protected void initNodesLoader() { |
|
|
|
if (!isUseNodes) { |
|
|
|
if (!isUseNodes) { |
|
|
|
isUseNodes = fragName == null && vertName == null; |
|
|
|
isUseNodes = fragName == null && vertName == null; |
|
|
|
if (isUseNodes) { |
|
|
|
if (isUseNodes) { |
|
|
|
nodesLoaderDelegate = new ShaderNodeLoaderDelegate(); |
|
|
|
if(nodesLoaderDelegate == null){ |
|
|
|
|
|
|
|
nodesLoaderDelegate = new ShaderNodeLoaderDelegate(); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
nodesLoaderDelegate.clear(); |
|
|
|
|
|
|
|
} |
|
|
|
nodesLoaderDelegate.setTechniqueDef(technique); |
|
|
|
nodesLoaderDelegate.setTechniqueDef(technique); |
|
|
|
nodesLoaderDelegate.setMaterialDef(materialDef); |
|
|
|
nodesLoaderDelegate.setMaterialDef(materialDef); |
|
|
|
nodesLoaderDelegate.setAssetManager(assetManager); |
|
|
|
nodesLoaderDelegate.setAssetManager(assetManager); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|