com.threerings.opengl.renderer.state
Class CullState

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

public class CullState
extends RenderState

Contains the back-face culling state.


Field Summary
static CullState BACK_FACE
          A state that enables back-face culling.
static CullState DISABLED
          A state that disables back-face culling.
static CullState FRONT_FACE
          A state that enabled front-face culling.
 
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
CullState(int cullFace)
          Creates a new back-face culling state.
 
Method Summary
 void apply(Renderer renderer)
          Applies this state.
 boolean equals(Object other)
           
 int getCullFace()
          Returns the cull face constant.
static CullState getInstance(int cullFace)
          If there is a shared instance with the supplied parameters, returns a reference to it; otherwise, returns a new state with the parameters.
 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
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISABLED

public static final CullState DISABLED
A state that disables back-face culling.


BACK_FACE

public static final CullState BACK_FACE
A state that enables back-face culling.


FRONT_FACE

public static final CullState FRONT_FACE
A state that enabled front-face culling.

Constructor Detail

CullState

public CullState(int cullFace)
Creates a new back-face culling state.

Method Detail

getInstance

public static CullState getInstance(int cullFace)
If there is a shared instance with the supplied parameters, returns a reference to it; otherwise, returns a new state with the parameters.


getCullFace

public int getCullFace()
Returns the cull face constant.


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

equals

public boolean equals(Object other)
Overrides:
equals in class Object


Copyright © 2011. All Rights Reserved.