D3D11_BUFFER_DESC Structure

Describes a buffer resource.

Syntax

typedef struct D3D11_BUFFER_DESC {
  UINT        ByteWidth;
  D3D11_USAGE Usage;
  UINT        BindFlags;
  UINT        CPUAccessFlags;
  UINT        MiscFlags;
  UINT        StructureByteStride;
} D3D11_BUFFER_DESC;

Mitglieder

  • ByteWidth
    Typ: UINT

    Size of the buffer in bytes.

  • Usage
    Typ: D3D11_USAGE

    Identify how the buffer is expected to be read from and written to. Frequency of update is a key factor. The most common value is typically D3D11_USAGE_DEFAULT; see D3D11_USAGE for all possible values.

  • BindFlags
    Typ: UINT

    Identify how the buffer will be bound to the pipeline. Flags (see D3D11_BIND_FLAG) can be combined with a logical OR.

  • CPUAccessFlags
    Typ: UINT

    CPU access flags (see D3D11_CPU_ACCESS_FLAG) or 0 if no CPU access is necessary. Flags can be combined with a logical OR.

  • MiscFlags
    Typ: UINT

    Miscellaneous flags (see D3D11_RESOURCE_MISC_FLAG) or 0 if unused. Flags can be combined with a logical OR.

  • StructureByteStride
    Typ: UINT

    The size of the structure (in bytes) when it represents a structured buffer.

Hinweise

This structure is used by ID3D11Device::CreateBuffer to create buffer resources.

In addition to this structure, there is also a derived structure in D3D11.h (CD3D11_BUFFER_DESC) which behaves like an inherited class to help create a buffer description.

If the bind flag is D3D11_BIND_CONSTANT_BUFFER then the ByteWidth value must be in multiples of 16, and less than or equal to D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT.

Anforderungen

Header

D3D11.h

Siehe auch

Resource Structures