Difference between revisions of "Framebuffer"

m (Added type)
Line 3: Line 3:
 
A Framebuffer is used for off-screen rendering. Think of it as an invisible screen that you can draw to, but that will not be visible until you draw it to the actual visible screen.
 
A Framebuffer is used for off-screen rendering. Think of it as an invisible screen that you can draw to, but that will not be visible until you draw it to the actual visible screen.
 
It is also known as "render to texture".
 
It is also known as "render to texture".
 +
 +
It is tempting to think of a Framebuffer as a canvas, and though you can create one that is larger or smaller than the screen, it does not act like one, meaning you cannot draw things that lie outside of the window dimensions. Instead all content drawn to the buffer will be scaled according to ''framebuffer_width/screen_width'' in x-direction and ''framebuffer_height/screen_height'' in y-direction.
  
 
== Constructors ==
 
== Constructors ==

Revision as of 13:54, 17 November 2010

Available since LÖVE 0.7.0
This type is not supported in earlier versions.


A Framebuffer is used for off-screen rendering. Think of it as an invisible screen that you can draw to, but that will not be visible until you draw it to the actual visible screen. It is also known as "render to texture".

It is tempting to think of a Framebuffer as a canvas, and though you can create one that is larger or smaller than the screen, it does not act like one, meaning you cannot draw things that lie outside of the window dimensions. Instead all content drawn to the buffer will be scaled according to framebuffer_width/screen_width in x-direction and framebuffer_height/screen_height in y-direction.

Constructors

love.graphics.newFramebufferCreates a new Framebuffer.

Functions

CanvasOff-screen render target.
Canvas (Nederlands)Off-screen render target.
FramebufferOff-screen render target.
Framebuffer:getImageDataGet stored ImageData.
Framebuffer:getWrapGets the wrapping properties of a Framebuffer.
Framebuffer:renderToRender to a framebuffer using a function.
Framebuffer:setWrapSets the wrapping properties of a Framebuffer.
ImageDrawable image type.
MeshA 2D polygon mesh used for drawing arbitrary textured shapes.
ParticleSystemUsed to create cool effects, like fire.
SpriteBatchStore image positions in a buffer, and draw it in one call.
SpriteBatch (Français)Stock des positions d'image dans un tampon, puis les trace en un seul appel.
TextDrawable text.
TextBatchOne or more precalculated strings of text stored in a Drawable object.
TextureSuperclass for drawable objects which represent a texture.
VideoA drawable video.

Supertypes

Drawable

See Also