Interface ShaderObject

All Known Implementing Classes:
AbstractShaderObject, AssetShaderObject, BinaryShaderObject, NamedShaderObject, SimpleShaderObject

public interface ShaderObject
Created by covers1624 on 24/5/20.
  • Method Details

    • getName

      String getName()
      A simple identifier for this ShaderObject, used for logging.
      Returns:
      The name.
    • getShaderType

      ShaderObject.ShaderType getShaderType()
      Gets the ShaderObject.ShaderType for this shader.
      Returns:
      The ShaderObject.ShaderType.
    • getUniforms

      com.google.common.collect.ImmutableList<UniformPair> getUniforms()
      Gets all UniformPairs this shader exposes. It is expected that a ShaderObject will not dynamically change the uniforms it exposes over its lifetime. Doing so is not enforced, but will break the Uniform pipeline.
      Returns:
      The UniformPairs.
    • isDirty

      boolean isDirty()
      Checks if this shader is dirty and requires re-compiling.
      Returns:
      If this shader is dirty.
    • alloc

      void alloc()
      Allocates and compiles this ShaderObject. Does nothing if the shader is already compiled.
    • getShaderID

      int getShaderID()
      Gets the GL id for this ShaderObject.
      Returns:
      The id, -1 of not allocated.
    • onLink

      void onLink(int programId)
      Called when this ShaderObject is linked to a ShaderProgram.
      Parameters:
      programId - The GL id of the program.