CD3D11_BUFFER_DESC::CD3D11_BUFFER_DESC(UINT,UINT,D3D11_USAGE,UINT,UINT,UINT) function (d3d11.h)
Instantiates a new instance of a CD3D11_BUFFER_DESC structure that is initialized with D3D11_BUFFER_DESC values.
Syntax
void CD3D11_BUFFER_DESC(
UINT byteWidth,
UINT bindFlags,
D3D11_USAGE usage,
UINT cpuaccessFlags,
UINT miscFlags,
UINT structureByteStride
);
Parameters
byteWidth
Type: UINT
Size of the buffer in bytes.
bindFlags
Type: UINT
A combination of D3D11_BIND_FLAG values that are combined by using a bitwise OR operation. The resulting value identifies how the buffer will be bound to the pipeline.
usage
Type: D3D11_USAGE
A D3D11_USAGE-typed value that identifies how the buffer is expected to be read from and written to. Frequency of update is a key factor.
cpuaccessFlags
Type: UINT
A combination of D3D11_CPU_ACCESS_FLAG values that are combined by using a bitwise OR operation or 0 if no CPU access is necessary. The resulting value identifies CPU access.
miscFlags
Type: UINT
A combination of D3D11_RESOURCE_MISC_FLAG values that are combined by using a bitwise OR operation or 0 if unused. The resulting value identifies miscellaneous buffer info.
structureByteStride
Type: UINT
The size of each element in the buffer structure (in bytes) when the buffer represents a structured buffer. For more info about structured buffers, see Structured Buffer.
The size value in structureByteStride must match the size of the format that you use for views of the buffer. For example, if you use a shader resource view (SRV) to read a buffer in a pixel shader, the SRV format size must match the size value in structureByteStride.
Return value
None
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 R2 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | d3d11.h |
Library | D3D11.lib |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for