public static final class JCGLRenderState.Builder extends Object
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.
| 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<? extends 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<? extends 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.jregions.core.unparameterized.areas.AreaL scissor)
Initializes the optional value
scissor to scissor. |
JCGLRenderState.Builder |
setScissor(Optional<? extends com.io7m.jregions.core.unparameterized.areas.AreaL> scissor)
Initializes the optional value
scissor to scissor. |
JCGLRenderState.Builder |
setStencilState(JCGLStencilStateType stencilState)
Initializes the value for the
stencilState attribute. |
public final JCGLRenderState.Builder from(JCGLRenderStateType instance)
JCGLRenderStateType instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final JCGLRenderState.Builder setBlendState(JCGLBlendStateType blendState)
blendState to blendState.blendState - The value for blendStatethis builder for chained invocationpublic final JCGLRenderState.Builder setBlendState(Optional<? extends JCGLBlendStateType> blendState)
blendState to blendState.blendState - The value for blendStatethis builder for use in a chained invocationpublic final JCGLRenderState.Builder setCullingState(JCGLCullingStateType cullingState)
cullingState to cullingState.cullingState - The value for cullingStatethis builder for chained invocationpublic final JCGLRenderState.Builder setCullingState(Optional<? extends JCGLCullingStateType> cullingState)
cullingState to cullingState.cullingState - The value for cullingStatethis builder for use in a chained invocationpublic final JCGLRenderState.Builder setColorBufferMaskingState(JCGLColorBufferMaskingStateType colorBufferMaskingState)
colorBufferMaskingState attribute.
If not set, this attribute will have a default value as returned by the initializer of colorBufferMaskingState.
colorBufferMaskingState - The value for colorBufferMaskingStatethis builder for use in a chained invocationpublic final JCGLRenderState.Builder setPolygonMode(JCGLPolygonMode polygonMode)
polygonMode attribute.
If not set, this attribute will have a default value as returned by the initializer of polygonMode.
polygonMode - The value for polygonModethis builder for use in a chained invocationpublic final JCGLRenderState.Builder setScissor(com.io7m.jregions.core.unparameterized.areas.AreaL scissor)
scissor to scissor.scissor - The value for scissorthis builder for chained invocationpublic final JCGLRenderState.Builder setScissor(Optional<? extends com.io7m.jregions.core.unparameterized.areas.AreaL> scissor)
scissor to scissor.scissor - The value for scissorthis builder for use in a chained invocationpublic final JCGLRenderState.Builder setDepthState(JCGLDepthStateType depthState)
depthState attribute.
If not set, this attribute will have a default value as returned by the initializer of depthState.
depthState - The value for depthStatethis builder for use in a chained invocationpublic final JCGLRenderState.Builder setStencilState(JCGLStencilStateType stencilState)
stencilState attribute.
If not set, this attribute will have a default value as returned by the initializer of stencilState.
stencilState - The value for stencilStatethis builder for use in a chained invocationpublic JCGLRenderState build()
JCGLRenderState.IllegalStateException - if any required attributes are missingCopyright © 2017 <code@io7m.com> http://io7m.com