diff --git a/jme3-core/src/main/java/com/jme3/shader/Glsl150ShaderGenerator.java b/jme3-core/src/main/java/com/jme3/shader/Glsl150ShaderGenerator.java index 0cda27404..ae8a04385 100644 --- a/jme3-core/src/main/java/com/jme3/shader/Glsl150ShaderGenerator.java +++ b/jme3-core/src/main/java/com/jme3/shader/Glsl150ShaderGenerator.java @@ -85,7 +85,7 @@ public class Glsl150ShaderGenerator extends Glsl100ShaderGenerator { * "out" keyword. * * after the "void main(){", the vertex output are declared and initialized - * and the frgament outputs are declared + * and the fragment outputs are declared */ @Override protected void generateStartOfMainSection(StringBuilder source, ShaderGenerationInfo info, Shader.ShaderType type) { diff --git a/jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java b/jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java index d42dccf17..3e3677c9c 100644 --- a/jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java +++ b/jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java @@ -41,7 +41,7 @@ import java.util.List; /** * This class is the base for a shader generator using the ShaderNodes system, - * it contains basis mechnaism of generation, but no actual generation code. + * it contains basis mechanism of generation, but no actual generation code. * This class is abstract, any Shader generator must extend it. * * @author Nehon @@ -205,10 +205,10 @@ public abstract class ShaderGenerator { } /** - * returns the laguage + version of the shader should be somthing like + * returns the language + version of the shader should be something like * "GLSL100" for glsl 1.0 "GLSL150" for glsl 1.5. * - * @param type the shader type for wich the version should be returned. + * @param type the shader type for which the version should be returned. * * @return the shaderLanguage and version. */ @@ -282,7 +282,7 @@ public abstract class ShaderGenerator { /** * Appends the given shaderNode main part to the shader declarative part. If - * needed the sahder type can be determined by fetching the shaderNode's + * needed the shader type can be determined by fetching the shaderNode's * definition type. * * @see ShaderNode#getDefinition() diff --git a/jme3-core/src/main/java/com/jme3/shader/ShaderNode.java b/jme3-core/src/main/java/com/jme3/shader/ShaderNode.java index 41346104b..0b65edf15 100644 --- a/jme3-core/src/main/java/com/jme3/shader/ShaderNode.java +++ b/jme3-core/src/main/java/com/jme3/shader/ShaderNode.java @@ -47,10 +47,10 @@ import java.util.List; * * A ShaderNode is based on a definition that has a shader code, inputs and * output variables. This node can be activated based on a condition, and has - * input and ouput mapping. + * input and output mapping. * * This class is not intended to be used by JME users directly. It's the - * stucture for loading shader nodes from a J3md ùaterial definition file + * structure for loading shader nodes from a J3md material definition file * * @author Nehon */ @@ -67,7 +67,7 @@ public class ShaderNode implements Savable { * * @param name the name * @param definition the ShaderNodeDefinition - * @param condition the conditionto activate this node + * @param condition the condition to activate this node */ public ShaderNode(String name, ShaderNodeDefinition definition, String condition) { this.name = name; @@ -125,7 +125,7 @@ public class ShaderNode implements Savable { } /** - * sets the ocndition + * sets the condition * * @param condition the condition */ @@ -165,14 +165,14 @@ public class ShaderNode implements Savable { /** * sets the output mappings * - * @param inputMapping the output mappings + * @param outputMapping the output mappings */ public void setOutputMapping(List outputMapping) { this.outputMapping = outputMapping; } /** - * jme seralization + * jme serialization * * @param ex the exporter * @throws IOException @@ -188,7 +188,7 @@ public class ShaderNode implements Savable { } /** - * jme seralization + * jme serialization * * @param im the importer * @throws IOException diff --git a/jme3-core/src/main/java/com/jme3/shader/ShaderNodeDefinition.java b/jme3-core/src/main/java/com/jme3/shader/ShaderNodeDefinition.java index c8c7089ad..88adae648 100644 --- a/jme3-core/src/main/java/com/jme3/shader/ShaderNodeDefinition.java +++ b/jme3-core/src/main/java/com/jme3/shader/ShaderNodeDefinition.java @@ -43,7 +43,7 @@ import java.util.Arrays; import java.util.List; /** - * Shader node definition structure meant for holding loaded datat from a + * Shader node definition structure meant for holding loaded data from a * material definition j3md file * * @author Nehon @@ -109,7 +109,7 @@ public class ShaderNodeDefinition implements Savable { } /** - * sets the type of shader this def applies to + * sets the type of shader this definition applies to * * @param type the type */ @@ -119,14 +119,14 @@ public class ShaderNodeDefinition implements Savable { /** * - * @return the docuentation for tthis definition + * @return the documentation for this definition */ public String getDocumentation() { return documentation; } /** - * sets the dcumentation + * sets the documentation * * @param documentation the documentation */ @@ -162,7 +162,7 @@ public class ShaderNodeDefinition implements Savable { /** * sets the output variables of this definition * - * @param inputs the output + * @param outputs the output */ public void setOutputs(List outputs) { this.outputs = outputs; @@ -187,11 +187,12 @@ public class ShaderNodeDefinition implements Savable { /** - * jme seralization (not used) + * jme serialization (not used) * * @param ex the exporter * @throws IOException */ + @Override public void write(JmeExporter ex) throws IOException { OutputCapsule oc = (OutputCapsule) ex.getCapsule(this); oc.write(name, "name", ""); @@ -222,11 +223,12 @@ public class ShaderNodeDefinition implements Savable { /** - * jme seralization (not used) + * jme serialization (not used) * * @param im the importer * @throws IOException */ + @Override public void read(JmeImporter im) throws IOException { InputCapsule ic = (InputCapsule) im.getCapsule(this); name = ic.readString("name", ""); diff --git a/jme3-core/src/main/java/com/jme3/shader/ShaderNodeVariable.java b/jme3-core/src/main/java/com/jme3/shader/ShaderNodeVariable.java index 81dba4f52..f6408d9e1 100644 --- a/jme3-core/src/main/java/com/jme3/shader/ShaderNodeVariable.java +++ b/jme3-core/src/main/java/com/jme3/shader/ShaderNodeVariable.java @@ -69,7 +69,7 @@ public class ShaderNodeVariable implements Savable, Cloneable { * * @param type the glsl type of the variable * @param nameSpace the nameSpace (can be the name of the shaderNode or - * Globel,Attr,MatParam,WorldParam) + * Global,Attr,MatParam,WorldParam) * @param name the name of the variable * @param multiplicity the number of element if this variable is an array. Can be an Int of a declared material parameter */ @@ -85,7 +85,7 @@ public class ShaderNodeVariable implements Savable, Cloneable { * * @param type the glsl type of the variable * @param nameSpace the nameSpace (can be the name of the shaderNode or - * Globel,Attr,MatParam,WorldParam) + * Global,Attr,MatParam,WorldParam) * @param name the name of the variable */ public ShaderNodeVariable(String type, String nameSpace, String name) { @@ -132,7 +132,7 @@ public class ShaderNodeVariable implements Savable, Cloneable { /** * * @return the name space (can be the name of the shaderNode or - * Globel,Attr,MatParam,WorldParam) + * Global,Attr,MatParam,WorldParam) */ public String getNameSpace() { return nameSpace; @@ -140,7 +140,7 @@ public class ShaderNodeVariable implements Savable, Cloneable { /** * sets the nameSpace (can be the name of the shaderNode or - * Globel,Attr,MatParam,WorldParam) + * Global,Attr,MatParam,WorldParam) * * @param nameSpace */ @@ -176,11 +176,12 @@ public class ShaderNodeVariable implements Savable, Cloneable { } /** - * jme seralization (not used) + * jme serialization (not used) * * @param ex the exporter * @throws IOException */ + @Override public void write(JmeExporter ex) throws IOException { OutputCapsule oc = (OutputCapsule) ex.getCapsule(this); oc.write(name, "name", ""); @@ -193,11 +194,12 @@ public class ShaderNodeVariable implements Savable, Cloneable { } /** - * jme seralization (not used) + * jme serialization (not used) * * @param im the importer * @throws IOException */ + @Override public void read(JmeImporter im) throws IOException { InputCapsule ic = (InputCapsule) im.getCapsule(this); name = ic.readString("name", ""); diff --git a/jme3-core/src/main/java/com/jme3/shader/ShaderVariable.java b/jme3-core/src/main/java/com/jme3/shader/ShaderVariable.java index 76b39de54..ade852e34 100644 --- a/jme3-core/src/main/java/com/jme3/shader/ShaderVariable.java +++ b/jme3-core/src/main/java/com/jme3/shader/ShaderVariable.java @@ -43,7 +43,7 @@ public class ShaderVariable { /** * Name of the uniform as was declared in the shader. - * E.g name = "g_WorldMatrix" if the decleration was + * E.g name = "g_WorldMatrix" if the declaration was * "uniform mat4 g_WorldMatrix;". */ protected String name = null; diff --git a/jme3-core/src/main/java/com/jme3/shader/VariableMapping.java b/jme3-core/src/main/java/com/jme3/shader/VariableMapping.java index 032411e2d..5f134a002 100644 --- a/jme3-core/src/main/java/com/jme3/shader/VariableMapping.java +++ b/jme3-core/src/main/java/com/jme3/shader/VariableMapping.java @@ -102,7 +102,7 @@ public class VariableMapping implements Savable { /** * sets the right variable * - * @param leftVariable the right variable + * @param rightVariable the right variable */ public void setRightVariable(ShaderNodeVariable rightVariable) { this.rightVariable = rightVariable; @@ -153,18 +153,19 @@ public class VariableMapping implements Savable { /** * sets the right swizzle * - * @param leftSwizzling the right swizzle + * @param rightSwizzling the right swizzle */ public void setRightSwizzling(String rightSwizzling) { this.rightSwizzling = rightSwizzling; } /** - * jme seralization (not used) + * jme serialization (not used) * * @param ex the exporter * @throws IOException */ + @Override public void write(JmeExporter ex) throws IOException { OutputCapsule oc = (OutputCapsule) ex.getCapsule(this); oc.write(leftVariable, "leftVariable", null); @@ -175,11 +176,12 @@ public class VariableMapping implements Savable { } /** - * jme seralization (not used) + * jme serialization (not used) * * @param im the importer * @throws IOException */ + @Override public void read(JmeImporter im) throws IOException { InputCapsule ic = (InputCapsule) im.getCapsule(this); leftVariable = (ShaderNodeVariable) ic.readSavable("leftVariable", null); diff --git a/jme3-core/src/plugins/java/com/jme3/material/plugins/ConditionParser.java b/jme3-core/src/plugins/java/com/jme3/material/plugins/ConditionParser.java index e75597bfd..2041fba09 100644 --- a/jme3-core/src/plugins/java/com/jme3/material/plugins/ConditionParser.java +++ b/jme3-core/src/plugins/java/com/jme3/material/plugins/ConditionParser.java @@ -41,7 +41,7 @@ import java.util.regex.Pattern; * style. * * extractDefines is able to get a list of defines in an expression and update - * the formatter expression with upercased defines + * the formatter expression with uppercased defines * * @author Nehon */ diff --git a/jme3-core/src/plugins/java/com/jme3/material/plugins/MatParseException.java b/jme3-core/src/plugins/java/com/jme3/material/plugins/MatParseException.java index ac810ae36..095065539 100644 --- a/jme3-core/src/plugins/java/com/jme3/material/plugins/MatParseException.java +++ b/jme3-core/src/plugins/java/com/jme3/material/plugins/MatParseException.java @@ -36,7 +36,7 @@ import java.io.IOException; /** * Custom Exception to report a j3md Material definition file parsing error. - * This exception reports the line number where the error occured. + * This exception reports the line number where the error occurred. * * @author Nehon */ @@ -70,7 +70,7 @@ public class MatParseException extends IOException { * @param expected the expected value * @param got the actual value * @param statement the read statement - * @param cause the embed exception that occured + * @param cause the embed exception that occurred */ public MatParseException(String expected, String got, Statement statement, Throwable cause) { super("Error On line " + statement.getLineNumber() + " : " + statement.getLine() + "\n->Expected " + (expected == null ? "a statement" : expected) + ", got '" + got + "'!", cause); @@ -82,7 +82,7 @@ public class MatParseException extends IOException { * * @param text the error message * @param statement the statement where the error occur - * @param cause the embed exception that occured + * @param cause the embed exception that occurred */ public MatParseException(String text, Statement statement, Throwable cause) { super("Error On line " + statement.getLineNumber() + " : " + statement.getLine() + "\n->" + text, cause); diff --git a/jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java b/jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java index efdf28f4b..9c6fb7c31 100644 --- a/jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java +++ b/jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java @@ -59,7 +59,7 @@ import java.util.Map; * * Also it allows to load the ShaderNodes from a j3md file and build the * ShaderNodes list of each technique and the ShaderGenerationInfo needed to - * generate the sahders + * generate shaders * * @author Nehon */ @@ -209,9 +209,9 @@ public class ShaderNodeLoaderDelegate { * ShaderNodesDefinition This method is used by the j3m loader. * * When loaded in a material, the definitions are not stored as a list, but - * they are stores in Shadernodes based onthis definition. + * they are stores in Shadernodes based on this definition. * - * The map is here to map the defintion to the nodes, and ovoid reloading + * The map is here to map the definition to the nodes, and ovoid reloading * already loaded definitions * * @param statements the list of statements to parse @@ -222,7 +222,7 @@ public class ShaderNodeLoaderDelegate { } /** - * effectiveliy reads the ShaderNodesDefinitions block + * effectively reads the ShaderNodesDefinitions block * * @param statements the list of statements to parse * @param key the ShaderNodeDefinitionKey @@ -273,7 +273,7 @@ public class ShaderNodeLoaderDelegate { * reads a variable declaration statement <glslType> <varName> * * @param statement the statement to parse - * @return a ShaderNodeVariable axtracted from the statement + * @return a ShaderNodeVariable extracted from the statement * @throws IOException */ protected ShaderNodeVariable readVariable(Statement statement) throws IOException { @@ -448,7 +448,7 @@ public class ShaderNodeLoaderDelegate { } /** - * searcha variable in the given list and updates its type and namespace + * search a variable in the given list and updates its type and namespace * * @param var the variable to update * @param list the variables list @@ -531,7 +531,7 @@ public class ShaderNodeLoaderDelegate { /** * updates the right variable of the given mapping from a UniformBinding (a - * WorldParam) it checks if the unifrom hasn't already been loaded, add it + * WorldParam) it checks if the uniform hasn't already been loaded, add it * to the maps if not. * * @param param the WorldParam UniformBinding @@ -559,7 +559,7 @@ public class ShaderNodeLoaderDelegate { /** * updates the right variable of the given mapping from a MatParam (a - * WorldParam) it checks if the unifrom hasn't already been loaded, add it + * WorldParam) it checks if the uniform hasn't already been loaded, add it * to the maps if not. * * @param param the MatParam @@ -622,7 +622,7 @@ public class ShaderNodeLoaderDelegate { } /** - * Adds a define to the techniquedef + * Adds a define to the technique def * * @param paramName */ @@ -767,7 +767,7 @@ public class ShaderNodeLoaderDelegate { /** * reads an output mapping * - * @param statement1 the staement being read + * @param statement1 the statement being read * @return the mapping * @throws IOException */ @@ -803,7 +803,7 @@ public class ShaderNodeLoaderDelegate { } /** - * Reads alist of ShaderNodes + * Reads a list of ShaderNodes * * @param statements the list of statements to read * @throws IOException @@ -843,7 +843,7 @@ public class ShaderNodeLoaderDelegate { * retrieve the leftType corresponding sampler type from the rightType * * @param leftType the left samplerType - * @param rightType the right sampler type (can be multiple types sparated + * @param rightType the right sampler type (can be multiple types separated * by "|" * @return the type or null if not found */ @@ -885,7 +885,7 @@ public class ShaderNodeLoaderDelegate { /** * store an attribute * - * @param var the variable ot store + * @param var the variable to store */ public void storeAttribute(ShaderNodeVariable var) { storeVariable(var, techniqueDef.getShaderGenerationInfo().getAttributes()); @@ -894,7 +894,7 @@ public class ShaderNodeLoaderDelegate { /** * store a vertex uniform * - * @param var the variable ot store + * @param var the variable to store */ public void storeVertexUniform(ShaderNodeVariable var) { storeVariable(var, techniqueDef.getShaderGenerationInfo().getVertexUniforms()); @@ -904,7 +904,7 @@ public class ShaderNodeLoaderDelegate { /** * store a fragment uniform * - * @param var the variable ot store + * @param var the variable to store */ public void storeFragmentUniform(ShaderNodeVariable var) { storeVariable(var, techniqueDef.getShaderGenerationInfo().getFragmentUniforms()); @@ -921,7 +921,7 @@ public class ShaderNodeLoaderDelegate { } /** - * find the definiton from this statement (loads it if necessary) + * find the definition from this statement (loads it if necessary) * * @param statement the statement being read * @return the definition @@ -1049,7 +1049,7 @@ public class ShaderNodeLoaderDelegate { } /** - * check the types of a mapping, left type must match right type tkae the + * check the types of a mapping, left type must match right type take the * swizzle into account * * @param mapping the mapping