D3DBLENDOP
Microsoft DirectX 9.0 SDK Update (October 2004)

D3DBLENDOP Enumerated Type


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;

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. This value is not used.

Remarks

Source, Destination, and Result are defined as:

TermTypeDescription
SourceInputColor of the source pixel before the operation.
DestinationInputColor of the pixel in the destination buffer before the operation.
ResultOutputReturned value that is the blended color resulting from the operation.

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

Enumerated Type Information

Headerd3d9types.h
Minimum operating systems Windows 98

See Also

D3DCAPS9, D3DRENDERSTATETYPE


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.