ID2D1ComputeInfo::SetResourceTexture method (d2d1effectauthor.h)

Sets the resource texture corresponding to the given shader texture index to the given texture resource. The texture resource must already have been loaded with ID2D1EffectContext::CreateResourceTexture method. This call will fail if the specified index overlaps with any input. The input indices always precede the texture LUT indices.

Syntax

HRESULT SetResourceTexture(
       UINT32               textureIndex,
  [in] ID2D1ResourceTexture *resourceTexture
);

Parameters

textureIndex

Type: UINT32

The index to set the resource texture on.

[in] resourceTexture

Type: ID2D1ResourceTexture*

The resource texture object to set on the shader texture index.

Return value

Type: HRESULT

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

HRESULT Description
S_OK No error occurred.
E_OUTOFMEMORY Direct2D could not allocate sufficient memory to complete the call.
E_INVALIDARG An invalid parameter was passed to the returning function.

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
DLL D2d1.dll

See also

ID2D1ComputeInfo