@ -66,7 +66,9 @@ public class J3MLoader implements AssetLoader {
private TechniqueDef technique ;
private RenderState renderState ;
private String shaderLang ;
private String vertLanguage ;
private String fragLanguage ;
private String vertName ;
private String fragName ;
@ -93,11 +95,13 @@ public class J3MLoader implements AssetLoader {
if ( typeAndLang . length ! = 2 ) {
throw new IOException ( "Shader statement syntax incorrect: " + statement ) ;
}
shaderLang = typeAndLang [ 1 ] ;
if ( typeAndLang [ 0 ] . equals ( "VertexShader" ) ) {
vertName = split [ 1 ] . trim ( ) ;
vertLanguage = typeAndLang [ 1 ] ;
} else if ( typeAndLang [ 0 ] . equals ( "FragmentShader" ) ) {
fragName = split [ 1 ] . trim ( ) ;
fragLanguage = typeAndLang [ 1 ] ;
}
}
@ -402,7 +406,13 @@ public class J3MLoader implements AssetLoader {
if ( split . length = = 1 ) {
technique = new TechniqueDef ( null ) ;
} else if ( split . length = = 2 ) {
technique = new TechniqueDef ( split [ 1 ] ) ;
String techName = split [ 1 ] ;
if ( techName . equals ( "FixedFunc" ) ) {
throw new UnsupportedOperationException (
"In material: " + key + "\nThe 'FixedFunc' technique name no longer has any special meanining.\n"
+ "To support fixed pipeline mode, remove that technique's name entirely." ) ;
}
technique = new TechniqueDef ( techName ) ;
} else {
throw new IOException ( "Technique statement syntax incorrect" ) ;
}
@ -412,14 +422,15 @@ public class J3MLoader implements AssetLoader {
}
if ( vertName ! = null & & fragName ! = null ) {
technique . setShaderFile ( vertName , fragName , shaderLang ) ;
technique . setShaderFile ( vertName , fragName , vertLanguage , fragLanguage ) ;
}
materialDef . addTechniqueDef ( technique ) ;
technique = null ;
vertName = null ;
fragName = null ;
shaderLang = null ;
vertLanguage = null ;
fragLanguage = null ;
}
private void loadFromRoot ( List < Statement > roots ) throws IOException {