17 D3D11_BLEND_DESC desc;
22 D3D11_RENDER_TARGET_BLEND_DESC& out = desc.RenderTarget[i];
24 out.BlendEnable = (in.
enable ? TRUE : FALSE);
31 out.RenderTargetWriteMask = in.
mask;
35 ID3D11BlendState* state =
nullptr;
36 HRESULT hr = device->CreateBlendState(&desc, &state);
45 return std::make_shared<DX11BlendState>(
46 reinterpret_cast<ID3D11Device*
>(device),
47 static_cast<BlendState const*>(
object));
65 D3D11_BLEND_SRC_COLOR,
66 D3D11_BLEND_INV_SRC_COLOR,
67 D3D11_BLEND_SRC_ALPHA,
68 D3D11_BLEND_INV_SRC_ALPHA,
69 D3D11_BLEND_DEST_ALPHA,
70 D3D11_BLEND_INV_DEST_ALPHA,
71 D3D11_BLEND_DEST_COLOR,
72 D3D11_BLEND_INV_DEST_COLOR,
73 D3D11_BLEND_SRC_ALPHA_SAT,
74 D3D11_BLEND_BLEND_FACTOR,
75 D3D11_BLEND_INV_BLEND_FACTOR,
76 D3D11_BLEND_SRC1_COLOR,
77 D3D11_BLEND_INV_SRC1_COLOR,
78 D3D11_BLEND_SRC1_ALPHA,
79 D3D11_BLEND_INV_SRC1_ALPHA
85 D3D11_BLEND_OP_SUBTRACT,
86 D3D11_BLEND_OP_REV_SUBTRACT,
Target target[NUM_TARGETS]
#define CHECK_HR_RETURN_NONE(msg)
DX11BlendState(ID3D11Device *device, BlendState const *blendState)
GraphicsObjectType GetType() const
bool enableAlphaToCoverage
ID3D11BlendState * GetDXBlendState()
#define LogError(message)
ID3D11DeviceChild * mDXObject
void Enable(ID3D11DeviceContext *context)
bool enableIndependentBlend
BlendState * GetBlendState()
static std::shared_ptr< GEObject > Create(void *device, GraphicsObject const *object)
static D3D11_BLEND_OP const msOperation[]
Vector4< float > blendColor
static D3D11_BLEND const msMode[]