Difference between revisions of "SpriteBatch:bind"
(Added SpriteBatch locking) |
m (Wrong link) |
||
Line 1: | Line 1: | ||
Binds the SpriteBatch to the memory. | Binds the SpriteBatch to the memory. | ||
− | Binding a SpriteBatch before updating its content can improve the performance as it doesn't push each update to the graphics card separately. Don't forget to [[ | + | Binding a SpriteBatch before updating its content can improve the performance as it doesn't push each update to the graphics card separately. Don't forget to [[SpriteBatch:unbind|unbind]] the SpriteBatch or the updates won't show up. |
== Function == | == Function == | ||
=== Synopsis === | === Synopsis === |
Revision as of 00:44, 24 June 2011
Binds the SpriteBatch to the memory.
Binding a SpriteBatch before updating its content can improve the performance as it doesn't push each update to the graphics card separately. Don't forget to unbind the SpriteBatch or the updates won't show up.
Contents
Function
Synopsis
SpriteBatch:bind( )
Arguments
None.
Returns
Nothing.
Examples
Updating a SpriteBatch with binding
function update_spritebatch(sb)
sb:bind()
for i = 1, 10 do
add_tile(sb)
end
sb:unbind()
end
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