ID2D1DrawInfo::SetConstantBuffer method

Applies to: desktop apps only

Sets the constant buffer data that will be passed to the pixel shader specified for the render pass.

Syntax


HRESULT SetConstantBuffer(
  UINT bufferIndex,
  [in]  const BYTE *buffer,
  UINT32 bufferSize
);

Parameters

bufferIndex

Type: UINT

The index to which the constant buffer should be applied.

buffer [in]

Type: const BYTE*

The data applied to the constant buffer.

bufferSize

Type: UINT32

The number of bytes of data in the constant buffer.

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_OUTOFMEMORYFailed to allocate necessary memory.

 

Remarks

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

 

 

Send comments about this topic to Microsoft

Build date: 9/5/2012

Community Additions

Show:
© 2014 Microsoft