Windows Dev Center

ID2D1DrawInfo::SetComputeShaderConstantBuffer method

Applies to: desktop apps only

Sets the resource texture that corresponds to the specified shader texture index to the specified texture resource.

Syntax


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

Parameters

textureIndex

Type: UINT32

The index of the texture to be bound to the pixel shader.

resourceTexture [in]

Type: ID2D1ResourceTexture*

The created resource texture.

Return value

Type: HRESULT

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

HRESULTDescription
S_OKNo error occurred.
E_INVALIDARGOne or more arguments are not valid.

 

Remarks

The resourceTexture must already have been created with ID2D1EffectContext::CreateResourceTexture method.

This method fails if the specified index overlaps with any input. The input indices always precede the texture LUT indices.

If this call fails, the corresponding ID2D1Effect instance is placed into an error state and fails to draw.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Header

D2d1effectauthor.h

Library

D2d1.lib

See also

ID2D1DrawInfo
ID2D1ComputeRenderInfo
ID2D1EffectContext::CreateResourceTexture

 

 

Send comments about this topic to Microsoft

Build date: 9/5/2012

Community Additions

Show:
© 2015 Microsoft