d3d9.dllID3DXSprite
Microsoft DirectX 9.0 SDK Update (October 2004)

ID3DXSprite Interface


The ID3DXSprite interface provides a set of methods that simplify the process of drawing sprites using Microsoft Direct3D.

ID3DXSprite Members

Begin Prepares a device for drawing sprites.
Draw Adds a sprite to the list of batched sprites.
End Calls ID3DXSprite::Flush and restores the device state to how it was before ID3DXSprite::Begin was called.
Flush Forces all batched sprites to be submitted to the device. Device states remain as they were after the last call to ID3DXSprite::Begin. The list of batched sprites is then cleared.
GetDevice Retrieves the device associated with the sprite object.
GetTransform Gets the sprite transform.
OnLostDevice Releases all references to video memory resources and deletes all stateblocks.
OnResetDevice Should be called after the device has been reset.
SetTransform Sets the sprite transform.
SetWorldViewLH Sets the left-handed world-view transform for a sprite. A call to this method is required before billboarding or sorting sprites.
SetWorldViewRH Sets the right-handed world-view transform for a sprite. A call to this method is required before billboarding or sorting sprites.

Remarks

The ID3DXSprite interface is obtained by calling the D3DXCreateSprite function.

The application typically first calls ID3DXSprite::Begin, which allows control over the device render state, alpha blending, and sprite transformation and sorting. Then for each sprite to be displayed, call ID3DXSprite::Draw. ID3DXSprite::Draw can be called repeatedly to store any number of sprites. To display the batched sprites to the device, call ID3DXSprite::End or ID3DXSprite::Flush.

The LPD3DXSPRITE type is defined as a pointer to the ID3DXSprite interface.

typedef interface ID3DXSprite ID3DXSprite;
typedef interface ID3DXSprite *LPD3DXSPRITE;

Interface Information

Stock Implementationd3d9.dll
Custom ImplementationNo
Inherits fromIUnknown
Headerd3dx9core.h
Import libraryd3dx9.lib
Minimum operating systems Windows 98


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.