D3DBLENDOP enumeration

Defines the supported blend operations. See Remarks for definitions of terms.

Syntax

typedef enum D3DBLENDOP { 
  D3DBLENDOP_ADD          = 1,
  D3DBLENDOP_SUBTRACT     = 2,
  D3DBLENDOP_REVSUBTRACT  = 3,
  D3DBLENDOP_MIN          = 4,
  D3DBLENDOP_MAX          = 5,
  D3DBLENDOP_FORCE_DWORD  = 0x7fffffff
} D3DBLENDOP, *LPD3DBLENDOP;

Constants

D3DBLENDOP_ADD

The result is the destination added to the source. Result = Source + Destination

D3DBLENDOP_SUBTRACT

The result is the destination subtracted from to the source. Result = Source - Destination

D3DBLENDOP_REVSUBTRACT

The result is the source subtracted from the destination. Result = Destination - Source

D3DBLENDOP_MIN

The result is the minimum of the source and destination. Result = MIN(Source, Destination)

D3DBLENDOP_MAX

The result is the maximum of the source and destination. Result = MAX(Source, Destination)

D3DBLENDOP_FORCE_DWORD

Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.

Remarks

Source, Destination, and Result are defined as:

Term Type Description
Source Input Color of the source pixel before the operation.
Destination Input Color of the pixel in the destination buffer before the operation.
Result Output Returned value that is the blended color resulting from the operation.

 

This enumerated type defines values used by the following render states:

  • D3DRS_BLENDOP
  • D3DRS_BLENDOPALPHA

Requirements

Requirement Value
Header
D3D9Types.h

See also

Direct3D Enumerations

D3DCAPS9

D3DRENDERSTATETYPE