Module gl1

Class ShaderConfiguration

java.lang.Object
de.grogra.glsl.utility.ShaderConfiguration
Direct Known Subclasses:
LightShaderConfiguration, MaterialConfiguration

public abstract class ShaderConfiguration extends Object
  • Field Details

  • Constructor Details

    • ShaderConfiguration

      public ShaderConfiguration()
  • Method Details

    • setBit

      public void setBit(byte mask)
    • getBit

      public boolean getBit(byte mask)
    • clearTmpVariables

      public void clearTmpVariables()
    • setupTextures

      public void setupTextures(javax.media.opengl.GL gl, GLSLDisplay disp, int shaderNo, int offset)
    • bindTextures

      public void bindTextures(javax.media.opengl.GL gl, GLSLDisplay disp, int shaderNo, int offset)
    • setupDynamicUniforms

      public void setupDynamicUniforms(javax.media.opengl.GL gl, GLSLDisplay disp, int shaderNo)
    • setupShader

      public void setupShader(javax.media.opengl.GL gl, GLSLDisplay disp, int shaderNo)
    • registerTexture

      public String registerTexture(Image img)
    • registerCustomTexture

      public String registerCustomTexture(GLSLQueuedTexture data)
    • registerNewTmpVar

      public String registerNewTmpVar(int type, String value)
    • registerGlobalConst

      public String registerGlobalConst(int type, String value)
    • registerNewUniform

      public String registerNewUniform(int type)
    • registerFunc

      public void registerFunc(String signature, String source)
      Register 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 "{...}"
    • cleanUp

      public void cleanUp(javax.media.opengl.GL gl, boolean javaonly)
    • set

      public void set(Object obj)
    • set

      public void set(OpenGLState glState, GLSLDisplay disp, Object obj)
    • getReferenceKeyValue

      protected Object getReferenceKeyValue()
    • perInstance

      protected boolean perInstance()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • setThisToOther

      protected void setThisToOther(ShaderConfiguration other)
      Sets 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

      public abstract ShaderConfiguration clone()
      Overrides:
      clone in class Object
    • getShaderByDefaultCollection

      public abstract GLSLManagedShader getShaderByDefaultCollection(GLSLDisplay disp, Object reference)
    • setVersion

      public void setVersion(int i)