|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.renderer.state.RenderState
com.threerings.opengl.renderer.state.AlphaState
public class AlphaState
Contains the alpha testing and blending state.
| Field Summary | |
|---|---|
static AlphaState |
ADDITIVE
An alpha state for additive objects. |
static AlphaState |
MASKED
An alpha state for masked opaque objects. |
static AlphaState |
OPAQUE
An alpha state for completely opaque objects. |
static AlphaState |
PREMULTIPLIED
An alpha state for objects with premultiplied alpha. |
static AlphaState |
TRANSLUCENT
An alpha state for translucent objects. |
| 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 | |
|---|---|
AlphaState(int alphaTestFunc,
float alphaTestRef,
int srcBlendFactor,
int destBlendFactor)
Creates a new alpha state. |
|
| Method Summary | |
|---|---|
void |
apply(Renderer renderer)
Applies this state. |
boolean |
equals(Object other)
|
int |
getAlphaTestFunc()
Returns the alpha test function. |
float |
getAlphaTestRef()
Returns the alpha test reference value. |
int |
getDestBlendFactor()
Returns the destination blend factor. |
static AlphaState |
getInstance(AlphaState state)
If there is a shared equivalent to the specified state, this method will return the shared state; otherwise, it will simply return the parameter. |
static AlphaState |
getInstance(int alphaTestFunc,
float alphaTestRef,
int srcBlendFactor,
int destBlendFactor)
If there is a shared instance with the supplied parameters, returns a reference to it; otherwise, returns a new state with the parameters. |
int |
getSrcBlendFactor()
Returns the source blend factor. |
static AlphaState |
getTestInstance(float reference)
Returns an alpha state that only passes fragments with alpha values greater than or equal to the supplied value, then blends them with the destination. |
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 |
|---|
public static final AlphaState OPAQUE
public static final AlphaState MASKED
public static final AlphaState TRANSLUCENT
public static final AlphaState ADDITIVE
public static final AlphaState PREMULTIPLIED
| Constructor Detail |
|---|
public AlphaState(int alphaTestFunc,
float alphaTestRef,
int srcBlendFactor,
int destBlendFactor)
| Method Detail |
|---|
public static AlphaState getInstance(int alphaTestFunc,
float alphaTestRef,
int srcBlendFactor,
int destBlendFactor)
public static AlphaState getInstance(AlphaState state)
public static AlphaState getTestInstance(float reference)
public int getAlphaTestFunc()
public float getAlphaTestRef()
public int getSrcBlendFactor()
public int getDestBlendFactor()
public int getType()
RenderState
getType in class RenderStatepublic void apply(Renderer renderer)
RenderState
apply in class RenderStatepublic boolean equals(Object other)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||