com.io7m.r2.core

## Interface R2TextureUsableType

- All Superinterfaces:
    com.io7m.jcanephora.core.JCGLResourceUsableType
  All Known Subinterfaces:
    R2Texture2DStaticType, R2Texture2DType, R2Texture2DUsableType, R2TextureCubeStaticType, R2TextureCubeType, R2TextureCubeUsableType
  All Known Implementing Classes:
    R2Texture2DStatic, R2TextureCubeStatic

      public interface R2TextureUsableType
      extends com.io7m.jcanephora.core.JCGLResourceUsableType

  The type of usable textures.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `<A,B> B` | `matchTexture(A context, BiFunction<A,R2Texture2DUsableType,B> on_2d, BiFunction<A,R2TextureCubeUsableType,B> on_cube)` Match on the type of texture.

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

      `isDeleted`

- - ### Method Detail

    - #### matchTexture

          <A,B> B matchTexture(A context,
                               BiFunction<A,R2Texture2DUsableType,B> on_2d,
                               BiFunction<A,R2TextureCubeUsableType,B> on_cube)

      Match on the type of texture.
      Type Parameters:
        `A` - The type of context values
        `B` - The type of returned values
      Parameters:
        `context` - A user-defined context value
        `on_2d` - Evaluated on values of type `R2Texture2DUsableType`
        `on_cube` - Evaluated on values of type `R2TextureCubeUsableType`
      Returns:
        The value returned by one of the given functions

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