![]() |
![]() |
![]() |
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 Implementation d3d9.dll Custom Implementation No Inherits from IUnknown Header d3dx9core.h Import library d3dx9.lib Minimum operating systems Windows 98