Microsoft DirectX 9.0 SDK Update (October 2004)

SpriteFlags Enumeration

Language:

Note: This documentation is preliminary and is subject to change.

Defines flags used to specify sprite rendering options.

Definition

Visual Basic .NET Public Enum SpriteFlags
C# public enum SpriteFlags
Managed C++ __value public enum SpriteFlags
JScript .NET public enum SpriteFlags

Members

Member Value Description
AlphaBlend 16 Enables alpha blending with RenderStateManager.AlphaTestEnable set to true (for nonzero alpha). SourceAlpha is the source blend state, and InvSourceAlpha is the destination blend state in calls to RenderStateManager. The Font class requires this flag to be set when drawing text.
SortDepthBackToFront 128 Sorts sprites by depth in back-to-front order prior to drawing. This option is recommended when drawing transparent sprites of varying depths.
SortDepthFrontToBack 64 Sorts sprites by depth in front-to-back order prior to drawing. This option is recommended when drawing opaque sprites of varying depths.
SortTexture 32 Sorts sprites by texture prior to drawing. This option is recommended when drawing non-overlapping sprites of uniform depth; for example, drawing screen-aligned text with Font.
Billboard 8 Rotates each sprite around its center so that it is facing the viewer. Sprite.SetWorldViewLH or Sprite.SetWorldViewRH must be called first.
ObjectSpace 4 Specifies no modification of the world, view, and projection transforms. The transforms currently set to the device are used to transform sprites when the batched sprites are drawn (that is, when Sprite.Flush or Sprite.End is called). If this option is not specified, the world, view, and projection transforms are modified so that sprites are drawn in screen-space coordinates.
DoNotModifyRenderState 2 Specifies no changes to the device render state when Sprite.Begin is called. The device is assumed to be in a valid state to draw vertices when the VertexElement.UsageIndex property equals 0 and VertexElement.DeclarationUsage is set to DeclarationUsage.Position, DeclarationUsage.TextureCoordinate, or DeclarationUsage.Color.
DoNotSaveState 1 Prevents the device state from being saved or restored when Sprite.Begin or Sprite.End is called.
None 0 Resolves the value to 0.

Enumeration Information

Namespace Microsoft.DirectX.Direct3D
Assembly Microsoft.DirectX.Direct3DX (microsoft.directx.direct3dx.dll)
Strong Name Microsoft.DirectX.Direct3DX,  Version=1.0.2902.0,  Culture=neutral,  PublicKeyToken=31bf3856ad364e35

© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center