com.io7m.r2.core.shaders.types

## Interface R2ShaderUsableType<M>

- Type Parameters:
    `M` - The type of parameter data
  All Superinterfaces:
    com.io7m.jcanephora.core.JCGLResourceUsableType
  All Known Subinterfaces:
    R2ShaderDepthBatchedType<M>, R2ShaderDepthBatchedUsableType<M>, R2ShaderDepthSingleType<M>, R2ShaderDepthSingleUsableType<M>, R2ShaderFilterType<M>, R2ShaderFilterUsableType<M>, R2ShaderInstanceBatchedType<M>, R2ShaderInstanceBatchedUsableType<M>, R2ShaderInstanceBillboardedType<M>, R2ShaderInstanceBillboardedUsableType<M>, R2ShaderInstanceSingleScreenType<M>, R2ShaderInstanceSingleScreenUsableType<M>, R2ShaderInstanceSingleType<M>, R2ShaderInstanceSingleUsableType<M>, R2ShaderLightProjectiveType<M>, R2ShaderLightProjectiveUsableType<M>, R2ShaderLightProjectiveWithShadowType<M>, R2ShaderLightProjectiveWithShadowUsableType<M>, R2ShaderLightScreenSingleType<M>, R2ShaderLightScreenSingleUsableType<M>, R2ShaderLightSingleType<M>, R2ShaderLightSingleUsableType<M>, R2ShaderLightVolumeSingleType<M>, R2ShaderLightVolumeSingleUsableType<M>, R2ShaderScreenType<M>, R2ShaderScreenUsableType<M>, R2ShaderTranslucentInstanceBatchedType<M>, R2ShaderTranslucentInstanceBatchedUsableType<M>, R2ShaderTranslucentInstanceBillboardedType<M>, R2ShaderTranslucentInstanceBillboardedUsableType<M>, R2ShaderTranslucentInstanceSingleType<M>, R2ShaderTranslucentInstanceSingleUsableType<M>, R2ShaderTranslucentType<M>, R2ShaderTranslucentUsableType<M>, R2ShaderType<M>
  All Known Implementing Classes:
    R2AbstractShader, R2DebugShaderLightDirectionalConstantSingle, R2DebugShaderLightSphericalAttenuationSingle, R2DebugShaderLightSphericalConstantSingle, R2DepthShaderBasicBatched, R2DepthShaderBasicSingle, R2DepthShaderBasicStippledSingle, R2LightShaderAmbientSingle, R2LightShaderDirectionalSpecularSingle, R2LightShaderProjectiveLambertBlinnPhongShadowVarianceSingle, R2LightShaderProjectiveLambertBlinnPhongSingle, R2LightShaderProjectiveLambertShadowVarianceSingle, R2LightShaderProjectiveLambertSingle, R2LightShaderSphericalLambertBlinnPhongSingle, R2LightShaderSphericalLambertPhongSingle, R2LightShaderSphericalLambertSingle, R2MaskShaderBatched, R2MaskShaderSingle, R2RefractionMaskedDeltaShaderBatched, R2RefractionMaskedDeltaShaderBillboarded, R2RefractionMaskedDeltaShaderSingle, R2ShaderDebugColorVerticesWorldPosition, R2ShaderDebugVisualBatched, R2ShaderDebugVisualBillboarded, R2ShaderDebugVisualScreen, R2ShaderDebugVisualSingle, R2ShaderDepthBatchedVerifier, R2ShaderDepthSingleVerifier, R2ShaderFilterBilateralBlurDepthAwareHorizontal4f, R2ShaderFilterBilateralBlurDepthAwareVertical4f, R2ShaderFilterBoxBlurHorizontal4f, R2ShaderFilterBoxBlurVertical4f, R2ShaderFilterDebugEyePosition, R2ShaderFilterDebugEyeZ, R2ShaderFilterEmission, R2ShaderFilterFogDepth, R2ShaderFilterFogDepthLinear, R2ShaderFilterFogDepthQuadratic, R2ShaderFilterFogDepthQuadraticInverse, R2ShaderFilterFXAAA, R2ShaderFilterLightApplicator, R2ShaderFilterOcclusionApplicator, R2ShaderFilterTextureShow, R2ShaderFilterVerifier, R2ShaderInstanceBatchedVerifier, R2ShaderInstanceBillboardedVerifier, R2ShaderInstanceSingleVerifier, R2ShaderLightProjectiveVerifier, R2ShaderLightProjectiveWithShadowVerifier, R2ShaderLightScreenSingleVerifier, R2ShaderLightVolumeSingleVerifier, R2ShaderLogDepthOnlySingle, R2ShaderSSAO, R2ShaderTranslucentInstanceBatchedVerifier, R2ShaderTranslucentInstanceBillboardedVerifier, R2ShaderTranslucentInstanceSingleVerifier, R2StencilShaderScreen, R2StencilShaderSingle, R2SurfaceShaderBasicBatched, R2SurfaceShaderBasicBillboarded, R2SurfaceShaderBasicReflectiveSingle, R2SurfaceShaderBasicSingle, R2SurfaceShaderBasicStippledSingle, R2TranslucentShaderBasicPremultipliedBatched, R2TranslucentShaderBasicPremultipliedBillboarded, R2TranslucentShaderBasicPremultipliedSingle

      public interface R2ShaderUsableType<M>
      extends com.io7m.jcanephora.core.JCGLResourceUsableType

  The type of usable shaders.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `onActivate(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g)` Activate the shader for rendering.
    `void` | `onDeactivate(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g)` Deactivate the shader.
    `void` | `onValidate()` Validate the shader prior to executing a draw call.
    `long` | `shaderID()`
    `Class<M>` | `shaderParametersType()`
    `com.io7m.jcanephora.core.JCGLProgramShaderUsableType` | `shaderProgram()`

    - ### Methods inherited from interface com.io7m.jcanephora.core.JCGLResourceUsableType

      `isDeleted`

- - ### Method Detail

    - #### shaderID

          long shaderID()

      Returns:
        The unique shader ID

    - #### shaderParametersType

          Class<M> shaderParametersType()

      Returns:
        The shader parameter type

    - #### shaderProgram

          com.io7m.jcanephora.core.JCGLProgramShaderUsableType shaderProgram()

      Returns:
        The compiled shader program

    - #### onActivate

          void onActivate(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g)

      Activate the shader for rendering.
      Parameters:
        `g` - A GL interface

    - #### onValidate

          void onValidate()
                   throws R2ExceptionShaderValidationFailed

      Validate the shader prior to executing a draw call. This method exists so that shader implementations can check that the caller has called all required methods before drawing.
      Throws:
        `R2ExceptionShaderValidationFailed` - If validation fails

    - #### onDeactivate

          void onDeactivate(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g)

      Deactivate the shader.
      Parameters:
        `g` - A GL interface

Copyright © 2016 <code@io7m.com> http://io7m.com