Partager via


SetMiscFlags method

Sets transform flags that specify how to generate the output.

Syntax

HRESULT retVal = object.SetMiscFlags(dwMiscFlags);

Parameters

dwMiscFlags [in]

Type: DWORD

Value or combination of values from the DXTMISCFLAGS enumeration that specifies how the transform generates output. You can specify one or both of the following values.

DXTMF_BLEND_WITH_OUTPUT

The transform performs a composite over the output surface when writing the result.

DXTMF_DITHER_OUTPUT

The transform performs a dither of its result into the output surface.

Remarks

Setting the DXTMF_BLEND_WITH_OUTPUT flag causes the transform to composite the result over the output surface samples. This reduces memory swapping that occurs if the result sample actually replaces the sample in the output buffer.

The constructor of the transform sets the transform flags, depending on the kind of transform. You need to use the IDXTransform::GetMiscFlags method to find out what the transform's flags are before using IDXTransform::SetMiscFlags to change the flags. Note that you can only change the DXTMF_BLEND_WITH_OUTPUT and DXTMF_DITHER_OUTPUT flags. The remaining flags are inherent properties of the transform and cannot be changed by IDXTransform::SetMiscFlags.

If the DXTMF_BOUNDS_SUPPORTED flag is set, you can specify a DXBNDS structure in the IDXTransform::Execute method. If the DXTMF_PLACEMENT_SUPPORTED flag is set, you can specify a DXVEC structure in IDXTransform::Execute. If either of these flags is not set, then the transform expects you to specify a corresponding NULL in place of the parameter. Failing to do this will cause an error in the call to the IDXTransform::Execute method.

The constructor sets the DXTMF_BLEND_WITH_OUTPUT flag by default. You can reset this flag.