Click to Rate and Give Feedback
MSDN
MSDN Library
DirectX
SDK Documentation
DirectX Graphics
Direct3D 9
Reference
D3DX Reference
Constants
 D3DXSPRITE

  Switch on low bandwidth view
D3DXSPRITE
Bb205466.XDK_CHM_BANNER_left(en-us,VS.85).jpgBb205466.XDK_CHM_BANNER_right(en-us,VS.85).jpg

D3DXSPRITE

The following flags are used to specify sprite rendering options to the flags parameter in the ID3DXSprite::Begin method:

#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 (Direct3D 9). ID3DXFont expects this flag to be set when drawing text.
D3DXSPRITE_SORT_TEXTURESort sprites by texture prior to drawing. This can improve performance when drawing non-overlapping sprites of uniform depth.

You may also combine D3DXSPRITE_SORT_TEXTURE with either D3DXSPRITE_SORT_DEPTH_FRONTTOBACK or D3DXSPRITE_SORT_DEPTH_BACKTOFRONT. This will sort the list of sprites by depth first and texture second.

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.

You may combine D3DXSPRITE_SORT_DEPTH_FRONTTOBACK with D3DXSPRITE_SORT_TEXTURE to sort first by depth, and second by texture.

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.

You may combine D3DXSPRITE_SORT_DEPTH_BACKTOFRONT with D3DXSPRITE_SORT_TEXTURE to sort first by depth, and second by texture.

D3DXSPRITE_DO_NOT_ADDREF_TEXTUREDisables calling AddRef() on every draw, and Release() on Flush() for better performance.

Constant Information

Headerd3dx9core.h
Minimum operating systemWindows 98
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker