Module gl1

Class GLSLDirectionalLight

All Implemented Interfaces:
GLSLOpenGLObject
Direct Known Subclasses:
GLSLDirectionalLightShadow, GLSLSkyLight

public class GLSLDirectionalLight extends GLSLLightShader
Implementation of the directional light type.
Author:
Konni Hartmann
  • Field Details

    • lightDir

      protected String lightDir
    • col0

      protected String col0
    • radientPower

      protected String radientPower
  • Constructor Details

    • GLSLDirectionalLight

      public GLSLDirectionalLight()
  • Method Details

    • getLightFunction

      public String getLightFunction()
      Description copied from class: GLSLLightShader
      Sets middle part of a light shader (after properties have been extracted from deferred-shading-textures
      Overrides:
      getLightFunction in class GLSLLightShader
      Returns:
    • getFragmentShader

      public String[] getFragmentShader(Object sh)
      Specified by:
      getFragmentShader in class GLSLShader
      Returns:
    • needsRecompilation

      public boolean needsRecompilation(Object data)
      Description copied from class: GLSLShader
      Return false if Shader depends only on Uniforms
      Overrides:
      needsRecompilation in class GLSLShader
      Returns:
      true, if Sourcecode needs to be regenerated and recompiled
    • instanceFor

      public Class instanceFor()
      Overrides:
      instanceFor in class GLSLShader
      Returns:
      Class represented by this Shader
    • setupShader

      protected void setupShader(javax.media.opengl.GL gl, GLSLDisplay disp, Object data)
      Overrides:
      setupShader in class GLSLLightShader
    • setupDynamicUniforms

      protected void setupDynamicUniforms(javax.media.opengl.GL gl, GLSLDisplay disp, Object data, int shaderNo)
      Description copied from class: GLSLShader
      Function that loads uniforms of the represented Shader.
      Overrides:
      setupDynamicUniforms in class GLSLLightShader
      disp - GLSLDisplay that tries using this shader
      data - The GroIMP-Shader-Object represented by this shader.
    • getInstance

      public GLSLShader getInstance()
      Description copied from class: GLSLShader
      For "hardcompiled" Shaders this method should return a new instance
      Overrides:
      getInstance in class GLSLShader
      Returns: