java.lang.Object
de.grogra.glsl.utility.ShaderConfiguration
- Direct Known Subclasses:
- LightShaderConfiguration,- MaterialConfiguration
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected LinkedHashMap<String, String> protected Objectstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final bytestatic final bytestatic final bytestatic final byteprotected int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidbindTextures(javax.media.opengl.GL gl, GLSLDisplay disp, int shaderNo, int offset) voidcleanUp(javax.media.opengl.GL gl, boolean javaonly) voidabstract ShaderConfigurationclone()booleanbooleangetBit(byte mask) protected Objectabstract GLSLManagedShadergetShaderByDefaultCollection(GLSLDisplay disp, Object reference) inthashCode()protected booleanvoidregisterFunc(String signature, String source) Register a function to be used within this shaders code.registerGlobalConst(int type, String value) registerNewTmpVar(int type, String value) registerNewUniform(int type) registerTexture(Image img) voidset(OpenGLState glState, GLSLDisplay disp, Object obj) voidvoidsetBit(byte mask) protected voidSets all permanent attributes of this instance to the values from other.voidsetupDynamicUniforms(javax.media.opengl.GL gl, GLSLDisplay disp, int shaderNo) voidsetupShader(javax.media.opengl.GL gl, GLSLDisplay disp, int shaderNo) voidsetupTextures(javax.media.opengl.GL gl, GLSLDisplay disp, int shaderNo, int offset) voidsetVersion(int i) 
- 
Field Details- 
USE_UVpublic static final byte USE_UV- See Also:
 
- 
USE_LOCAL_POSpublic static final byte USE_LOCAL_POS- See Also:
 
- 
USE_GLOBAL_POSpublic static final byte USE_GLOBAL_POS- See Also:
 
- 
USE_DERIVATESpublic static final byte USE_DERIVATES- See Also:
 
- 
T_FLOATpublic static final int T_FLOAT- See Also:
 
- 
T_VEC2public static final int T_VEC2- See Also:
 
- 
T_VEC3public static final int T_VEC3- See Also:
 
- 
T_VEC4public static final int T_VEC4- See Also:
 
- 
T_BOOLpublic static final int T_BOOL- See Also:
 
- 
T_SAMPLER2Dpublic static final int T_SAMPLER2D- See Also:
 
- 
T_SAMPLER2DRECTpublic static final int T_SAMPLER2DRECT- See Also:
 
- 
T_SAMPLER2DSHADOWpublic static final int T_SAMPLER2DSHADOW- See Also:
 
- 
T_SAMPLERCUBEpublic static final int T_SAMPLERCUBE- See Also:
 
- 
T_MAT3public static final int T_MAT3- See Also:
 
- 
var
- 
constVar
- 
uniform
- 
funcMap
- 
sampler
- 
customSampler
- 
referenceKey
- 
versionprotected int version
 
- 
- 
Constructor Details- 
ShaderConfigurationpublic ShaderConfiguration()
 
- 
- 
Method Details- 
setBitpublic void setBit(byte mask) 
- 
getBitpublic boolean getBit(byte mask) 
- 
clearTmpVariablespublic void clearTmpVariables()
- 
setupTextures
- 
bindTextures
- 
setupDynamicUniforms
- 
setupShader
- 
registerTexture
- 
registerCustomTexture
- 
registerNewTmpVar
- 
registerGlobalConst
- 
registerNewUniform
- 
registerFuncRegister a function to be used within this shaders code. Functions are guarantied to be added only once per signature using the last added. Appearance will be in order of registration- Parameters:
- signature- Signature of the function for example "float calc(vec3 pos)"
- source- Source of the function without surrounding "{...}"
 
- 
cleanUppublic void cleanUp(javax.media.opengl.GL gl, boolean javaonly) 
- 
set
- 
set
- 
getReferenceKeyValue
- 
perInstanceprotected boolean perInstance()
- 
hashCodepublic int hashCode()
- 
equals
- 
setThisToOtherSets all permanent attributes of this instance to the values from other. This method is used by clone() to generate a shallow copy of a ShaderConfiguration- Parameters:
- other- Reference from which attributes are copied
 
- 
clone
- 
getShaderByDefaultCollection
- 
setVersionpublic void setVersion(int i) 
 
-