Module gl1

Class GLSLPointLight

All Implemented Interfaces:
GLSLOpenGLObject
Direct Known Subclasses:
GLSLPointLightShadow

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

    • lightPos

      protected String lightPos
    • col0

      protected String col0
    • fade_power

      protected String fade_power
    • fade_distance

      protected String fade_distance
    • radientPower

      protected String radientPower
  • Constructor Details

    • GLSLPointLight

      public GLSLPointLight()
  • 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
    • 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:
    • setupShader

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

      public 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.