com.io7m.r2.core

## Class R2GeometryBuffer

- java.lang.Object
- - com.io7m.r2.core.R2GeometryBuffer

- All Implemented Interfaces:
    com.io7m.jcanephora.core.JCGLResourceSizedType, com.io7m.jcanephora.core.JCGLResourceUsableType, R2DeletableType, R2GeometryBufferType, R2GeometryBufferUsableType, R2RenderTargetType<R2GeometryBufferDescriptionType>, R2RenderTargetUsableType<R2GeometryBufferDescriptionType>

      public final class R2GeometryBuffer
      extends Object
      implements R2GeometryBufferType

  Default implementation of the `R2GeometryBufferType` interface.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `R2Texture2DUsableType` | `albedoEmissiveTexture()`
    `com.io7m.jareas.core.AreaInclusiveUnsignedLType` | `area()`
    `void` | `clearBoundPrimaryFramebuffer(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g)` Clear the primary framebuffer to render target specific default values, changing any current render state necessary to achieve this.
    `void` | `delete(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g)` Delete the current object.
    `R2Texture2DUsableType` | `depthTexture()`
    `R2GeometryBufferDescriptionType` | `description()`
    `com.io7m.junsigned.ranges.UnsignedRangeInclusiveL` | `getRange()`
    `boolean` | `isDeleted()`
    `static R2GeometryBufferType` | `newGeometryBuffer(com.io7m.jcanephora.core.api.JCGLFramebuffersType g_fb, com.io7m.jcanephora.core.api.JCGLTexturesType g_t, com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextParentType tc, R2GeometryBufferDescriptionType desc)` Construct a new geometry buffer.
    `R2Texture2DUsableType` | `normalTexture()`
    `com.io7m.jcanephora.core.JCGLFramebufferUsableType` | `primaryFramebuffer()`
    `Optional<R2Texture2DUsableType>` | `specularTexture()`

    - ### 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.R2GeometryBufferUsableType

      `getSpecularTextureOrDefault`

- - ### Method Detail

    - #### newGeometryBuffer

          public static R2GeometryBufferType newGeometryBuffer(com.io7m.jcanephora.core.api.JCGLFramebuffersType g_fb,
                                                               com.io7m.jcanephora.core.api.JCGLTexturesType g_t,
                                                               com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextParentType tc,
                                                               R2GeometryBufferDescriptionType desc)

      Construct a new geometry buffer.
      Parameters:
        `g_fb` - A framebuffer interface
        `g_t` - A texture interface
        `tc` - A texture unit context
        `desc` - The geometry buffer description
      Returns:
        A new geometry buffer

    - #### albedoEmissiveTexture

          public R2Texture2DUsableType albedoEmissiveTexture()

      Specified by:
        `albedoEmissiveTexture` in interface `R2GeometryBufferUsableType`
      Returns:
        The albedo/emissive texture

    - #### normalTexture

          public R2Texture2DUsableType normalTexture()

      Specified by:
        `normalTexture` in interface `R2GeometryBufferUsableType`
      Returns:
        The normal texture

    - #### specularTexture

          public Optional<R2Texture2DUsableType> specularTexture()

      Specified by:
        `specularTexture` in interface `R2GeometryBufferUsableType`
      Returns:
        The specular texture

    - #### depthTexture

          public R2Texture2DUsableType depthTexture()

      Specified by:
        `depthTexture` in interface `R2GeometryBufferUsableType`
      Returns:
        The depth/stencil texture

    - #### primaryFramebuffer

          public com.io7m.jcanephora.core.JCGLFramebufferUsableType primaryFramebuffer()

      Specified by:
        `primaryFramebuffer` in interface `R2RenderTargetUsableType<R2GeometryBufferDescriptionType>`
      Returns:
        The framebuffer

    - #### area

          public com.io7m.jareas.core.AreaInclusiveUnsignedLType area()

      Specified by:
        `area` in interface `R2RenderTargetUsableType<R2GeometryBufferDescriptionType>`
      Returns:
        The viewport area

    - #### description

          public R2GeometryBufferDescriptionType description()

      Specified by:
        `description` in interface `R2RenderTargetUsableType<R2GeometryBufferDescriptionType>`
      Returns:
        The description used to create the render target

    - #### getRange

          public com.io7m.junsigned.ranges.UnsignedRangeInclusiveL getRange()

      Specified by:
        `getRange` in interface `com.io7m.jcanephora.core.JCGLResourceSizedType`

    - #### isDeleted

          public boolean isDeleted()

      Specified by:
        `isDeleted` in interface `com.io7m.jcanephora.core.JCGLResourceUsableType`

    - #### delete

          public void delete(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g)
                      throws R2Exception

      Description copied from interface: `R2DeletableType`
      Delete the current object.
      Specified by:
        `delete` in interface `R2DeletableType`
      Parameters:
        `g` - An OpenGL interface
      Throws:
        `R2Exception` - On errors

    - #### clearBoundPrimaryFramebuffer

          public void clearBoundPrimaryFramebuffer(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g)
                                            throws R2RendererExceptionFramebufferNotBound

      Description copied from interface: `R2RenderTargetUsableType`
      Clear the primary framebuffer to render target specific default values, changing any current render state necessary to achieve this.
      Specified by:
        `clearBoundPrimaryFramebuffer` in interface `R2RenderTargetUsableType<R2GeometryBufferDescriptionType>`
      Parameters:
        `g` - A GL interface
      Throws:
        `R2RendererExceptionFramebufferNotBound` - If the framebuffer is not bound

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