|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neovisionaries.android.opengl.BlendSettings
public class BlendSettings
Blend settings.
// E X A M P L E newBlendSettings()
.setSourceFactor
(BlendFactor.ONE
) .setOperator
(BlendOperator.ADD
) .apply()
;
Constructor Summary | |
---|---|
BlendSettings()
|
Method Summary | |
---|---|
BlendSettings |
apply()
Apply the settings values that this instance holds to the underlying OpenGL ES implementation. |
BlendSettings |
disable()
Disable blending (call glDisable(GL_BLEND)). |
BlendSettings |
enable()
Enable blending (call glEnable(GL_BLEND)). |
BlendOperator |
getAlphaOperator()
Get the blending operator for alpha. |
float[] |
getColor()
Get the constant blending color. |
BlendFactor |
getDestinationAlphaFactor()
Get the blending factor for alpha of destination. |
BlendFactor |
getDestinationRGBFactor()
Get the blending factor for RGB of destination. |
BlendOperator |
getRGBOperator()
Get the blending operator for RGB. |
BlendFactor |
getSourceAlphaFactor()
Get the blending factor for alpha of source. |
BlendFactor |
getSourceRGBFactor()
Get the blending factor for RGB of source. |
BlendSettings |
setAlphaOperator(BlendOperator operator)
Set the blending operator for alpha. |
BlendSettings |
setColor(float red,
float green,
float blue,
float alpha)
Set the constant blending color. |
BlendSettings |
setDestinationAlphaFactor(BlendFactor factor)
Set the blending factor for alpha of destination. |
BlendSettings |
setDestinationFactor(BlendFactor factor)
Set the blending factor for destination. |
BlendSettings |
setDestinationRGBFactor(BlendFactor factor)
Set the blending factor for RGB of destination. |
BlendSettings |
setOperator(BlendOperator operator)
Set the blending operator for both RGB and alpha. |
BlendSettings |
setRGBOperator(BlendOperator operator)
Set the blending operator for RGB. |
BlendSettings |
setSourceAlphaFactor(BlendFactor factor)
Set the blending factor for alpha of source. |
BlendSettings |
setSourceFactor(BlendFactor factor)
Set the blending factor for source. |
BlendSettings |
setSourceRGBFactor(BlendFactor factor)
Set the blending factor for RGB of source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlendSettings()
Method Detail |
---|
public BlendSettings setSourceFactor(BlendFactor factor)
BlendFactor.ONE
.
The given value is used for both RGB and alpha factors.
factor
- A blending factor. If null is given, BlendFactor.ONE
is used.
public BlendSettings setSourceRGBFactor(BlendFactor factor)
BlendFactor.ONE
.
factor
- A blending factor. If null is given, BlendFactor.ONE
is used.
public BlendSettings setSourceAlphaFactor(BlendFactor factor)
BlendFactor.ONE
.
If the version of the underlying OpenGL ES implementation is less than 2.0, calling this method has no meaning because glBlendFuncSeparate() is not available.
factor
- A blending factor. If null is given, BlendFactor.ONE
is used.
public BlendFactor getSourceRGBFactor()
public BlendFactor getSourceAlphaFactor()
public BlendSettings setDestinationFactor(BlendFactor factor)
BlendFactor.ONE
.
The given value is used for both RGB and alpha factors.
factor
- A blending factor. If null is given, BlendFactor.ONE
is used.
public BlendSettings setDestinationRGBFactor(BlendFactor factor)
BlendFactor.ONE
.
factor
- A blending factor. If null is given, BlendFactor.ONE
is used.
public BlendSettings setDestinationAlphaFactor(BlendFactor factor)
BlendFactor.ONE
.
If the version of the underlying OpenGL ES implementation is less than 2.0, calling this method has no meaning because glBlendFuncSeparate() is not available.
factor
- A blending factor. If null is given, BlendFactor.ONE
is used.
public BlendFactor getDestinationRGBFactor()
public BlendFactor getDestinationAlphaFactor()
public BlendSettings setColor(float red, float green, float blue, float alpha)
If the version of the underlying OpenGL ES implementation is less than 2.0, calling this method has no meaning because glBlendColor() is not available.
red
- green
- blue
- alpha
-
public float[] getColor()
public BlendSettings setOperator(BlendOperator operator)
BlendOperator.ADD
.
If the version of the underlying OpenGL ES implementation is less than 2.0, calling this method has no meaning because neither glBlendEquation() nor glBlendEquationsSeparate() is available.
operator
- A blending operator.
public BlendSettings setRGBOperator(BlendOperator operator)
BlendOperator.ADD
.
If the version of the underlying OpenGL ES implementation is less than 2.0, calling this method has no meaning because neither glBlendEquation() nor glBlendEquationsSeparate() is available.
operator
- A blending operator.
public BlendSettings setAlphaOperator(BlendOperator operator)
BlendOperator.ADD
.
If the version of the underlying OpenGL ES implementation is less than 2.0, calling this method has no meaning because neither glBlendEquation() nor glBlendEquationsSeparate() is available.
operator
- A blending operator.
public BlendOperator getRGBOperator()
public BlendOperator getAlphaOperator()
public BlendSettings enable()
public BlendSettings disable()
public BlendSettings apply()
If the OpenGL ES version is equal to or greater than 2.0, methods listed below are executed.
enable()
Otherwise, the following two are executed.
enable()
enable()
,
glBlendFunc,
glBlendFuncSeparate,
glBlendColor,
glBlendEquationSeparate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |