|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.aviatrix3d.SceneGraphObject org.j3d.aviatrix3d.BufferState org.j3d.aviatrix3d.GeneralBufferState
public class GeneralBufferState
Collection of state management options for a render pass for elements that don't directly influence the backing buffer.
The items configurable in this pass do not have any interaction with clearing state in the render buffer (ie no glClear() bit to toggle). The default setup for this class is:
Internationalisation Resource Names
Field Summary | |
---|---|
static int |
BLEND_CONSTANT_ALPHA
Set the blend factor to use the provided constant alpha value.The constant colour value is provide through the setBlendColour() method. |
static int |
BLEND_CONSTANT_COLOR
Set the blend factor to use the provided constant colour. |
static int |
BLEND_DEST_ALPHA
Set the blend factor to use the destination object's alpha value |
static int |
BLEND_DEST_COLOR
Set the blend factor to use the destination object colour |
static int |
BLEND_ONE
Set the blend factor to ones. |
static int |
BLEND_ONE_MINUS_CONSTANT_ALPHA
Set the blend factor to use one minus the constant colour alpha value (1-c). |
static int |
BLEND_ONE_MINUS_CONSTANT_COLOR
Set the blend factor to use one minus the constant colour (1-c). |
static int |
BLEND_ONE_MINUS_DEST_ALPHA
Set the blend factor to use one minus the destination object alpha value (1-dest). |
static int |
BLEND_ONE_MINUS_DEST_COLOR
Set the blend factor to use one minus the destination object colour (1-dest). |
static int |
BLEND_ONE_MINUS_SRC_ALPHA
Set the blend factor to use one minus source object alpha value (1-src). |
static int |
BLEND_ONE_MINUS_SRC_COLOR
Set the blend factor to use one minus source object colour (1-src). |
static int |
BLEND_SRC_ALPHA
Set the blend factor to use the source object's alpha value |
static int |
BLEND_SRC_ALPHA_SATURATE
Set the blend function to saturage the colour value using the alpha state. |
static int |
BLEND_SRC_COLOR
Set the blend factor to use the source object colour |
static int |
BLEND_ZERO
Set the blend factor to zeros. |
static int |
EQ_FUNC_ADD
Set the blending equation to be CsS + CdD |
static int |
EQ_FUNC_MAX
Set the blending equation to be max(CdD, CsS) |
static int |
EQ_FUNC_MIN
Set the blending equation to be min(CdD, CsS) |
static int |
EQ_FUNC_SUBTRACT
Set the blending equation to be CsS - CdD |
static int |
EQ_FUNC_SUBTRACT_REVERSE
Set the blending equation to be CdD - CsS |
Fields inherited from class org.j3d.aviatrix3d.BufferState |
---|
lastParent, liveCount, parentList |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler |
Fields inherited from interface org.j3d.aviatrix3d.rendering.BufferStateRenderable |
---|
ACCUMULATION_BUFFER, COLOR_BUFFER, DEPTH_BUFFER, GENERAL_BUFFER, STENCIL_BUFFER |
Constructor Summary | |
---|---|
GeneralBufferState()
Constructs a state set with default values. |
Method Summary | |
---|---|
boolean |
checkClearBufferState()
Check to see if this buffer should be cleared at the start of this run. |
void |
clearBufferState(javax.media.opengl.GL gl)
Restore all state to the default values. |
int |
compareTo(GeneralBufferState gbs)
Compares this object with the specified object for order. |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
void |
enableBlending(boolean test)
Set the flag for whether the blending should be enabled or disabled. |
boolean |
equals(GeneralBufferState gbs)
Compares this object with the specified object to check for equivalence. |
boolean |
equals(java.lang.Object o)
Compare this object for equality to the given object. |
int |
getAlphaDestinationBlendFactor()
Request the currently set destination blend factor for the alpha component. |
int |
getAlphaSourceBlendFactor()
Request the currently set source blend factor for the alpha component. |
int |
getBlendEquation()
Request the currently set blend equation |
int |
getBufferBitMask()
Get the GL buffer bit flag that this state class represents. |
int |
getBufferType()
Get the type of buffer this state represents. |
int |
getDestinationBlendFactor()
Request the currently set destination blend factor. |
boolean |
getSeparatedBlendFactors()
Check to see the current state of whether separated blending is used or not. |
int |
getSourceBlendFactor()
Request the currently set source blend factor. |
boolean |
isBlendingEnabled()
Check to see if depth testing is currently enabled. |
void |
setAlphaDestinationBlendFactor(int factor)
Set the destination blend factor to use. |
void |
setAlphaSourceBlendFactor(int factor)
Set the source blend factor to use. |
void |
setBlendEquation(int mode)
Set the blend equation to use. |
void |
setBufferState(javax.media.opengl.GL gl)
Issue ogl commands needed for this buffer to set the initial state, including the initial enabling. |
void |
setDestinationBlendFactor(int factor)
Set the destination blend factor to use. |
void |
setSeparatedBlendFactors(boolean state)
Instruct the system whether to use separated RGB and Alpha blending functions. |
void |
setSourceBlendFactor(int factor)
Set the source blend factor to use. |
void |
updateBufferState(javax.media.opengl.GL gl)
Issue ogl commands needed for this component to change the state, assuming that it is already enabled. |
Methods inherited from class org.j3d.aviatrix3d.BufferState |
---|
addParent, getParents, numParents, removeParent |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
checkForCyclicChild, checkForCyclicParent, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setLive, setUpdateHandler, setUserData |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BLEND_ZERO
public static final int BLEND_ONE
public static final int BLEND_SRC_COLOR
public static final int BLEND_ONE_MINUS_SRC_COLOR
public static final int BLEND_DEST_COLOR
public static final int BLEND_ONE_MINUS_DEST_COLOR
public static final int BLEND_SRC_ALPHA
public static final int BLEND_ONE_MINUS_SRC_ALPHA
public static final int BLEND_DEST_ALPHA
public static final int BLEND_ONE_MINUS_DEST_ALPHA
public static final int BLEND_CONSTANT_COLOR
public static final int BLEND_ONE_MINUS_CONSTANT_COLOR
public static final int BLEND_CONSTANT_ALPHA
public static final int BLEND_ONE_MINUS_CONSTANT_ALPHA
public static final int BLEND_SRC_ALPHA_SATURATE
public static final int EQ_FUNC_ADD
public static final int EQ_FUNC_SUBTRACT
public static final int EQ_FUNC_SUBTRACT_REVERSE
public static final int EQ_FUNC_MIN
public static final int EQ_FUNC_MAX
Constructor Detail |
---|
public GeneralBufferState()
Method Detail |
---|
public int getBufferType()
getBufferType
in interface BufferStateRenderable
public int getBufferBitMask()
getBufferBitMask
in interface BufferStateRenderable
public boolean checkClearBufferState()
checkClearBufferState
in interface BufferStateRenderable
public void setBufferState(javax.media.opengl.GL gl)
setBufferState
in interface BufferStateRenderable
gl
- The gl context to draw withpublic void updateBufferState(javax.media.opengl.GL gl)
updateBufferState
in interface BufferStateRenderable
gl
- The gl context to draw withpublic void clearBufferState(javax.media.opengl.GL gl)
clearBufferState
in interface BufferStateRenderable
gl
- The gl context to draw withpublic int compareTo(java.lang.Object o) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
o
- The objec to be compared
java.lang.ClassCastException
- The specified object's type prevents it from
being compared to this Objectpublic boolean equals(java.lang.Object o)
equals
in interface Renderable
equals
in class java.lang.Object
o
- The object to be compared
public void enableBlending(boolean test) throws InvalidWriteTimingException
test
- True if testing should be enabled
state to be used in the current operation
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data changed callback methodpublic boolean isBlendingEnabled()
public void setSourceBlendFactor(int factor) throws InvalidWriteTimingException
factor
- The value to set for the factor
java.lang.IllegalArgumentException
- The blend factor is not one of the
permitted types
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data changed callback methodpublic int getSourceBlendFactor()
public void setDestinationBlendFactor(int factor) throws InvalidWriteTimingException
factor
- The value to set for the factor
java.lang.IllegalArgumentException
- The blend factor is not one of the
permitted types or is SRC_ALPHA_SATURATED
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data changed callback methodpublic int getDestinationBlendFactor()
public void setAlphaSourceBlendFactor(int factor) throws InvalidWriteTimingException
factor
- The value to set for the factor
java.lang.IllegalArgumentException
- The blend factor is not one of the
permitted types
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data changed callback methodpublic int getAlphaSourceBlendFactor()
public void setAlphaDestinationBlendFactor(int factor) throws InvalidWriteTimingException
factor
- The value to set for the factor
java.lang.IllegalArgumentException
- The blend factor is not one of the
permitted types or is SRC_ALPHA_SATURATED
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data changed callback methodpublic int getAlphaDestinationBlendFactor()
public void setSeparatedBlendFactors(boolean state) throws InvalidWriteTimingException
state
- True to enable the use of separate RGB and alpha blending
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data changed callback methodpublic void setBlendEquation(int mode)
EQ_FUNC_ADD: Set the blending equation to be CsS + CdD EQ_FUNC_SUBTRACT: Set the blending equation to be CsS - CdD EQ_FUNC_SUBTRACT_REVERSE: Set the blending equation to be CdD - CsS EQ_FUNC_MIN: Set the blending equation to be min(CdD, CsS) EQ_FUNC_MAX: Set the blending equation to be max(CdD, CsS)
mode
- Blending equation mode
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data changed callback methodpublic int getBlendEquation()
public boolean getSeparatedBlendFactors()
public int compareTo(GeneralBufferState gbs)
gbs
- The attributes instance to be comgbsred
public boolean equals(GeneralBufferState gbs)
gbs
- The attributes instance to be compared
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |