Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)
A sprite is a texture mapped to a 2-D surface. Typically used for animation and billboarding, since multiple sprites can move within a larger image.
Typically, the application first calls Begin, which allows control over the device render state, alpha blending, and sprite transformation and sorting. Then, for each sprite to display, the application calls Draw, which can be called repeatedly to store any number of sprites. To display the batched sprites to the device, the application calls End or Flush.
The following code example shows how to create a sprite. For more information about creating and using sprites see How to: Use Sprites.
present = new PresentParameters(); present.BackBufferCount = 1; present.BackBufferFormat = dispmode.Format; present.BackBufferHeight = dispmode.Height; present.BackBufferWidth = dispmode.Width; present.SwapEffect = SwapEffect.Discard; device = new Device(Manager.Adapters.Default.Adapter, DeviceType.Default, this, CreateFlags.None, present); sprite = new Microsoft.WindowsMobile.DirectX.Direct3D.Sprite(device);