com.io7m.jcanephora.core.api

## Interface JCGLDepthBuffersType

- All Superinterfaces:
    JCGLDepthClampingType

      public interface JCGLDepthBuffersType
      extends JCGLDepthClampingType

  The interface to OpenGL depth buffers.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `depthBufferClear(float depth)` Clear the depth buffer with the specified value `depth`.
    `int` | `depthBufferGetBits()`
    `void` | `depthBufferTestDisable()` Disable depth testing.
    `void` | `depthBufferTestEnable(JCGLDepthFunction function)` Enable depth testing with the given `function`.
    `boolean` | `depthBufferTestIsEnabled()`
    `void` | `depthBufferWriteDisable()` Disable writing to the depth buffer.
    `void` | `depthBufferWriteEnable()` Enable writing to the depth buffer.
    `boolean` | `depthBufferWriteIsEnabled()`

    - ### Methods inherited from interface com.io7m.jcanephora.core.api.JCGLDepthClampingType

      `depthClampingDisable, depthClampingEnable, depthClampingIsEnabled`

- - ### Method Detail

    - #### depthBufferClear

          void depthBufferClear(float depth)
                         throws JCGLException,
                                JCGLExceptionNoDepthBuffer

      Clear the depth buffer with the specified value `depth`.

      Clearing will have no effect if writing to the depth buffer is disabled.

      Parameters:
        `depth` - The depth value
      Throws:
        `JCGLException` - Iff an OpenGL error occurs
        `JCGLExceptionNoDepthBuffer` - If no depth buffer is available
      See Also:
        `depthBufferWriteIsEnabled()`, `depthBufferWriteEnable()`, `depthBufferWriteDisable()`

    - #### depthBufferGetBits

          int depthBufferGetBits()
                          throws JCGLException

      Returns:
        The number of bits available in the depth buffer for the current framebuffer configuration.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs

    - #### depthBufferTestDisable

          void depthBufferTestDisable()
                               throws JCGLException,
                                      JCGLExceptionNoDepthBuffer

      Disable depth testing.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs
        `JCGLExceptionNoDepthBuffer` - If no depth buffer is available

    - #### depthBufferTestEnable

          void depthBufferTestEnable(JCGLDepthFunction function)
                              throws JCGLException,
                                     JCGLExceptionNoDepthBuffer

      Enable depth testing with the given `function`. The OpenGL default for `function` is `LESS_THAN`.
      Parameters:
        `function` - The depth function
      Throws:
        `JCGLException` - Iff an OpenGL error occurs
        `JCGLExceptionNoDepthBuffer` - If no depth buffer is available

    - #### depthBufferTestIsEnabled

          boolean depthBufferTestIsEnabled()
                                    throws JCGLException,
                                           JCGLExceptionNoDepthBuffer

      Returns:
        `true` iff depth testing is enabled.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs
        `JCGLExceptionNoDepthBuffer` - If no depth buffer is available

    - #### depthBufferWriteDisable

          void depthBufferWriteDisable()
                                throws JCGLException,
                                       JCGLExceptionNoDepthBuffer

      Disable writing to the depth buffer.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs
        `JCGLExceptionNoDepthBuffer` - If no depth buffer is available

    - #### depthBufferWriteEnable

          void depthBufferWriteEnable()
                               throws JCGLException,
                                      JCGLExceptionNoDepthBuffer

      Enable writing to the depth buffer.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs
        `JCGLExceptionNoDepthBuffer` - If no depth buffer is available

    - #### depthBufferWriteIsEnabled

          boolean depthBufferWriteIsEnabled()
                                     throws JCGLException,
                                            JCGLExceptionNoDepthBuffer

      Returns:
        `true` iff depth writing is enabled.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs
        `JCGLExceptionNoDepthBuffer` - If no depth buffer is available

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