Export (0) Print
Expand All

D3DINDEXBUFFER_DESC structure

Describes an index buffer.

Syntax


typedef struct D3DINDEXBUFFER_DESC {
  D3DFORMAT       Format;
  D3DRESOURCETYPE Type;
  DWORD           Usage;
  D3DPOOL         Pool;
  UINT            Size;
} D3DINDEXBUFFER_DESC, *LPD3DINDEXBUFFER_DESC;

Members

Format

Type: D3DFORMAT

Member of the D3DFORMAT enumerated type, describing the surface format of the index buffer data.

Type

Type: D3DRESOURCETYPE

Member of the D3DRESOURCETYPE enumerated type, identifying this resource as an index buffer.

Usage

Type: DWORD

Combination of one or more of the following flags, specifying the usage for this resource.

ValueMeaning
D3DUSAGE_DONOTCLIP

Set to indicate that the index buffer content will never require clipping.

D3DUSAGE_DYNAMIC

Set to indicate that the index buffer requires dynamic memory use. This is useful for drivers because it enables them to decide where to place the buffer. In general, static index buffers are placed in video memory and dynamic index buffers are placed in AGP memory. Note that there is no separate static usage; if you do not specify D3DUSAGE_DYNAMIC the index buffer is made static. D3DUSAGE_DYNAMIC is strictly enforced through the D3DLOCK_DISCARD and D3DLOCK_NOOVERWRITE locking flags. As a result, D3DLOCK_DISCARD and D3DLOCK_NOOVERWRITE are only valid on index buffers created with D3DUSAGE_DYNAMIC; they are not valid flags on static vertex buffers.

For more information about using dynamic index buffers, see Using Dynamic Vertex and Index Buffers.

Note that D3DUSAGE_DYNAMIC cannot be specified on managed index buffers. For more information, see Managing Resources (Direct3D 9).

D3DUSAGE_RTPATCHES

Set to indicate when the index buffer is to be used for drawing high-order primitives.

D3DUSAGE_NPATCHES

Set to indicate when the index buffer is to be used for drawing N patches.

D3DUSAGE_POINTS

Set to indicate when the index buffer is to be used for drawing point sprites or indexed point lists.

D3DUSAGE_SOFTWAREPROCESSING

Set to indicate that the buffer is to be used with software processing.

D3DUSAGE_WRITEONLY

Informs the system that the application writes only to the index buffer. Using this flag enables the driver to choose the best memory location for efficient write operations and rendering. Attempts to read from an index buffer that is created with this capability can result in degraded performance.

 

Pool

Type: D3DPOOL

Member of the D3DPOOL enumerated type, specifying the class of memory allocated for this index buffer.

Size

Type: UINT

Size of the index buffer, in bytes.

Requirements

Header

D3D9Types.h

See also

GetDesc
Index Buffers (Direct3D 9)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft