com.io7m.jcanephora.renderstate

## Class JCGLBlendState.Builder

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

- Enclosing class:
    JCGLBlendState

      public static final class JCGLBlendState.Builder
      extends Object

  Builds instances of type `JCGLBlendState`. 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
    --- | ---
    `JCGLBlendState` | `build()` Builds a new `JCGLBlendState`.
    `JCGLBlendState.Builder` | `from(JCGLBlendStateType instance)` Fill a builder with attribute values from the provided `JCGLBlendStateType` instance.
    `JCGLBlendState.Builder` | `setBlendEquationAlpha(JCGLBlendEquation blendEquationAlpha)` Initializes the value for the `blendEquationAlpha` attribute.
    `JCGLBlendState.Builder` | `setBlendEquationRGB(JCGLBlendEquation blendEquationRGB)` Initializes the value for the `blendEquationRGB` attribute.
    `JCGLBlendState.Builder` | `setBlendFunctionSourceAlpha(JCGLBlendFunction blendFunctionSourceAlpha)` Initializes the value for the `blendFunctionSourceAlpha` attribute.
    `JCGLBlendState.Builder` | `setBlendFunctionSourceRGB(JCGLBlendFunction blendFunctionSourceRGB)` Initializes the value for the `blendFunctionSourceRGB` attribute.
    `JCGLBlendState.Builder` | `setBlendFunctionTargetAlpha(JCGLBlendFunction blendFunctionTargetAlpha)` Initializes the value for the `blendFunctionTargetAlpha` attribute.
    `JCGLBlendState.Builder` | `setBlendFunctionTargetRGB(JCGLBlendFunction blendFunctionTargetRGB)` Initializes the value for the `blendFunctionTargetRGB` attribute.

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

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

- - ### Method Detail

    - #### from

          public final JCGLBlendState.Builder from(JCGLBlendStateType instance)

      Fill a builder with attribute values from the provided `JCGLBlendStateType` 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

    - #### setBlendFunctionSourceRGB

          public final JCGLBlendState.Builder setBlendFunctionSourceRGB(JCGLBlendFunction blendFunctionSourceRGB)

      Initializes the value for the `blendFunctionSourceRGB` attribute.

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

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

    - #### setBlendFunctionSourceAlpha

          public final JCGLBlendState.Builder setBlendFunctionSourceAlpha(JCGLBlendFunction blendFunctionSourceAlpha)

      Initializes the value for the `blendFunctionSourceAlpha` attribute.

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

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

    - #### setBlendFunctionTargetRGB

          public final JCGLBlendState.Builder setBlendFunctionTargetRGB(JCGLBlendFunction blendFunctionTargetRGB)

      Initializes the value for the `blendFunctionTargetRGB` attribute.

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

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

    - #### setBlendFunctionTargetAlpha

          public final JCGLBlendState.Builder setBlendFunctionTargetAlpha(JCGLBlendFunction blendFunctionTargetAlpha)

      Initializes the value for the `blendFunctionTargetAlpha` attribute.

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

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

    - #### setBlendEquationRGB

          public final JCGLBlendState.Builder setBlendEquationRGB(JCGLBlendEquation blendEquationRGB)

      Initializes the value for the `blendEquationRGB` attribute.

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

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

    - #### setBlendEquationAlpha

          public final JCGLBlendState.Builder setBlendEquationAlpha(JCGLBlendEquation blendEquationAlpha)

      Initializes the value for the `blendEquationAlpha` attribute.

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

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

    - #### build

          public JCGLBlendState build()

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

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