public class Glsl150ShaderGenerator extends Glsl100ShaderGenerator
inPosTmp
assetManager, indent, NAME_SPACE_GLOBAL, NAME_SPACE_MAT_PARAM, NAME_SPACE_VERTEX_ATTRIBUTE, NAME_SPACE_WORLD_PARAM, techniqueDef
Constructor and Description |
---|
Glsl150ShaderGenerator(AssetManager assetManager)
Creates a Glsl150ShaderGenerator
|
Modifier and Type | Method and Description |
---|---|
protected void |
declareAttribute(java.lang.StringBuilder source,
ShaderNodeVariable var)
Declares an attribute
|
protected void |
declareVarying(java.lang.StringBuilder source,
ShaderNodeVariable var,
boolean input)
Declares a varying
|
protected void |
generateEndOfMainSection(java.lang.StringBuilder source,
ShaderGenerationInfo info,
Shader.ShaderType type)
generates the end of the shader main section.
|
protected void |
generateStartOfMainSection(java.lang.StringBuilder source,
ShaderGenerationInfo info,
Shader.ShaderType type)
generates the start of the shader main section.
|
protected void |
generateUniforms(java.lang.StringBuilder source,
ShaderGenerationInfo info,
Shader.ShaderType type)
generates the uniforms declaration for a shader of the given type.
|
protected java.lang.String |
getLanguageAndVersion(Shader.ShaderType type)
returns the language + version of the shader should be something like
"GLSL100" for glsl 1.0 "GLSL150" for glsl 1.5.
|
protected void |
initVariable(java.lang.StringBuilder source,
ShaderNodeVariable var,
java.lang.String initValue)
Append a variable initialization to the code
|
appendIndent, appendOutput, comment, declareGlobalPosition, declareVariable, declareVariable, declareVariable, declareVariable, declareVariable, endCondition, fixInPositionType, generateAttributes, generateDeclarativeSection, generateNodeMainSection, generateUniforms, generateVaryings, getAppendableNameSpace, indent, isVarying, isWorldOrMaterialParam, map, replace, replaceVariableName, startCondition, unIndent, updateDefinesName
appendNodeDeclarationAndMain, buildShader, findShaderIndexFromVersion, generateDeclarationAndMainBody, generateShader, initialize
public Glsl150ShaderGenerator(AssetManager assetManager)
assetManager
- the assetmanagerprotected java.lang.String getLanguageAndVersion(Shader.ShaderType type)
ShaderGenerator
getLanguageAndVersion
in class Glsl100ShaderGenerator
type
- the shader type for which the version should be returned.protected void declareAttribute(java.lang.StringBuilder source, ShaderNodeVariable var)
declareAttribute
in class Glsl100ShaderGenerator
source
- the StringBuilder to usevar
- the variable to declare as an attributeprotected void declareVarying(java.lang.StringBuilder source, ShaderNodeVariable var, boolean input)
declareVarying
in class Glsl100ShaderGenerator
source
- the StringBuilder to usevar
- the variable to declare as a varyinginput
- a boolean set to true if the varying is an input.
This in not used in this implementation, but can be used in overriding
implementations.protected void generateUniforms(java.lang.StringBuilder source, ShaderGenerationInfo info, Shader.ShaderType type)
ShaderGenerator
generateUniforms
in class Glsl100ShaderGenerator
source
- the source StringBuilder to append generated code.info
- the ShaderGenerationInfo.type
- the shader type the uniforms have to be generated for.protected void generateStartOfMainSection(java.lang.StringBuilder source, ShaderGenerationInfo info, Shader.ShaderType type)
generateStartOfMainSection
in class Glsl100ShaderGenerator
source
- the StringBuilder to append generated code.info
- the ShaderGenerationInfo.type
- the shader type the section has to be generated for.protected void generateEndOfMainSection(java.lang.StringBuilder source, ShaderGenerationInfo info, Shader.ShaderType type)
generateEndOfMainSection
in class Glsl100ShaderGenerator
source
- the StringBuilder to append generated code.info
- the ShaderGenerationInfo.type
- the shader type the section has to be generated for.protected void initVariable(java.lang.StringBuilder source, ShaderNodeVariable var, java.lang.String initValue)
source
- the StringBuilder to usevar
- the variable to initializeinitValue
- the init value to assign to the variable