Difference between revisions of "love.graphics.newFramebuffer"

m
m (correcting warning to show that it only effects earlier versions)
Line 1: Line 1:
 
{{newin|[[0.7.0]]|070|type=function}} {{oldin|[[0.8.0]]|080|type=function|text=It has been renamed to [[love.graphics.newCanvas]]}}
 
{{newin|[[0.7.0]]|070|type=function}} {{oldin|[[0.8.0]]|080|type=function|text=It has been renamed to [[love.graphics.newCanvas]]}}
 
Creates a new framebuffer object for offscreen rendering.
 
Creates a new framebuffer object for offscreen rendering.
{{notice|Framebuffers are susceptible to [http://love2d.org/wiki/PO2_Syndrome power of 2 syndrome].}}
+
{{notice|Versions prior to 0.8.0 have Framebuffers that are susceptible to [http://love2d.org/wiki/PO2_Syndrome power of 2 syndrome].}}
 
{{newobjectnotice}}
 
{{newobjectnotice}}
 
== Function ==
 
== Function ==

Revision as of 16:44, 22 April 2015

Available since LÖVE 0.7.0
This function is not supported in earlier versions.
Removed in LÖVE 0.8.0
It has been renamed to love.graphics.newCanvas.

Creates a new framebuffer object for offscreen rendering.

O.png Versions prior to 0.8.0 have Framebuffers that are susceptible to power of 2 syndrome.  


O.png This function can be slow if it is called repeatedly, such as from love.update or love.draw. If you need to use a specific resource often, create it once and store it somewhere it can be reused!  



Function

Synopsis

framebuffer = love.graphics.newFramebuffer( )

Arguments

None.

Returns

Framebuffer framebuffer
A new framebuffer with width/height equal to the window width/height.

Function

Synopsis

framebuffer = love.graphics.newFramebuffer( width, height )

Arguments

number width
The desired width of the framebuffer.
number height
The desired height of the framebuffer.

Returns

Framebuffer framebuffer
A new framebuffer with specified width and height.

See Also


Other Languages