FrameBuffer Class
Creates a new Frame Buffer Object with the given width and height.
If width and height are non-numbers, this method expects the first parameter to be a Texture object which should be acted upon. In this case, the FrameBuffer does not "own" the texture, and so it won't dispose of it upon destruction. This is an advanced version of the constructor that assumes the user is giving us a valid Texture that can be bound (i.e. no async Image textures).
Constructor
FrameBuffer
-
width
-
height
-
filter
Parameters:
-
width
type[description]
-
height
type[description]
-
filter
type[description]
Returns:
[description]
Methods
begin
()
Binds this framebuffer and sets the viewport to the expected size.
create
()
Called during initialization to setup the frame buffer; also called on context restore. Users will not need to call this directly.
destroy
()
Destroys this frame buffer. Using this object after destroying it will have undefined results.
end
()
Binds the default frame buffer (the screen) and sets the viewport back to the size of the WebGLContext.
Properties
height
Number
A read-only property which returns the height of the backing texture.
id
WebGLFramebuffer
The underlying ID of the GL frame buffer object.
width
Number
A read-only property which returns the width of the backing texture.