Views
SpriteBatch
Using a single image, draw any number of identical copies of the image using a single call to love.graphics.draw(). This can be used, for example, to draw repeating copies of a single background image.
A SpriteBatch can be even more useful when the underlying image is a texture atlas (a single image file containing many independent images); by adding Quads to the batch, different sub-images from within the atlas can be drawn.
Constructors
| love.graphics.newSpriteBatch | Creates a new SpriteBatch object. |
Functions
| Object:type | Gets the type of the object as a string. |
| Object:typeOf | Checks whether an object is of a certain type. |
| SpriteBatch:add | Adds a sprite to the batch. |
| SpriteBatch:addq | Adds a Quad to the batch. |
| SpriteBatch:bind | Binds the SpriteBatch to the memory. |
| SpriteBatch:clear | Removes all sprites from the buffer. |
| SpriteBatch:getImage | Returns the image used by the SpriteBatch. |
| SpriteBatch:set | Changes a sprite in the batch. |
| SpriteBatch:setColor | Sets the color that will be used for the next add or set operations. |
| SpriteBatch:setImage | Replaces the image used for the sprites. |
| SpriteBatch:setq | Changes a sprite with a quad in the batch. |
| SpriteBatch:unbind | Unbinds the SpriteBatch. |
Supertypes
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info