com.io7m.jcanephora.renderstate

## Class JCGLRenderState.Builder

- java.lang.Object
- - com.io7m.jcanephora.renderstate.JCGLRenderState.Builder

- Enclosing class:
    JCGLRenderState

      public static final class JCGLRenderState.Builder
      extends Object

  Builds instances of type `JCGLRenderState`. Initialize attributes and then invoke the `build()` method to create an immutable instance.

  `Builder` is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JCGLRenderState` | `build()` Builds a new `JCGLRenderState`.
    `JCGLRenderState.Builder` | `from(JCGLRenderStateType instance)` Fill a builder with attribute values from the provided `JCGLRenderStateType` instance.
    `JCGLRenderState.Builder` | `setBlendState(JCGLBlendStateType blendState)` Initializes the optional value `blendState` to blendState.
    `JCGLRenderState.Builder` | `setBlendState(Optional<JCGLBlendStateType> blendState)` Initializes the optional value `blendState` to blendState.
    `JCGLRenderState.Builder` | `setColorBufferMaskingState(JCGLColorBufferMaskingStateType colorBufferMaskingState)` Initializes the value for the `colorBufferMaskingState` attribute.
    `JCGLRenderState.Builder` | `setCullingState(JCGLCullingStateType cullingState)` Initializes the optional value `cullingState` to cullingState.
    `JCGLRenderState.Builder` | `setCullingState(Optional<JCGLCullingStateType> cullingState)` Initializes the optional value `cullingState` to cullingState.
    `JCGLRenderState.Builder` | `setDepthState(JCGLDepthStateType depthState)` Initializes the value for the `depthState` attribute.
    `JCGLRenderState.Builder` | `setPolygonMode(JCGLPolygonMode polygonMode)` Initializes the value for the `polygonMode` attribute.
    `JCGLRenderState.Builder` | `setScissor(com.io7m.jareas.core.AreaInclusiveUnsignedLType scissor)` Initializes the optional value `scissor` to scissor.
    `JCGLRenderState.Builder` | `setScissor(Optional<com.io7m.jareas.core.AreaInclusiveUnsignedLType> scissor)` Initializes the optional value `scissor` to scissor.
    `JCGLRenderState.Builder` | `setStencilState(JCGLStencilStateType stencilState)` Initializes the value for the `stencilState` attribute.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### from

          public final JCGLRenderState.Builder from(JCGLRenderStateType instance)

      Fill a builder with attribute values from the provided `JCGLRenderStateType` instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
        `instance` - The instance from which to copy values
      Returns:
        `this` builder for use in a chained invocation

    - #### setBlendState

          public final JCGLRenderState.Builder setBlendState(JCGLBlendStateType blendState)

      Initializes the optional value `blendState` to blendState.
      Parameters:
        `blendState` - The value for blendState
      Returns:
        `this` builder for chained invocation

    - #### setBlendState

          public final JCGLRenderState.Builder setBlendState(Optional<JCGLBlendStateType> blendState)

      Initializes the optional value `blendState` to blendState.
      Parameters:
        `blendState` - The value for blendState
      Returns:
        `this` builder for use in a chained invocation

    - #### setCullingState

          public final JCGLRenderState.Builder setCullingState(JCGLCullingStateType cullingState)

      Initializes the optional value `cullingState` to cullingState.
      Parameters:
        `cullingState` - The value for cullingState
      Returns:
        `this` builder for chained invocation

    - #### setCullingState

          public final JCGLRenderState.Builder setCullingState(Optional<JCGLCullingStateType> cullingState)

      Initializes the optional value `cullingState` to cullingState.
      Parameters:
        `cullingState` - The value for cullingState
      Returns:
        `this` builder for use in a chained invocation

    - #### setColorBufferMaskingState

          public final JCGLRenderState.Builder setColorBufferMaskingState(JCGLColorBufferMaskingStateType colorBufferMaskingState)

      Initializes the value for the `colorBufferMaskingState` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `colorBufferMaskingState`.

      Parameters:
        `colorBufferMaskingState` - The value for colorBufferMaskingState
      Returns:
        `this` builder for use in a chained invocation

    - #### setPolygonMode

          public final JCGLRenderState.Builder setPolygonMode(JCGLPolygonMode polygonMode)

      Initializes the value for the `polygonMode` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `polygonMode`.

      Parameters:
        `polygonMode` - The value for polygonMode
      Returns:
        `this` builder for use in a chained invocation

    - #### setScissor

          public final JCGLRenderState.Builder setScissor(com.io7m.jareas.core.AreaInclusiveUnsignedLType scissor)

      Initializes the optional value `scissor` to scissor.
      Parameters:
        `scissor` - The value for scissor
      Returns:
        `this` builder for chained invocation

    - #### setScissor

          public final JCGLRenderState.Builder setScissor(Optional<com.io7m.jareas.core.AreaInclusiveUnsignedLType> scissor)

      Initializes the optional value `scissor` to scissor.
      Parameters:
        `scissor` - The value for scissor
      Returns:
        `this` builder for use in a chained invocation

    - #### setDepthState

          public final JCGLRenderState.Builder setDepthState(JCGLDepthStateType depthState)

      Initializes the value for the `depthState` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `depthState`.

      Parameters:
        `depthState` - The value for depthState
      Returns:
        `this` builder for use in a chained invocation

    - #### setStencilState

          public final JCGLRenderState.Builder setStencilState(JCGLStencilStateType stencilState)

      Initializes the value for the `stencilState` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `stencilState`.

      Parameters:
        `stencilState` - The value for stencilState
      Returns:
        `this` builder for use in a chained invocation

    - #### build

          public JCGLRenderState build()

      Builds a new `JCGLRenderState`.
      Returns:
        An immutable instance of JCGLRenderState
      Throws:
        `IllegalStateException` - if any required attributes are missing

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