com.jme3.material
Enum RenderState.BlendMode

java.lang.Object
  extended by java.lang.Enum<RenderState.BlendMode>
      extended by com.jme3.material.RenderState.BlendMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<RenderState.BlendMode>
Enclosing class:
RenderState

public static enum RenderState.BlendMode
extends java.lang.Enum<RenderState.BlendMode>

BlendMode specifies the blending operation to use.

See Also:
RenderState.setBlendMode(com.jme3.material.RenderState.BlendMode)

Enum Constant Summary
Additive
          Additive blending.
Alpha
          Alpha blending, interpolates to source color from dest color using source alpha.
AlphaAdditive
          Additive blending that is multiplied with source alpha.
Color
          Color blending, blends in color from dest color using source color.
Modulate
          Multiplies the source and dest colors.
ModulateX2
          Multiplies the source and dest colors then doubles the result.
Off
          No blending mode is used.
PremultAlpha
          Premultiplied alpha blending, for use with premult alpha textures.
 
Method Summary
static RenderState.BlendMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static RenderState.BlendMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Off

public static final RenderState.BlendMode Off
No blending mode is used.


Additive

public static final RenderState.BlendMode Additive
Additive blending. For use with glows and particle emitters.

Result = Source Color + Destination Color -> (GL_ONE, GL_ONE)


PremultAlpha

public static final RenderState.BlendMode PremultAlpha
Premultiplied alpha blending, for use with premult alpha textures.

Result = Source Color + (Dest Color * (1 - Source Alpha) ) -> (GL_ONE, GL_ONE_MINUS_SRC_ALPHA)


AlphaAdditive

public static final RenderState.BlendMode AlphaAdditive
Additive blending that is multiplied with source alpha. For use with glows and particle emitters.

Result = (Source Alpha * Source Color) + Dest Color -> (GL_SRC_ALPHA, GL_ONE)


Color

public static final RenderState.BlendMode Color
Color blending, blends in color from dest color using source color.

Result = Source Color + (1 - Source Color) * Dest Color -> (GL_ONE, GL_ONE_MINUS_SRC_COLOR)


Alpha

public static final RenderState.BlendMode Alpha
Alpha blending, interpolates to source color from dest color using source alpha.

Result = Source Alpha * Source Color + (1 - Source Alpha) * Dest Color -> (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)


Modulate

public static final RenderState.BlendMode Modulate
Multiplies the source and dest colors.

Result = Source Color * Dest Color -> (GL_DST_COLOR, GL_ZERO)


ModulateX2

public static final RenderState.BlendMode ModulateX2
Multiplies the source and dest colors then doubles the result.

Result = 2 * Source Color * Dest Color -> (GL_DST_COLOR, GL_SRC_COLOR)

Method Detail

values

public static RenderState.BlendMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (RenderState.BlendMode c : RenderState.BlendMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static RenderState.BlendMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null