Module gl1

Class GLSLChannelMap

java.lang.Object
de.grogra.glsl.material.channel.GLSLChannelMap
Direct Known Subclasses:
GLSLChannelMapNode, GLSLChannelSPD, GLSLDefaultInput, GLSLGraytone, GLSLPlaneInput, GLSLRGBColor, GLSLSphereTracedInput, GLSLSphereTracedInputParallel

public abstract class GLSLChannelMap extends Object
Base for all ChannelMaps. Also holds a list of all available GLSLChannelMaps.
Author:
Konni Hartmann
  • Constructor Details

    • GLSLChannelMap

      public GLSLChannelMap()
  • Method Details

    • getGLSLObject

      public static GLSLChannelMap getGLSLObject(ChannelMap inp)
    • instanceFor

      public abstract Class instanceFor()
    • instanceForName

      public String instanceForName()
      Returns the fully-qualified name of the ChannelMap class this handler covers. Used by ChannelCollection for classloader-safe lookup (OSGi plugins each have their own classloader, so Class identity cannot be used as a map key across plugin boundaries).

      The default delegates to instanceFor(). Subclasses that handle classes from a foreign plugin (e.g. ChannelSPD in the GPUFlux plugin) should override this to return a string literal so that no cross-loader Class object is required.

    • getMaxResultType

      public static int getMaxResultType(Result a, Result b)
    • generateResultWithChannelDefault

      public static Result generateResultWithChannelDefault(ChannelMap inp, MaterialConfiguration sc, GLSLChannelMap inpChan, int requestedChannel)
    • generateResult

      public static Result generateResult(ChannelMap inp, MaterialConfiguration sc, GLSLChannelMap inpChan, int requestedChannel, ChannelMap defaultInp)
    • generateResult

      public static Result generateResult(ChannelMap inp, MaterialConfiguration sc, GLSLChannelMap inpChan, int requestedChannel)
    • generate

      public abstract Result generate(ChannelMap inp, MaterialConfiguration cs, GLSLChannelMap inpChan, int Channel)
      This should be used instead of the other one
      Parameters:
      inp -
      cs -
      inpChan -
      Channel -
      Returns:
    • mayDiscard

      public boolean mayDiscard()
    • initMap

      public static void initMap()