Difference between revisions of "Framebuffer:renderTo"
(Added newin template) |
m (newinoldin.) |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{newinoldin|[[0.7.0]]|070|[[0.8.0]]|080|type=function|text=It has been renamed to [[Canvas:renderTo]]}} |
− | |||
Render to the [[Framebuffer]] using a function. | Render to the [[Framebuffer]] using a function. | ||
Line 14: | Line 13: | ||
== Notes == | == Notes == | ||
+ | This function will clear the target framebuffer. | ||
+ | |||
This is a shortcut to [[love.graphics.setRenderTarget]]: | This is a shortcut to [[love.graphics.setRenderTarget]]: | ||
<source lang="lua"> | <source lang="lua"> | ||
Line 38: | Line 39: | ||
* [[love.graphics.setRenderTarget]] | * [[love.graphics.setRenderTarget]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | {{#set:Description=Render to a framebuffer using a | + | {{#set:Description=Render to a framebuffer using a function.}} |
+ | == Other Languages == | ||
+ | {{i18n|Framebuffer:renderTo}} |
Latest revision as of 00:36, 18 July 2023
Available since LÖVE 0.7.0 and removed in LÖVE 0.8.0 |
It has been renamed to Canvas:renderTo. |
Render to the Framebuffer using a function.
Contents
Function
Synopsis
Framebuffer:renderTo( func )
Arguments
function func
- A function performing drawing operations.
Returns
Nothing.
Notes
This function will clear the target framebuffer.
This is a shortcut to love.graphics.setRenderTarget:
framebuffer:renderTo( func )
is the same as
love.graphics.setRenderTarget( framebuffer )
func()
love.graphics.setRenderTarget()
Examples
Using an anonymous function for drawing to a Framebuffer
framebuffer:renderTo(function()
love.graphics.draw(image1, 0,0)
love.graphics.draw(image2, 100,100)
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