com.io7m.r2.core.shaders.provided

## Class R2DepthShaderBasicStippledSingle

- java.lang.Object
- - com.io7m.r2.core.shaders.provided.R2AbstractShader<R2DepthShaderBasicStippledParameters>
  - - com.io7m.r2.core.shaders.provided.R2DepthShaderBasicStippledSingle

- All Implemented Interfaces:
    com.io7m.jcanephora.core.JCGLResourceUsableType, R2DeletableType, R2ShaderDepthSingleType<R2DepthShaderBasicStippledParameters>, R2ShaderDepthSingleUsableType<R2DepthShaderBasicStippledParameters>, R2ShaderInstanceSingleType<R2DepthShaderBasicStippledParameters>, R2ShaderInstanceSingleUsableType<R2DepthShaderBasicStippledParameters>, R2ShaderType<R2DepthShaderBasicStippledParameters>, R2ShaderUsableType<R2DepthShaderBasicStippledParameters>

      public final class R2DepthShaderBasicStippledSingle
      extends R2AbstractShader<R2DepthShaderBasicStippledParameters>
      implements R2ShaderDepthSingleType<R2DepthShaderBasicStippledParameters>

  Basic depth shader for single instances.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static R2ShaderDepthSingleType<R2DepthShaderBasicStippledParameters>` | `newShader(com.io7m.jcanephora.core.api.JCGLShadersType in_shaders, R2ShaderPreprocessingEnvironmentReadableType in_shader_env, R2IDPoolType in_pool)` Construct a new shader.
    `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<R2DepthShaderBasicStippledParameters> 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.
    `void` | `onValidate()` Validate the shader prior to executing a draw call.
    `Class<R2DepthShaderBasicStippledParameters>` | `shaderParametersType()`

    - ### Methods inherited from class com.io7m.r2.core.shaders.provided.R2AbstractShader

      `delete, isDeleted, onActivate, onDeactivate, shaderID, shaderProgram`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.io7m.r2.core.R2DeletableType

      `delete`

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

      `onActivate, onDeactivate, shaderID, shaderProgram`

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

      `isDeleted`

- - ### Method Detail

    - #### newShader

          public static R2ShaderDepthSingleType<R2DepthShaderBasicStippledParameters> newShader(com.io7m.jcanephora.core.api.JCGLShadersType in_shaders,
                                                                                                R2ShaderPreprocessingEnvironmentReadableType in_shader_env,
                                                                                                R2IDPoolType in_pool)

      Construct a new shader.
      Parameters:
        `in_shaders` - A shader interface
        `in_shader_env` - The shader preprocessing environment
        `in_pool` - The ID pool
      Returns:
        A new shader

    - #### shaderParametersType

          public Class<R2DepthShaderBasicStippledParameters> shaderParametersType()

      Specified by:
        `shaderParametersType` in interface `R2ShaderUsableType<R2DepthShaderBasicStippledParameters>`
      Returns:
        The shader parameter type

    - #### onValidate

          public void onValidate()
                          throws R2ExceptionShaderValidationFailed

      Description copied from interface: `R2ShaderUsableType`
      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.
      Specified by:
        `onValidate` in interface `R2ShaderUsableType<R2DepthShaderBasicStippledParameters>`
      Throws:
        `R2ExceptionShaderValidationFailed` - If validation fails

    - #### onReceiveInstanceTransformValues

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

      Description copied from interface: `R2ShaderInstanceSingleUsableType`

      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()`.

      Specified by:
        `onReceiveInstanceTransformValues` in interface `R2ShaderInstanceSingleUsableType<R2DepthShaderBasicStippledParameters>`
      Parameters:
        `g` - An OpenGL interface
        `m` - The instance matrices

    - #### onReceiveViewValues

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

      Description copied from interface: `R2ShaderInstanceSingleUsableType`

      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()`.

      Specified by:
        `onReceiveViewValues` in interface `R2ShaderInstanceSingleUsableType<R2DepthShaderBasicStippledParameters>`
      Parameters:
        `g` - An OpenGL interface
        `view_parameters` - The view parameters

    - #### onReceiveMaterialValues

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

      Description copied from interface: `R2ShaderInstanceSingleUsableType`

      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()`.

      Specified by:
        `onReceiveMaterialValues` in interface `R2ShaderInstanceSingleUsableType<R2DepthShaderBasicStippledParameters>`
      Parameters:
        `g` - A texture interface
        `mat_parameters` - The material parameters

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