ID3DX10Sprite::DrawSpritesImmediate method

Draw an array of sprites. This will immediately send the sprites to the device for rendering, which is different from ID3DX10Sprite::DrawSpritesBuffered which only adds an array of sprites to a batch of sprites to be rendered when ID3DX10Sprite::Flush is called. This draw method is most useful when drawing a large number of sprites that have already been sorted on the CPU (or do not need to be sorted), such as in a particle system. This must be called in between calls to ID3DX10Sprite::Begin and ID3DX10Sprite::End.

Syntax

HRESULT DrawSpritesImmediate(
  [in] D3DX10_SPRITE *pSprites,
  [in] UINT          cSprites,
  [in] UINT          cbSprite,
  [in] UINT          flags
);

Parameters

pSprites [in]

Type: D3DX10_SPRITE*

The array of sprites to draw. See D3DX10_SPRITE.

cSprites [in]

Type: UINT

The number of sprites in pSprites.

cbSprite [in]

Type: UINT

The size of the sprite structure you are passing into pSprites. Passing in 0 is the equivalent of passing in sizeof(D3DX10_SPRITE).

flags [in]

Type: UINT

Reserved.

Return value

Type: HRESULT

If the method succeeds, the return value is S_OK. If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA.

Requirements

Requirement Value
Header
D3DX10.h
Library
D3DX10.lib

See also

ID3DX10Sprite

D3DX Interfaces