ID2D1EffectContext::CreateResourceTexture method (d2d1effectauthor.h)

Creates or finds the given resource texture, depending on whether a resource id is specified. It also optionally initializes the texture with the specified data.

Syntax

HRESULT CreateResourceTexture(
  [in, optional] const GUID                             *resourceId,
  [in]           const D2D1_RESOURCE_TEXTURE_PROPERTIES *resourceTextureProperties,
  [in, optional] const BYTE                             *data,
  [in, optional] const UINT32                           *strides,
                 UINT32                                 dataSize,
  [out]          ID2D1ResourceTexture                   **resourceTexture
);

Parameters

[in, optional] resourceId

Type: const GUID*

An optional pointer to the unique id that identifies the lookup table.

[in] resourceTextureProperties

Type: const D2D1_RESOURCE_TEXTURE_PROPERTIES*

The properties used to create the resource texture.

[in, optional] data

Type: const BYTE*

The optional data to be loaded into the resource texture.

[in, optional] strides

Type: const UINT32*

An optional pointer to the stride to advance through the resource texture, according to dimension.

dataSize

Type: UINT32

The size, in bytes, of the data.

[out] resourceTexture

Type: ID2D1ResourceTexture**

The returned texture that can be used as a resource in a Direct2D effect.

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

See also

ID2D1EffectContext