Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.grogra.imp3d.gl20
Class GL20ResourceShaderFragment

    java.lang.Object
      de.grogra.imp3d.gl20.GL20Resource
          de.grogra.imp3d.gl20.GL20ResourceShaderFragment

Direct Known Subclasses:
  GL20ResourceShaderFragmentBlend, GL20ResourceShaderFragmentGraytone

    public abstract class GL20ResourceShaderFragment

extends GL20Resource

Field Summary
`static int` | `GL20CHANNEL_A` color.a channel
`static int` | `GL20CHANNEL_A_BIT` color.a channel bit
`static int` | `GL20CHANNEL_B` color.b channel
`static int` | `GL20CHANNEL_B_BIT` color.b channel bit
`static int` | `GL20CHANNEL_DERIVATE_BITS` all derivate channels bitmask
`static int` | `GL20CHANNEL_DERIVATE_DU_BITS` derivate du channels bitmask
`static int` | `GL20CHANNEL_DERIVATE_DV_BITS` derivate dv channels bitmask
`static int` | `GL20CHANNEL_DERIVATE_MAX` last derivate channel
`static int` | `GL20CHANNEL_DERIVATE_MIN` first derivate channel
`static int` | `GL20CHANNEL_DERIVATE_X_DU` derivate x du channel
`static int` | `GL20CHANNEL_DERIVATE_X_DU_BIT` derivate x du channel bit
`static int` | `GL20CHANNEL_DERIVATE_X_DV` derivate x dv channel
`static int` | `GL20CHANNEL_DERIVATE_X_DV_BIT` derivate x dv channel bit
`static int` | `GL20CHANNEL_DERIVATE_Y_DU` derivate y du channel
`static int` | `GL20CHANNEL_DERIVATE_Y_DU_BIT` derivate y du channel bit
`static int` | `GL20CHANNEL_DERIVATE_Y_DV` derivate y dv channel
`static int` | `GL20CHANNEL_DERIVATE_Y_DV_BIT` derivate y dv channel bit
`static int` | `GL20CHANNEL_DERIVATE_Z_DU` derivate z du channel
`static int` | `GL20CHANNEL_DERIVATE_Z_DU_BIT` derivate z du channel bit
`static int` | `GL20CHANNEL_DERIVATE_Z_DV` derivate z dv channel
`static int` | `GL20CHANNEL_DERIVATE_Z_DV_BIT` derivate z dv channel bit
`static int` | `GL20CHANNEL_G` color.g channel
`static int` | `GL20CHANNEL_G_BIT` color.g channel bit
`static int` | `GL20CHANNEL_NORMAL_BITS` normal channels bitmask
`static int` | `GL20CHANNEL_NORMAL_X` normal.x channel
`static int` | `GL20CHANNEL_NORMAL_X_BIT` normal.x channel bit
`static int` | `GL20CHANNEL_NORMAL_Y` normal.y channel
`static int` | `GL20CHANNEL_NORMAL_Y_BIT` normal.y channel bit
`static int` | `GL20CHANNEL_NORMAL_Z` normal.z channel
`static int` | `GL20CHANNEL_NORMAL_Z_BIT` normal.z channel bit
`static int` | `GL20CHANNEL_POSITION_BITS` position channels bitmask
`static int` | `GL20CHANNEL_POSITION_X` position.x channel
`static int` | `GL20CHANNEL_POSITION_X_BIT` position.x channel bit
`static int` | `GL20CHANNEL_POSITION_Y` position.y channel
`static int` | `GL20CHANNEL_POSITION_Y_BIT` position.y channel bit
`static int` | `GL20CHANNEL_POSITION_Z` position.z channel
`static int` | `GL20CHANNEL_POSITION_Z_BIT` position.z channel bit
`static int` | `GL20CHANNEL_R` color.r channel
`static int` | `GL20CHANNEL_R_BIT` color.r channel bit
`static int` | `GL20CHANNEL_RGB_BITS` rgb channels bitmask
`static int` | `GL20CHANNEL_RGBA_BITS` rgba channels bitmask
`static int` | `GL20CHANNEL_TEXCOORD_BITS` texcoord channels bitmask
`static int` | `GL20CHANNEL_TEXCOORD_U` texcoord.u channel
`static int` | `GL20CHANNEL_TEXCOORD_U_BIT` texcoord.u channel bit
`static int` | `GL20CHANNEL_TEXCOORD_V` texcoord.v channel
`static int` | `GL20CHANNEL_TEXCOORD_V_BIT` texcoord.v channel bit
`static int` | `GL20CHANNEL_TEXCOORD_W` texcoord.w channel
`static int` | `GL20CHANNEL_TEXCOORD_W_BIT` texcoord.w channel bit
`static int` | `GL20CHANNEL_X` x channel
`static int` | `GL20CHANNEL_X_BIT` x channel bit
`static int` | `GL20CHANNEL_XYZ_BITS` xyz channels bitmask
`static int` | `GL20CHANNEL_Y` y channel
`static int` | `GL20CHANNEL_Y_BIT` y channel bit
`static int` | `GL20CHANNEL_Z` z channel
`static int` | `GL20CHANNEL_Z_BIT` z channel bit

Fields inherited from class de.grogra.imp3d.gl20.GL20Resource
`GL20RESOURCE_CLASS_LIGHT, GL20RESOURCE_CLASS_MASK, GL20RESOURCE_CLASS_MESH, GL20RESOURCE_CLASS_SHADER, GL20RESOURCE_CLASS_SHADERFRAGMENT, GL20RESOURCE_CLASS_SHAPE, GL20RESOURCE_CLASS_TEXTURE, GL20RESOURCE_LIGHT_DIRECTIONAL, GL20RESOURCE_LIGHT_POINT, GL20RESOURCE_LIGHT_SPOT, GL20RESOURCE_MESH_MULTI_USER, GL20RESOURCE_MESH_SINGLE_USER, GL20RESOURCE_SHADER_PHONG, GL20RESOURCE_SHADER_RGBA, GL20RESOURCE_SHADERFRAGMENT_BLEND, GL20RESOURCE_SHADERFRAGMENT_GRAYTONE, GL20RESOURCE_SHADERFRAGMENT_RGB, GL20RESOURCE_SHAPE_BOX, GL20RESOURCE_SHAPE_FRUSTUM, GL20RESOURCE_SHAPE_LINE, GL20RESOURCE_SHAPE_LINE_STRIP, GL20RESOURCE_SHAPE_PARALLELOGRAM, GL20RESOURCE_SHAPE_PLANE, GL20RESOURCE_SHAPE_POLYGONS, GL20RESOURCE_SHAPE_SPHERE, GL20RESOURCE_TEXTURE, GL20RESOURCE_TEXTURE_CUBEMAP, GL20RESOURCE_TYPE_MASK`

Constructor Summary
`protected` | `GL20ResourceShaderFragment(int resourceClassType)`

Method Summary
`void` | `destroy()` every `GL20ResourceShaderFragment` have to override this method when it contains objects that should be released
`abstract boolean` | `fragmentAffectOnAlpha()` check if this `GL20ResourceShaderFragment` affect the alpha channel
`ChannelMap` | `getChannelMap()` return the equivalent `ChannelMap` to this `GL20ResourceShaderFragment`
`int` | `getScalarIndex(de.grogra.imp3d.gl20.GL20GLSLCode code, int channel)` get the index of the scalar value for the `code` that was created
`int` | `getVector3Index(de.grogra.imp3d.gl20.GL20GLSLCode code, int startChannel)` get the index of the vector3 for the `code` that was created
`int` | `getVector4Index(de.grogra.imp3d.gl20.GL20GLSLCode code, int startChannel)` get the index of the vector4 for the `code` that was created
`boolean` | `isUpToDate()` check if this `GL20ResourceShaderFragment` is up to date
`void` | `registerUser()` register one user of this `GL20ResourceShaderFragment`
`boolean` | `setChannelMap(ChannelMap channelMap)` set the equivalent `ChannelMap` to this `GL20ResourceShaderFragment`
`void` | `unregisterUser()` unregister one user of this `GL20ResourceShaderFragment`.
`void` | `update()` update this `GL20ResourceShaderFragment`

Methods inherited from class de.grogra.imp3d.gl20.GL20Resource
`getResourceClass, getResourceClassType, getResourceType`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### GL20CHANNEL_A

    public static final int GL20CHANNEL_A

  color.a channel

  See Also:
    Constant Field Values

### GL20CHANNEL_A_BIT

    public static final int GL20CHANNEL_A_BIT

  color.a channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_B

    public static final int GL20CHANNEL_B

  color.b channel

  See Also:
    Constant Field Values

### GL20CHANNEL_B_BIT

    public static final int GL20CHANNEL_B_BIT

  color.b channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_BITS

    public static final int GL20CHANNEL_DERIVATE_BITS

  all derivate channels bitmask

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_DU_BITS

    public static final int GL20CHANNEL_DERIVATE_DU_BITS

  derivate du channels bitmask

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_DV_BITS

    public static final int GL20CHANNEL_DERIVATE_DV_BITS

  derivate dv channels bitmask

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_MAX

    public static final int GL20CHANNEL_DERIVATE_MAX

  last derivate channel

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_MIN

    public static final int GL20CHANNEL_DERIVATE_MIN

  first derivate channel

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_X_DU

    public static final int GL20CHANNEL_DERIVATE_X_DU

  derivate x du channel

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_X_DU_BIT

    public static final int GL20CHANNEL_DERIVATE_X_DU_BIT

  derivate x du channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_X_DV

    public static final int GL20CHANNEL_DERIVATE_X_DV

  derivate x dv channel

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_X_DV_BIT

    public static final int GL20CHANNEL_DERIVATE_X_DV_BIT

  derivate x dv channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_Y_DU

    public static final int GL20CHANNEL_DERIVATE_Y_DU

  derivate y du channel

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_Y_DU_BIT

    public static final int GL20CHANNEL_DERIVATE_Y_DU_BIT

  derivate y du channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_Y_DV

    public static final int GL20CHANNEL_DERIVATE_Y_DV

  derivate y dv channel

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_Y_DV_BIT

    public static final int GL20CHANNEL_DERIVATE_Y_DV_BIT

  derivate y dv channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_Z_DU

    public static final int GL20CHANNEL_DERIVATE_Z_DU

  derivate z du channel

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_Z_DU_BIT

    public static final int GL20CHANNEL_DERIVATE_Z_DU_BIT

  derivate z du channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_Z_DV

    public static final int GL20CHANNEL_DERIVATE_Z_DV

  derivate z dv channel

  See Also:
    Constant Field Values

### GL20CHANNEL_DERIVATE_Z_DV_BIT

    public static final int GL20CHANNEL_DERIVATE_Z_DV_BIT

  derivate z dv channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_G

    public static final int GL20CHANNEL_G

  color.g channel

  See Also:
    Constant Field Values

### GL20CHANNEL_G_BIT

    public static final int GL20CHANNEL_G_BIT

  color.g channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_NORMAL_BITS

    public static final int GL20CHANNEL_NORMAL_BITS

  normal channels bitmask

  See Also:
    Constant Field Values

### GL20CHANNEL_NORMAL_X

    public static final int GL20CHANNEL_NORMAL_X

  normal.x channel

  See Also:
    Constant Field Values

### GL20CHANNEL_NORMAL_X_BIT

    public static final int GL20CHANNEL_NORMAL_X_BIT

  normal.x channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_NORMAL_Y

    public static final int GL20CHANNEL_NORMAL_Y

  normal.y channel

  See Also:
    Constant Field Values

### GL20CHANNEL_NORMAL_Y_BIT

    public static final int GL20CHANNEL_NORMAL_Y_BIT

  normal.y channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_NORMAL_Z

    public static final int GL20CHANNEL_NORMAL_Z

  normal.z channel

  See Also:
    Constant Field Values

### GL20CHANNEL_NORMAL_Z_BIT

    public static final int GL20CHANNEL_NORMAL_Z_BIT

  normal.z channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_POSITION_BITS

    public static final int GL20CHANNEL_POSITION_BITS

  position channels bitmask

  See Also:
    Constant Field Values

### GL20CHANNEL_POSITION_X

    public static final int GL20CHANNEL_POSITION_X

  position.x channel

  See Also:
    Constant Field Values

### GL20CHANNEL_POSITION_X_BIT

    public static final int GL20CHANNEL_POSITION_X_BIT

  position.x channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_POSITION_Y

    public static final int GL20CHANNEL_POSITION_Y

  position.y channel

  See Also:
    Constant Field Values

### GL20CHANNEL_POSITION_Y_BIT

    public static final int GL20CHANNEL_POSITION_Y_BIT

  position.y channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_POSITION_Z

    public static final int GL20CHANNEL_POSITION_Z

  position.z channel

  See Also:
    Constant Field Values

### GL20CHANNEL_POSITION_Z_BIT

    public static final int GL20CHANNEL_POSITION_Z_BIT

  position.z channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_R

    public static final int GL20CHANNEL_R

  color.r channel

  See Also:
    Constant Field Values

### GL20CHANNEL_R_BIT

    public static final int GL20CHANNEL_R_BIT

  color.r channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_RGB_BITS

    public static final int GL20CHANNEL_RGB_BITS

  rgb channels bitmask

  See Also:
    Constant Field Values

### GL20CHANNEL_RGBA_BITS

    public static final int GL20CHANNEL_RGBA_BITS

  rgba channels bitmask

  See Also:
    Constant Field Values

### GL20CHANNEL_TEXCOORD_BITS

    public static final int GL20CHANNEL_TEXCOORD_BITS

  texcoord channels bitmask

  See Also:
    Constant Field Values

### GL20CHANNEL_TEXCOORD_U

    public static final int GL20CHANNEL_TEXCOORD_U

  texcoord.u channel

  See Also:
    Constant Field Values

### GL20CHANNEL_TEXCOORD_U_BIT

    public static final int GL20CHANNEL_TEXCOORD_U_BIT

  texcoord.u channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_TEXCOORD_V

    public static final int GL20CHANNEL_TEXCOORD_V

  texcoord.v channel

  See Also:
    Constant Field Values

### GL20CHANNEL_TEXCOORD_V_BIT

    public static final int GL20CHANNEL_TEXCOORD_V_BIT

  texcoord.v channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_TEXCOORD_W

    public static final int GL20CHANNEL_TEXCOORD_W

  texcoord.w channel

  See Also:
    Constant Field Values

### GL20CHANNEL_TEXCOORD_W_BIT

    public static final int GL20CHANNEL_TEXCOORD_W_BIT

  texcoord.w channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_X

    public static final int GL20CHANNEL_X

  x channel

  See Also:
    Constant Field Values

### GL20CHANNEL_X_BIT

    public static final int GL20CHANNEL_X_BIT

  x channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_XYZ_BITS

    public static final int GL20CHANNEL_XYZ_BITS

  xyz channels bitmask

  See Also:
    Constant Field Values

### GL20CHANNEL_Y

    public static final int GL20CHANNEL_Y

  y channel

  See Also:
    Constant Field Values

### GL20CHANNEL_Y_BIT

    public static final int GL20CHANNEL_Y_BIT

  y channel bit

  See Also:
    Constant Field Values

### GL20CHANNEL_Z

    public static final int GL20CHANNEL_Z

  z channel

  See Also:
    Constant Field Values

### GL20CHANNEL_Z_BIT

    public static final int GL20CHANNEL_Z_BIT

  z channel bit

  See Also:
    Constant Field Values

Constructor Detail

### GL20ResourceShaderFragment

    protected GL20ResourceShaderFragment(int resourceClassType)

Method Detail

### destroy

    public void destroy()

  every `GL20ResourceShaderFragment` have to override this method when it contains objects that should be released

  Overrides:
    `destroy` in class `GL20Resource`

### fragmentAffectOnAlpha

    public abstract boolean fragmentAffectOnAlpha()

  check if this `GL20ResourceShaderFragment` affect the alpha channel

  Returns:
    `true` this `GL20ResourceShader` will affect the alpha channel `false` this `GL20ResourceShader` will not affect the alpha channel

### getChannelMap

    public ChannelMap getChannelMap()

  return the equivalent `ChannelMap` to this `GL20ResourceShaderFragment`

  Returns:
    the source `ChannelMap` for this `GL20ResourceShaderFragment`

### getScalarIndex

    public int getScalarIndex(de.grogra.imp3d.gl20.GL20GLSLCode code,
                              int channel)

  get the index of the scalar value for the `code` that was created

  Parameters:
    `code` - the class where the shader code is stored finally
    `channel` - the channel you want
  Returns:
    `-1` an error occurred otherwise the index of the scalar value. Test for the CONST_BIT to get the correct reference

### getVector3Index

    public int getVector3Index(de.grogra.imp3d.gl20.GL20GLSLCode code,
                               int startChannel)

  get the index of the vector3 for the `code` that was created

  Parameters:
    `code` - the class where the shader code is stored finally
    `startChannel` - the channels you want, starting with the given channel
  Returns:
    `-1` an error occurred otherwise the index of the vector3. Test for the CONST_BIT to get the correct reference

### getVector4Index

    public int getVector4Index(de.grogra.imp3d.gl20.GL20GLSLCode code,
                               int startChannel)

  get the index of the vector4 for the `code` that was created

  Parameters:
    `code` - the class where the shader code is stored finally
    `startChannel` - the channels you want, starting with the given channel
  Returns:
    `-1` an error occurred otherwise the index of the vector4. Test for the CONST_BIT to get the correct reference

### isUpToDate

    public boolean isUpToDate()

  check if this `GL20ResourceShaderFragment` is up to date

  Overrides:
    `isUpToDate` in class `GL20Resource`
  Returns:
    `true` this `GL20ResourceShaderFragment` is up to date `false` this `GL20ResourceShaderFragment` is not up to date, need an `update()` call
  See Also:
    `update()`

### registerUser

    public final void registerUser()

  register one user of this `GL20ResourceShaderFragment`

### setChannelMap

    public boolean setChannelMap(ChannelMap channelMap)

  set the equivalent `ChannelMap` to this `GL20ResourceShaderFragment`

  Parameters:
    `channelMap` - the `ChannelMap` that should be the source of for this `GL20ResourceShaderFragment`

### unregisterUser

    public final void unregisterUser()

  unregister one user of this `GL20ResourceShaderFragment`. When no more user exists, this `GL20ResourceShaderFragment` will destroy itself.

### update

    public void update()

  update this `GL20ResourceShaderFragment`

  Overrides:
    `update` in class `GL20Resource`

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD