Difference between revisions of "SpriteBatch"
Line 6: | Line 6: | ||
}} | }} | ||
{{#ask: [[Category:Functions]] [[parent::Drawable]] | {{#ask: [[Category:Functions]] [[parent::Drawable]] | ||
+ | | headers=hide | ||
+ | | ?Description | ||
+ | }} | ||
+ | {{#ask: [[Category:Functions]] [[parent::Object]] | ||
| headers=hide | | headers=hide | ||
| ?Description | | ?Description | ||
Line 11: | Line 15: | ||
== Supertypes == | == Supertypes == | ||
[[Drawable]] | [[Drawable]] | ||
+ | [[Object]] | ||
== See Also == | == See Also == | ||
* [[parent::love.graphics]] | * [[parent::love.graphics]] |
Revision as of 01:58, 13 February 2011
Store geometry in a buffer, and draw it in one call.
Functions
SpriteBatch:add | Adds a sprite to the batch. |
SpriteBatch:addLayer | Adds a sprite to a batch created with an Array Texture. |
SpriteBatch:addq | Adds a Quad to the batch. |
SpriteBatch:attachAttribute | Attaches a per-vertex attribute from a Mesh onto this SpriteBatch, for use when drawing. |
SpriteBatch:bind | Binds the SpriteBatch to memory for more efficient updating. |
SpriteBatch:clear | Removes all sprites from the buffer. |
SpriteBatch:flush | Immediately sends all new and modified sprite data to the graphics card. |
SpriteBatch:getBufferSize | Gets the maximum number of sprites the SpriteBatch can hold. |
SpriteBatch:getColor | Gets the color that will be used for the next add and set operations. |
SpriteBatch:getCount | Gets the number of sprites currently in the SpriteBatch. |
SpriteBatch:getImage | Returns the image used by the SpriteBatch. |
SpriteBatch:getTexture | Gets the texture (Image or Canvas) used by the SpriteBatch. |
SpriteBatch:set | Changes a sprite in the batch. |
SpriteBatch:setBufferSize | Sets the maximum number of sprites the SpriteBatch can hold. |
SpriteBatch:setColor | Sets the color that will be used for the next add or set operations. |
SpriteBatch:setDrawRange | Restricts the drawn sprites in the SpriteBatch to a subset of the total. |
SpriteBatch:setImage | Replaces the image used for the sprites. |
SpriteBatch:setLayer | Changes a sprite previously added with add or addLayer, in a batch created with an Array Texture. |
SpriteBatch:setTexture | Sets the texture (Image or Canvas) used for the sprites in the batch. |
SpriteBatch:setq | Changes a sprite with a quad in the batch. |
SpriteBatch:unbind | Unbinds the SpriteBatch. |
Object:release | Immediately destroys the object's Lua reference. |
Object:type | Gets the type of the object as a string. |
Object:typeOf | Checks whether an object is of a certain type. |
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