com.io7m.r2.core

## Interface R2DepthInstancesConsumerType

-     public interface R2DepthInstancesConsumerType

  The type of consumers of depth instances.

  Instances are batched in a manner that is intended to require the minimum number of state changes for rendering, based upon the relative cost of state changes.

  See Also:
    `R2SceneOpaquesConsumerType`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `onFinish()` Called when rendering of instances is finished.
    `<M> void` | `onInstanceBatched(R2MaterialDepthBatchedType<M> material, R2InstanceBatchedType i)` Called when a batched instance should be rendered.
    `<M> void` | `onInstanceBatchedMaterialFinish(R2MaterialDepthBatchedType<M> material)` Called after the current set of batched instances have finished rendering with the current material.
    `<M> void` | `onInstanceBatchedMaterialStart(R2MaterialDepthBatchedType<M> material)` Called when new material settings should be assigned, for batched instances.
    `<M> void` | `onInstanceBatchedShaderFinish(R2ShaderDepthBatchedUsableType<M> s)` Called when the current shader should be deactivated.
    `<M> void` | `onInstanceBatchedShaderStart(R2ShaderDepthBatchedUsableType<M> s)` Called when a new shader should be activated in order to start rendering batched instances.
    `void` | `onInstanceBatchedUpdate(R2InstanceBatchedType i)` Called when a batched instance should upload batch data to the GPU.
    `<M> void` | `onInstanceSingle(R2MaterialDepthSingleType<M> material, R2InstanceSingleType i)` Called when a single instance should be rendered.
    `void` | `onInstanceSingleArrayStart(R2InstanceSingleType i)` Called when a new array object should be bound, for single instances.
    `<M> void` | `onInstanceSingleMaterialFinish(R2MaterialDepthSingleType<M> material)` Called after the current set of single instances have finished rendering with the current material.
    `<M> void` | `onInstanceSingleMaterialStart(R2MaterialDepthSingleType<M> material)` Called when new material settings should be assigned, for single instances.
    `<M> void` | `onInstanceSingleShaderFinish(R2ShaderDepthSingleUsableType<M> s)` Called when the current shader should be deactivated.
    `<M> void` | `onInstanceSingleShaderStart(R2ShaderDepthSingleUsableType<M> s)` Called when a new shader should be activated in order to start rendering single instances.
    `void` | `onStart()` Called when rendering of instances begins.

- - ### Method Detail

    - #### onStart

          void onStart()

      Called when rendering of instances begins.

    - #### onInstanceBatchedUpdate

          void onInstanceBatchedUpdate(R2InstanceBatchedType i)

      Called when a batched instance should upload batch data to the GPU.
      Parameters:
        `i` - The batched instance

    - #### onInstanceBatchedShaderStart

          <M> void onInstanceBatchedShaderStart(R2ShaderDepthBatchedUsableType<M> s)

      Called when a new shader should be activated in order to start rendering batched instances.
      Type Parameters:
        `M` - The type of shader parameters
      Parameters:
        `s` - The shader

    - #### onInstanceBatchedMaterialStart

          <M> void onInstanceBatchedMaterialStart(R2MaterialDepthBatchedType<M> material)

      Called when new material settings should be assigned, for batched instances.
      Type Parameters:
        `M` - The type of shader parameters
      Parameters:
        `material` - The current material

    - #### onInstanceBatched

          <M> void onInstanceBatched(R2MaterialDepthBatchedType<M> material,
                                     R2InstanceBatchedType i)

      Called when a batched instance should be rendered.
      Type Parameters:
        `M` - The type of shader parameters
      Parameters:
        `material` - The current material
        `i` - The current instance

    - #### onInstanceBatchedMaterialFinish

          <M> void onInstanceBatchedMaterialFinish(R2MaterialDepthBatchedType<M> material)

      Called after the current set of batched instances have finished rendering with the current material.
      Type Parameters:
        `M` - The type of shader parameters
      Parameters:
        `material` - The current material

    - #### onInstanceBatchedShaderFinish

          <M> void onInstanceBatchedShaderFinish(R2ShaderDepthBatchedUsableType<M> s)

      Called when the current shader should be deactivated.
      Type Parameters:
        `M` - The type of shader parameters
      Parameters:
        `s` - The shader

    - #### onInstanceSingleShaderStart

          <M> void onInstanceSingleShaderStart(R2ShaderDepthSingleUsableType<M> s)

      Called when a new shader should be activated in order to start rendering single instances.
      Type Parameters:
        `M` - The type of shader parameters
      Parameters:
        `s` - The shader

    - #### onInstanceSingleMaterialStart

          <M> void onInstanceSingleMaterialStart(R2MaterialDepthSingleType<M> material)

      Called when new material settings should be assigned, for single instances.
      Type Parameters:
        `M` - The type of shader parameters
      Parameters:
        `material` - The current material

    - #### onInstanceSingleArrayStart

          void onInstanceSingleArrayStart(R2InstanceSingleType i)

      Called when a new array object should be bound, for single instances.
      Parameters:
        `i` - The current instance

    - #### onInstanceSingle

          <M> void onInstanceSingle(R2MaterialDepthSingleType<M> material,
                                    R2InstanceSingleType i)

      Called when a single instance should be rendered.
      Type Parameters:
        `M` - The type of shader parameters
      Parameters:
        `material` - The current material
        `i` - The current instance

    - #### onInstanceSingleMaterialFinish

          <M> void onInstanceSingleMaterialFinish(R2MaterialDepthSingleType<M> material)

      Called after the current set of single instances have finished rendering with the current material.
      Type Parameters:
        `M` - The type of shader parameters
      Parameters:
        `material` - The current material

    - #### onInstanceSingleShaderFinish

          <M> void onInstanceSingleShaderFinish(R2ShaderDepthSingleUsableType<M> s)

      Called when the current shader should be deactivated.
      Type Parameters:
        `M` - The type of shader parameters
      Parameters:
        `s` - The shader

    - #### onFinish

          void onFinish()

      Called when rendering of instances is finished.

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