Module ggez::graphics::spritebatch [] [src]

A SpriteBatch is a way to efficiently draw a large number of copies of the same image, or part of the same image. It's useful for implementing tiled maps, spritesheets, particles, and other such things.

Essentially this uses a technique called "instancing" to queue up a large amount of location/position data in a buffer, then feed it to the graphics card all in one go.

Structs

BoundSpriteBatch

A drawable combination of a SpriteBatch and a specific Image. It is not always convenient for a SpriteBatch to own the image it is drawing, so this structure lets you override the image with a borrowed one.

SpriteBatch

A SpriteBatch draws a number of copies of the same image, using a single draw call.

SpriteIdx

An index of a particular sprite in a SpriteBatch.