com.threerings.opengl.renderer.state
Class ColorMaskState

java.lang.Object
  extended by com.threerings.opengl.renderer.state.RenderState
      extended by com.threerings.opengl.renderer.state.ColorMaskState

public class ColorMaskState
extends RenderState

Contains the color mask state.


Field Summary
static ColorMaskState ALL
          All colors enabled.
static ColorMaskState NONE
          All colors disabled.
 
Fields inherited from class com.threerings.opengl.renderer.state.RenderState
ALPHA_STATE, ARRAY_STATE, COLOR_MASK_STATE, COLOR_STATE, CULL_STATE, DEPTH_STATE, FOG_STATE, LIGHT_STATE, LINE_STATE, MATERIAL_STATE, POINT_STATE, POLYGON_STATE, SHADER_STATE, STATE_COUNT, STENCIL_STATE, TEXTURE_STATE, TRANSFORM_STATE
 
Constructor Summary
ColorMaskState(boolean red, boolean green, boolean blue, boolean alpha)
          Creates a new color mask state with the supplied parameters.
 
Method Summary
 void apply(Renderer renderer)
          Applies this state.
 boolean getAlpha()
          Checks whether the mask allows writing alpha values.
 boolean getBlue()
          Checks whether the mask allows writing blue values.
 boolean getGreen()
          Checks whether the mask allows writing green values.
static ColorMaskState getInstance(boolean red, boolean green, boolean blue, boolean alpha)
          Returns a color mask state instance with the supplied parameters.
 boolean getRed()
          Checks whether the mask allows writing red values.
 int getType()
          Returns the type of this state.
 
Methods inherited from class com.threerings.opengl.renderer.state.RenderState
copy, createDefaultSet, createEmptySet, getDefaults, isDirty, setDirty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL

public static final ColorMaskState ALL
All colors enabled.


NONE

public static final ColorMaskState NONE
All colors disabled.

Constructor Detail

ColorMaskState

public ColorMaskState(boolean red,
                      boolean green,
                      boolean blue,
                      boolean alpha)
Creates a new color mask state with the supplied parameters.

Method Detail

getInstance

public static ColorMaskState getInstance(boolean red,
                                         boolean green,
                                         boolean blue,
                                         boolean alpha)
Returns a color mask state instance with the supplied parameters. All requests for instances with the same parameters will return the same object.


getRed

public boolean getRed()
Checks whether the mask allows writing red values.


getGreen

public boolean getGreen()
Checks whether the mask allows writing green values.


getBlue

public boolean getBlue()
Checks whether the mask allows writing blue values.


getAlpha

public boolean getAlpha()
Checks whether the mask allows writing alpha values.


getType

public int getType()
Description copied from class: RenderState
Returns the type of this state.

Specified by:
getType in class RenderState

apply

public void apply(Renderer renderer)
Description copied from class: RenderState
Applies this state.

Specified by:
apply in class RenderState


Copyright © 2011. All Rights Reserved.