Create a sprite for drawing a 2D texture.
HRESULT D3DX10CreateSprite( _In_ ID3D10Device *pDevice, _In_ UINT cDeviceBufferSize, _Out_ LPD3DX10SPRITE *ppSprite );
- pDevice [in]
A pointer to the device (see ID3D10Device Interface) that will draw the sprite.
- cDeviceBufferSize [in]
The size of the vertex buffer, in number of sprites, that will be sent to the device when ID3DX10Sprite::Flush or ID3DX10Sprite::DrawSpritesImmediate is called. This should be a small number if you know you will be rendering a small number of sprites at a time (to save memory) and a large number if you know you will be rendering a large number of sprites at a time. The maximum value is 4096. If 0 is specified, the vertex buffer size will automatically be set to 4096.
- ppSprite [out]
The address of a pointer to a sprite interface (see ID3DX10Sprite Interface).
If the function succeeds, the return value is S_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, E_OUTOFMEMORY.