Package icyllis.arc3d.engine

# Class BlendInfo

java.lang.Object
icyllis.arc3d.engine.BlendInfo

public final class BlendInfo extends Object
BlendInfo is an immutable object holding info for setting-up GPU blend states.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final BlendInfo`
  `BLEND_CLEAR`
  `static final BlendInfo`
  `BLEND_DST`
  `static final BlendInfo`
  `BLEND_DST_ATOP`
  `static final BlendInfo`
  `BLEND_DST_IN`
  `static final BlendInfo`
  `BLEND_DST_OUT`
  `static final BlendInfo`
  `BLEND_DST_OVER`
  `static final BlendInfo`
  `BLEND_MINUS`
  `static final BlendInfo`
  `BLEND_MODULATE`
  `static final BlendInfo`
  `BLEND_PLUS`
  `static final BlendInfo`
  `BLEND_SCREEN`
  `static final BlendInfo`
  `BLEND_SRC`
  `static final BlendInfo`
  `BLEND_SRC_ATOP`
  `static final BlendInfo`
  `BLEND_SRC_IN`
  `static final BlendInfo`
  `BLEND_SRC_OUT`
  `static final BlendInfo`
  `BLEND_SRC_OVER`
  `static final BlendInfo`
  `BLEND_XOR`
  `static final byte`
  `EQUATION_ADD`
  Basic blend equations.
  `static final byte`
  `EQUATION_COLORBURN`
  Advanced blend equations.
  `static final byte`
  `EQUATION_COLORDODGE`
  Advanced blend equations.
  `static final byte`
  `EQUATION_DARKEN`
  Advanced blend equations.
  `static final byte`
  `EQUATION_DIFFERENCE`
  Advanced blend equations.
  `static final byte`
  `EQUATION_EXCLUSION`
  Advanced blend equations.
  `static final byte`
  `EQUATION_HARDLIGHT`
  Advanced blend equations.
  `static final byte`
  `EQUATION_HSL_COLOR`
  Advanced blend equations.
  `static final byte`
  `EQUATION_HSL_HUE`
  Advanced blend equations.
  `static final byte`
  `EQUATION_HSL_LUMINOSITY`
  Advanced blend equations.
  `static final byte`
  `EQUATION_HSL_SATURATION`
  Advanced blend equations.
  `static final byte`
  `EQUATION_LIGHTEN`
  Advanced blend equations.
  `static final byte`
  `EQUATION_MULTIPLY`
  Advanced blend equations.
  `static final byte`
  `EQUATION_OVERLAY`
  Advanced blend equations.
  `static final byte`
  `EQUATION_REVERSE_SUBTRACT`
  Basic blend equations.
  `static final byte`
  `EQUATION_SCREEN`
  Advanced blend equations.
  `static final byte`
  `EQUATION_SOFTLIGHT`
  Advanced blend equations.
  `static final byte`
  `EQUATION_SUBTRACT`
  Basic blend equations.
  `static final byte`
  `EQUATION_UNKNOWN`
  Advanced blend equations (extended).
  `static final byte`
  `FACTOR_CONSTANT_ALPHA`
  Blend factors.
  `static final byte`
  `FACTOR_CONSTANT_COLOR`
  Blend factors.
  `static final byte`
  `FACTOR_DST_ALPHA`
  Blend factors.
  `static final byte`
  `FACTOR_DST_COLOR`
  Blend factors.
  `static final byte`
  `FACTOR_ONE`
  Blend factors.
  `static final byte`
  `FACTOR_ONE_MINUS_CONSTANT_ALPHA`
  Blend factors.
  `static final byte`
  `FACTOR_ONE_MINUS_CONSTANT_COLOR`
  Blend factors.
  `static final byte`
  `FACTOR_ONE_MINUS_DST_ALPHA`
  Blend factors.
  `static final byte`
  `FACTOR_ONE_MINUS_DST_COLOR`
  Blend factors.
  `static final byte`
  `FACTOR_ONE_MINUS_SRC_ALPHA`
  Blend factors.
  `static final byte`
  `FACTOR_ONE_MINUS_SRC_COLOR`
  Blend factors.
  `static final byte`
  `FACTOR_ONE_MINUS_SRC1_ALPHA`
  Blend factors.
  `static final byte`
  `FACTOR_ONE_MINUS_SRC1_COLOR`
  Blend factors.
  `static final byte`
  `FACTOR_SRC_ALPHA`
  Blend factors.
  `static final byte`
  `FACTOR_SRC_ALPHA_SATURATE`
  Blend factors.
  `static final byte`
  `FACTOR_SRC_COLOR`
  Blend factors.
  `static final byte`
  `FACTOR_SRC1_ALPHA`
  Blend factors.
  `static final byte`
  `FACTOR_SRC1_COLOR`
  Blend factors.
  `static final byte`
  `FACTOR_UNKNOWN`
  `static final byte`
  `FACTOR_ZERO`
  Blend factors.
  `final boolean`
  `mColorWrite`
  `final byte`
  `mDstFactor`
  `final byte`
  `mEquation`
  `final byte`
  `mSrcFactor`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BlendInfo(byte equation, byte srcFactor, byte dstFactor, boolean colorWrite)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static boolean`
  `blendCoeffRefsDst(byte factor)`
  `static boolean`
  `blendCoeffRefsSrc(byte factor)`
  `static boolean`
  `blendCoeffRefsSrc1(byte factor)`
  `static boolean`
  `blendCoeffsUseDstColor(byte srcFactor, byte dstFactor, boolean srcColorIsOpaque)`
  `static boolean`
  `blendCoeffsUseSrcColor(byte srcFactor, byte dstFactor)`
  `static boolean`
  `blendModifiesDst(byte equation, byte srcFactor, byte dstFactor)`
  `boolean`
  `blendShouldDisable()`
  `static BlendInfo`
  `getSimpleBlendInfo(BlendMode mode)`
  Returns the standard HW blend info for the given Porter Duff blend mode.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### FACTOR_ZERO

    public static final byte FACTOR_ZERO
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_ONE

    public static final byte FACTOR_ONE
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_SRC_COLOR

    public static final byte FACTOR_SRC_COLOR
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_ONE_MINUS_SRC_COLOR

    public static final byte FACTOR_ONE_MINUS_SRC_COLOR
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_DST_COLOR

    public static final byte FACTOR_DST_COLOR
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_ONE_MINUS_DST_COLOR

    public static final byte FACTOR_ONE_MINUS_DST_COLOR
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_SRC_ALPHA

    public static final byte FACTOR_SRC_ALPHA
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_ONE_MINUS_SRC_ALPHA

    public static final byte FACTOR_ONE_MINUS_SRC_ALPHA
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_DST_ALPHA

    public static final byte FACTOR_DST_ALPHA
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_ONE_MINUS_DST_ALPHA

    public static final byte FACTOR_ONE_MINUS_DST_ALPHA
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_CONSTANT_COLOR

    public static final byte FACTOR_CONSTANT_COLOR
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_ONE_MINUS_CONSTANT_COLOR

    public static final byte FACTOR_ONE_MINUS_CONSTANT_COLOR
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_CONSTANT_ALPHA

    public static final byte FACTOR_CONSTANT_ALPHA
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_ONE_MINUS_CONSTANT_ALPHA

    public static final byte FACTOR_ONE_MINUS_CONSTANT_ALPHA
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_SRC_ALPHA_SATURATE

    public static final byte FACTOR_SRC_ALPHA_SATURATE
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_SRC1_COLOR

    public static final byte FACTOR_SRC1_COLOR
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_ONE_MINUS_SRC1_COLOR

    public static final byte FACTOR_ONE_MINUS_SRC1_COLOR
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_SRC1_ALPHA

    public static final byte FACTOR_SRC1_ALPHA
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_ONE_MINUS_SRC1_ALPHA

    public static final byte FACTOR_ONE_MINUS_SRC1_ALPHA
    Blend factors. Same in OpenGL and Vulkan.
    See Also:
      - Constant Field Values

  - ### FACTOR_UNKNOWN

    public static final byte FACTOR_UNKNOWN
    See Also:
      - Constant Field Values

  - ### EQUATION_ADD

    public static final byte EQUATION_ADD
    Basic blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_SUBTRACT

    public static final byte EQUATION_SUBTRACT
    Basic blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_REVERSE_SUBTRACT

    public static final byte EQUATION_REVERSE_SUBTRACT
    Basic blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_MULTIPLY

    public static final byte EQUATION_MULTIPLY
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_SCREEN

    public static final byte EQUATION_SCREEN
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_OVERLAY

    public static final byte EQUATION_OVERLAY
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_DARKEN

    public static final byte EQUATION_DARKEN
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_LIGHTEN

    public static final byte EQUATION_LIGHTEN
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_COLORDODGE

    public static final byte EQUATION_COLORDODGE
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_COLORBURN

    public static final byte EQUATION_COLORBURN
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_HARDLIGHT

    public static final byte EQUATION_HARDLIGHT
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_SOFTLIGHT

    public static final byte EQUATION_SOFTLIGHT
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_DIFFERENCE

    public static final byte EQUATION_DIFFERENCE
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_EXCLUSION

    public static final byte EQUATION_EXCLUSION
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_HSL_HUE

    public static final byte EQUATION_HSL_HUE
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_HSL_SATURATION

    public static final byte EQUATION_HSL_SATURATION
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_HSL_COLOR

    public static final byte EQUATION_HSL_COLOR
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_HSL_LUMINOSITY

    public static final byte EQUATION_HSL_LUMINOSITY
    Advanced blend equations.
    See Also:
      - Constant Field Values

  - ### EQUATION_UNKNOWN

    public static final byte EQUATION_UNKNOWN
    Advanced blend equations (extended).
    See Also:
      - Constant Field Values

  - ### mEquation

    public final byte mEquation

  - ### mSrcFactor

    public final byte mSrcFactor

  - ### mDstFactor

    public final byte mDstFactor

  - ### mColorWrite

    public final boolean mColorWrite

  - ### BLEND_CLEAR

    public static final BlendInfo BLEND_CLEAR

  - ### BLEND_SRC

    public static final BlendInfo BLEND_SRC

  - ### BLEND_DST

    public static final BlendInfo BLEND_DST

  - ### BLEND_SRC_OVER

    public static final BlendInfo BLEND_SRC_OVER

  - ### BLEND_DST_OVER

    public static final BlendInfo BLEND_DST_OVER

  - ### BLEND_SRC_IN

    public static final BlendInfo BLEND_SRC_IN

  - ### BLEND_DST_IN

    public static final BlendInfo BLEND_DST_IN

  - ### BLEND_SRC_OUT

    public static final BlendInfo BLEND_SRC_OUT

  - ### BLEND_DST_OUT

    public static final BlendInfo BLEND_DST_OUT

  - ### BLEND_SRC_ATOP

    public static final BlendInfo BLEND_SRC_ATOP

  - ### BLEND_DST_ATOP

    public static final BlendInfo BLEND_DST_ATOP

  - ### BLEND_XOR

    public static final BlendInfo BLEND_XOR

  - ### BLEND_PLUS

    public static final BlendInfo BLEND_PLUS

  - ### BLEND_MINUS

    public static final BlendInfo BLEND_MINUS

  - ### BLEND_MODULATE

    public static final BlendInfo BLEND_MODULATE

  - ### BLEND_SCREEN

    public static final BlendInfo BLEND_SCREEN

- ## Constructor Details

  - ### BlendInfo

    public BlendInfo(byte equation, byte srcFactor, byte dstFactor, boolean colorWrite)

- ## Method Details

  - ### blendShouldDisable

    public boolean blendShouldDisable()

  - ### blendCoeffRefsSrc

    public static boolean blendCoeffRefsSrc(byte factor)

  - ### blendCoeffRefsDst

    public static boolean blendCoeffRefsDst(byte factor)

  - ### blendCoeffRefsSrc1

    public static boolean blendCoeffRefsSrc1(byte factor)

  - ### blendCoeffsUseSrcColor

    public static boolean blendCoeffsUseSrcColor(byte srcFactor, byte dstFactor)

  - ### blendCoeffsUseDstColor

    public static boolean blendCoeffsUseDstColor(byte srcFactor, byte dstFactor, boolean srcColorIsOpaque)

  - ### blendModifiesDst

    public static boolean blendModifiesDst(byte equation, byte srcFactor, byte dstFactor)

  - ### getSimpleBlendInfo

    @Nullable public static BlendInfo getSimpleBlendInfo(@Nonnull BlendMode mode)
    Returns the standard HW blend info for the given Porter Duff blend mode.