D3DXSPRITE
Microsoft DirectX 9.0 SDK Update (October 2004)

D3DXSPRITE


The following flags are used to specify sprite rendering options.

#defineDescription
D3DXSPRITE_DONOTSAVESTATEThe device state is not to be saved or restored when ID3DXSprite::Begin or ID3DXSprite::End is called.
D3DXSPRITE_DONOTMODIFY_RENDERSTATEThe device render state is not to be changed when ID3DXSprite::Begin is called. The device is assumed to be in a valid state to draw vertices containing UsageIndex = 0 in the D3DDECLUSAGE_POSITION, D3DDECLUSAGE_TEXCOORD, and D3DDECLUSAGE_COLOR data.
D3DXSPRITE_OBJECTSPACEThe world, view, and projection transforms are not modified. The transforms currently set to the device are used to transform the sprites when the batched sprites are drawn (when ID3DXSprite::Flush or ID3DXSprite::End is called). If this flag is not specified, then world, view, and projection transforms are modified so that sprites are drawn in screen-space coordinates.
D3DXSPRITE_BILLBOARDEach sprite will be rotated about its center so that it is facing the viewer. ID3DXSprite::SetWorldViewLH or ID3DXSprite::SetWorldViewRH must be called first.
D3DXSPRITE_ALPHABLENDEnables alpha blending with D3DRS_ALPHATESTENABLE set to TRUE (for nonzero alpha). D3DBLEND_SRCALPHA will be the source blend state, and D3DBLEND_INVSRCALPHA will be the destination blend state in calls to IDirect3DDevice9::SetRenderState. See Alpha Blending State. ID3DXFont expects this flag to be set when drawing text.
D3DXSPRITE_SORT_TEXTURESprites are sorted by texture prior to drawing. This procedure is recommended when drawing non-overlapping sprites of uniform depth. For example, use this procedure when drawing screen-aligned text with ID3DXFont.
D3DXSPRITE_SORT_DEPTH_FRONTTOBACKSprites are sorted by depth in front-to-back order prior to drawing. This procedure is recommended when drawing opaque sprites of varying depths.
D3DXSPRITE_SORT_DEPTH_BACKTOFRONTSprites are sorted by depth in back-to-front order prior to drawing. This procedure is recommended when drawing transparent sprites of varying depths.

Constant Information

Headerd3dx9core.h
Minimum operating systemWindows 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.