ID3D11ModuleInstance::BindConstantBufferByName method (d3d11shader.h)
Rebinds a constant buffer by name to a destination slot.
Syntax
HRESULT BindConstantBufferByName(
[in] LPCSTR pName,
[in] UINT uDstSlot,
[in] UINT cbDstOffset
);
Parameters
[in] pName
Type: LPCSTR
The name of the constant buffer for rebinding.
[in] uDstSlot
Type: UINT
The destination slot number for rebinding.
[in] cbDstOffset
Type: UINT
The offset in bytes of the destination slot for rebinding. The offset must have 16-byte alignment.
Return value
Type: HRESULT
Returns:
- S_OK for a valid rebinding
- S_FALSE for rebinding a nonexistent slot; that is, for which the shader reflection doesn’t have any data
- E_FAIL for an invalid rebinding, for example, the rebinding is out-of-bounds
- Possibly one of the other Direct3D 11 Return Codes
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d3d11shader.h |
Library | D3DCompiler.lib |
DLL | D3DCompiler_47.dll |