com.io7m.r2.core.shaders.types

## Interface R2ShaderTranslucentInstanceSingleUsableType<M>

- Type Parameters:
    `M` - The type of parameter data
  All Superinterfaces:
    com.io7m.jcanephora.core.JCGLResourceUsableType, R2ShaderTranslucentUsableType<M>, R2ShaderUsableType<M>
  All Known Subinterfaces:
    R2ShaderTranslucentInstanceSingleType<M>
  All Known Implementing Classes:
    R2RefractionMaskedDeltaShaderSingle, R2ShaderTranslucentInstanceSingleVerifier, R2TranslucentShaderBasicPremultipliedSingle

      public interface R2ShaderTranslucentInstanceSingleUsableType<M>
      extends R2ShaderTranslucentUsableType<M>

  The type of usable shaders for rendering the surfaces of translucent single instances.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `onReceiveInstanceTransformValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g, R2MatricesInstanceSingleValuesType m)` Set shader values that are derived from the current instance transform.
    `void` | `onReceiveMaterialValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g, R2ShaderParametersMaterialType<M> mat_parameters)` Set material values.
    `void` | `onReceiveViewValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g, R2ShaderParametersViewType view_parameters)` Set shader values that are derived from the current view.

    - ### Methods inherited from interface com.io7m.r2.core.shaders.types.R2ShaderTranslucentUsableType

      `suggestedBlendState`

    - ### Methods inherited from interface com.io7m.r2.core.shaders.types.R2ShaderUsableType

      `onActivate, onDeactivate, onValidate, shaderID, shaderParametersType, shaderProgram`

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

      `isDeleted`

- - ### Method Detail

    - #### onReceiveViewValues

          void onReceiveViewValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g,
                                   R2ShaderParametersViewType view_parameters)

      Set shader values that are derived from the current view.

      This method will be called exactly once between calls to `R2ShaderUsableType.onActivate(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type)` and `R2ShaderUsableType.onValidate()`.

      Parameters:
        `g` - An OpenGL interface
        `view_parameters` - The view parameters

    - #### onReceiveMaterialValues

          void onReceiveMaterialValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g,
                                       R2ShaderParametersMaterialType<M> mat_parameters)

      Set material values.

      This method will be called once for each group of instances that use the material `M`.

      This method will be called after a call to `R2ShaderUsableType.onActivate(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type)` and before a call to `R2ShaderUsableType.onValidate()`.

      Parameters:
        `g` - A texture interface
        `mat_parameters` - The material parameters

    - #### onReceiveInstanceTransformValues

          void onReceiveInstanceTransformValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g,
                                                R2MatricesInstanceSingleValuesType m)

      Set shader values that are derived from the current instance transform.

      This method will be called exactly once for each single instance that uses the shader.

      This method will be called after a call to `R2ShaderUsableType.onActivate(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type)` and before a call to `R2ShaderUsableType.onValidate()`.

      Parameters:
        `g` - An OpenGL interface
        `m` - The instance matrices

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