ID2D1EffectImpl::SetGraph method (d2d1effectauthor.h)

The renderer calls this method to provide the effect implementation with a way to specify its transform graph and transform graph changes.

The renderer calls this method when:

  • When the effect is first initialized.
  • If the number of inputs to the effect changes.

Syntax

HRESULT SetGraph(
  ID2D1TransformGraph *transformGraph
);

Parameters

transformGraph

Type: ID2D1TransformGraph*

The graph to which the effect describes its transform topology through the SetDescription call.

Return value

Type: HRESULT

An error that prevents the effect from being initialized if called as part of the CreateEffect call. If the effect fails a subsequent SetGraph call:

  • The error will be returned from the property method that caused the number of inputs to the effect to change.
  • The effect object will be placed into an error state, if subsequently used to render, the context will be placed into a temporary error state, that particular effect will fail to render and the failure will be returned on the next EndDraw or Flush call.

Requirements

Requirement Value
Minimum supported client Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header d2d1effectauthor.h
Library D2D1.lib

See also

ID2D1EffectImpl