com.io7m.jcanephora.core.api

## Interface JCGLTexturesCubeType

- All Known Subinterfaces:
    JCGLTexturesType

      public interface JCGLTexturesCubeType

  The interface to OpenGL cube textures.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `JCGLTextureCubeType` | `textureCubeAllocate(JCGLTextureUnitType unit, long size, JCGLTextureFormat format, JCGLTextureWrapR wrap_r, JCGLTextureWrapS wrap_s, JCGLTextureWrapT wrap_t, JCGLTextureFilterMinification min_filter, JCGLTextureFilterMagnification mag_filter)` Allocate a cube texture of width `size` and height `size` of format `format`, binding it to `unit`.
    `void` | `textureCubeBind(JCGLTextureUnitType unit, JCGLTextureCubeUsableType texture)` Bind the texture `texture` to the texture unit `unit`.
    `void` | `textureCubeDelete(JCGLTextureCubeType texture)` Deletes the texture referenced by `texture`.
    `ByteBuffer` | `textureCubeGetImageLH(JCGLTextureUnitType unit, JCGLCubeMapFaceLH face, JCGLTextureCubeUsableType texture)` Fetch image data for the given face of the given texture.
    `default ByteBuffer` | `textureCubeGetImageRH(JCGLTextureUnitType unit, JCGLCubeMapFaceRH face, JCGLTextureCubeUsableType texture)` Fetch image data for the given face of the given texture.
    `boolean` | `textureCubeIsBound(JCGLTextureUnitType unit, JCGLTextureCubeUsableType texture)`
    `boolean` | `textureCubeIsBoundAnywhere(JCGLTextureCubeUsableType texture)`
    `void` | `textureCubeRegenerateMipmaps(JCGLTextureUnitType unit)` Regenerate the mipmaps for the cube texture bound to the texture unit `unit`.
    `void` | `textureCubeUpdateLH(JCGLTextureUnitType unit, JCGLCubeMapFaceLH face, JCGLTextureCubeUpdateType data)` Replace the contents (or part of the contents) of the face `face` of the cube map texture `data.getTexture()` with `data`, assuming a cube map that uses a left-handed coordinate system (the OpenGL default).
    `default void` | `textureCubeUpdateRH(JCGLTextureUnitType unit, JCGLCubeMapFaceRH face, JCGLTextureCubeUpdateType data)` Replace the contents (or part of the contents) of the face `face` of the cube map texture `data.getTexture()` with `data`, assuming a cube map that uses a right-handed coordinate system.

- - ### Method Detail

    - #### textureCubeBind

          void textureCubeBind(JCGLTextureUnitType unit,
                               JCGLTextureCubeUsableType texture)
                        throws JCGLException

      Bind the texture `texture` to the texture unit `unit`. Any existing bound texture (of any type) is unbound.
      Parameters:
        `unit` - The texture unit
        `texture` - The texture
      Throws:
        `JCGLException` - Iff an OpenGL error occurs
      See Also:
        `JCGLTexturesType.textureUnitUnbind(JCGLTextureUnitType)`

    - #### textureCubeDelete

          void textureCubeDelete(JCGLTextureCubeType texture)
                          throws JCGLException

      Deletes the texture referenced by `texture`.
      Parameters:
        `texture` - The texture
      Throws:
        `JCGLException` - Iff an OpenGL error occurs

    - #### textureCubeIsBound

          boolean textureCubeIsBound(JCGLTextureUnitType unit,
                                     JCGLTextureCubeUsableType texture)
                              throws JCGLException

      Parameters:
        `unit` - The texture unit
        `texture` - The texture
      Returns:
        `true` iff the texture `texture` is bound to the texture unit `unit`.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs

    - #### textureCubeIsBoundAnywhere

          boolean textureCubeIsBoundAnywhere(JCGLTextureCubeUsableType texture)
                                      throws JCGLException

      Parameters:
        `texture` - The texture
      Returns:
        `true` iff the texture `texture` is bound to any texture unit.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs

    - #### textureCubeUpdateLH

          void textureCubeUpdateLH(JCGLTextureUnitType unit,
                                   JCGLCubeMapFaceLH face,
                                   JCGLTextureCubeUpdateType data)
                            throws JCGLException

      Replace the contents (or part of the contents) of the face `face` of the cube map texture `data.getTexture()` with `data`, assuming a cube map that uses a left-handed coordinate system (the OpenGL default).

      If the texture has minification filters that require mipmaps, mipmaps will be generated during the update.

      Parameters:
        `unit` - The texture unit that will be used to perform the update
        `face` - The cube face to modify
        `data` - The data to upload
      Throws:
        `JCGLException` - Iff an OpenGL error occurs

    - #### textureCubeUpdateRH

          default void textureCubeUpdateRH(JCGLTextureUnitType unit,
                                           JCGLCubeMapFaceRH face,
                                           JCGLTextureCubeUpdateType data)
                                    throws JCGLException

      Replace the contents (or part of the contents) of the face `face` of the cube map texture `data.getTexture()` with `data`, assuming a cube map that uses a right-handed coordinate system.

      If the texture has minification filters that require mipmaps, mipmaps will be generated during the update.

      Parameters:
        `unit` - The texture unit that will be used to perform the update
        `face` - The cube face to modify
        `data` - The data to upload
      Throws:
        `JCGLException` - Iff an OpenGL error occurs

    - #### textureCubeAllocate

          JCGLTextureCubeType textureCubeAllocate(JCGLTextureUnitType unit,
                                                  long size,
                                                  JCGLTextureFormat format,
                                                  JCGLTextureWrapR wrap_r,
                                                  JCGLTextureWrapS wrap_s,
                                                  JCGLTextureWrapT wrap_t,
                                                  JCGLTextureFilterMinification min_filter,
                                                  JCGLTextureFilterMagnification mag_filter)
                                           throws JCGLException

      Allocate a cube texture of width `size` and height `size` of format `format`, binding it to `unit`.

      The texture is wrapped around the `r` axis using the wrapping mode `wrap_r`, with the OpenGL default being `TEXTURE_WRAP_REPEAT`.

      The texture is wrapped around the `s` axis using the wrapping mode `wrap_s`, with the OpenGL default being `TEXTURE_WRAP_REPEAT`.

      The texture is wrapped around the `t` axis using the wrapping mode `wrap_t`, with the OpenGL default being `TEXTURE_WRAP_REPEAT`.

      The texture is scaled down using the minification filter `min_filter`, with the OpenGL default being `TEXURE_FILTER_LINEAR`.

      The texture is scaled up using the magnification filter `mag_filter`, with the OpenGL default being `TEXTURE_FILTER_LINEAR`.

      Parameters:
        `unit` - The texture unit to which the texture will be initially bound
        `size` - The width and height in pixels
        `format` - The texture format
        `wrap_r` - The method with which to wrap textures around the `r` axis
        `wrap_s` - The method with which to wrap textures around the `s` axis
        `wrap_t` - The method with which to wrap textures around the `t` axis
        `min_filter` - The minification filter
        `mag_filter` - The magnification filter
      Returns:
        An allocated texture
      Throws:
        `JCGLException` - Iff an OpenGL error occurs

    - #### textureCubeGetImageLH

          ByteBuffer textureCubeGetImageLH(JCGLTextureUnitType unit,
                                           JCGLCubeMapFaceLH face,
                                           JCGLTextureCubeUsableType texture)
                                    throws JCGLException

      Fetch image data for the given face of the given texture.

      Fetching texture data requires binding and unbinding textures, and the given `unit` will be used to perform the retrieval, breaking any associated bindings for that unit. The texture will remain bound to `unit` when the function returns.

      Parameters:
        `unit` - The texture unit that will be used to fetch the data
        `face` - The cube map face that will be fetched
        `texture` - The texture
      Returns:
        The texture image data associated with `texture`
      Throws:
        `JCGLException` - Iff an OpenGL error occurs

    - #### textureCubeGetImageRH

          default ByteBuffer textureCubeGetImageRH(JCGLTextureUnitType unit,
                                                   JCGLCubeMapFaceRH face,
                                                   JCGLTextureCubeUsableType texture)
                                            throws JCGLException

      Fetch image data for the given face of the given texture.

      Fetching texture data requires binding and unbinding textures, and the given `unit` will be used to perform the retrieval, breaking any associated bindings for that unit. The texture will remain bound to `unit` when the function returns.

      Parameters:
        `unit` - The texture unit that will be used to fetch the data
        `face` - The cube map face that will be fetched
        `texture` - The texture
      Returns:
        The texture image data associated with `texture`
      Throws:
        `JCGLException` - Iff an OpenGL error occurs

    - #### textureCubeRegenerateMipmaps

          void textureCubeRegenerateMipmaps(JCGLTextureUnitType unit)
                                     throws JCGLException

      Regenerate the mipmaps for the cube texture bound to the texture unit `unit`. If the texture does not have mipmaps, the function has no effect.
      Parameters:
        `unit` - The texture unit
      Throws:
        `JCGLException` - Iff an OpenGL error occurs

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