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: UINTThe index to which the constant buffer should be applied.
buffer [in]
Type: const BYTE*The data applied to the constant buffer.
bufferSize
Type: UINT32The 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.
HRESULT | Description |
---|---|
S_OK | No error occurred. |
E_OUTOFMEMORY | Failed 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
Send comments about this topic to Microsoft
Build date: 9/5/2012