ID2D1SpriteBatch interface (d2d1_3.h)

Represents a single group of sprites with their associated drawing properties.

Inheritance

The ID2D1SpriteBatch interface inherits from ID2D1Resource. ID2D1SpriteBatch also has these types of members:

Methods

The ID2D1SpriteBatch interface has these methods.

 
ID2D1SpriteBatch::AddSprites

Adds the given sprites to the end of this sprite batch.
ID2D1SpriteBatch::Clear

Removes all sprites from this sprite batch.
ID2D1SpriteBatch::GetSpriteCount

Retrieves the number of sprites in this sprite batch.
ID2D1SpriteBatch::GetSprites

Retrieves the specified subset of sprites from this sprite batch. For the best performance, use nullptr for properties that you do not need to retrieve.
ID2D1SpriteBatch::SetSprites

Updates the properties of the specified sprites in this sprite batch.

Remarks

Create a new sprite batch using ID2D1DeviceContext3::CreateSpriteBatch. Use ID2D1DeviceContext3::DrawSpriteBatch to draw them.

Sprites are a way for apps to draw a large number of images very efficiently. They are commonly used to render characters and backgrounds in 2D games, or to render particle systems such as smoke and flames. If your app has performance demands and needs to draw hundreds or thousands of images every frame, then consider taking advantage of sprite batches and the fine-grained control they offer, instead of the general-purpose DrawImage method.

Requirements

Requirement Value
Target Platform Windows
Header d2d1_3.h

See also

ID2D1Resource