Class Index | File Index

Classes


Class Framebuffer

create and handle FramebufferObjects
Defined in: Framebuffer.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Framebuffer(width, height)
You can call the constructor with either, width and height, or "system".
Method Summary
Method Attributes Method Name and Description
 
bind()
binds this framebuffer which makes it the target for all drawCalls and framebuffer related calls.
<static>  
Framebuffer.bindDefault()
 
check if framebuffer was successfully created.
 
draws a quad over the whole framebuffer using the provided material.
 
drawTexture(texture, start, end)
<static>  
Framebuffer.getActiveBuffer()
<static>  
Framebuffer.getSystemBuffer()
 
initBufferStuff(width, height)
removes existing webgl color/render/frame-buffers and creates new ones
 
initializes the colourbuffer that'll be used as COLOR_ATTACHMENT0
 
Initialize stuff like a vbo for screen quads.
<static>  
Framebuffer.setActiveBuffer(buffer)
 
setSize(width, height)
change size of the framebuffer.
 
updateScreenQuad(start, end)
change size of screenQuad.
Class Detail
Framebuffer(width, height)
You can call the constructor with either, width and height, or "system". When invoking the constructor with "system", the framebuffer will refer to the system/default framebuffer.
Parameters:
{int} width
{int} height
See:
WebGL Lesson 16
Method Detail
bind()
binds this framebuffer which makes it the target for all drawCalls and framebuffer related calls.

<static> Framebuffer.bindDefault()

checkBuffer()
check if framebuffer was successfully created. Throws an exception if the buffer is invalid.

drawFullscreenQuad(mat)
draws a quad over the whole framebuffer using the provided material.
Parameters:
{Material} mat

drawTexture(texture, start, end)
drawTexture(abc, [0,0], [1,1])
Parameters:
{Texture} texture
{[x|y]} start
{[x|y]} end

<static> Framebuffer.getActiveBuffer()

<static> Framebuffer.getSystemBuffer()
Returns:
the system framebuffer

initBufferStuff(width, height)
removes existing webgl color/render/frame-buffers and creates new ones
Parameters:
{int} width
{int} height

initColorbuffer()
initializes the colourbuffer that'll be used as COLOR_ATTACHMENT0

initOtherStuff()
Initialize stuff like a vbo for screen quads.

<static> Framebuffer.setActiveBuffer(buffer)
Parameters:
buffer

setSize(width, height)
change size of the framebuffer.
Parameters:
{int} width
{int} height

updateScreenQuad(start, end)
change size of screenQuad.
Parameters:
{[x|y]} start
x and y must be values between 0 and 1
{[x|y]} end
x and y must be values between 0 and 1

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Jun 09 2013 12:38:11 GMT+0200 (CEST)