Class: MultiFramebuffer

og.webgl.MultiFramebuffer

new og.webgl.MultiFramebuffer(handler)

Class represents multiple render framebuffer.
Name Type Description
handler og.webgl.Handler WebGL handler.

Members

WebGL handler.

textures

Buffer textures.

Methods

Activate framebuffer frame to draw.
Returns:
Type Description
og.webgl.MultiFramebuffer Returns current framebuffer.
Deactivate framebuffer frame.
Destroy framebuffer instance.
Gets JavaScript image object that framebuffer has drawn.
Returns:
Type Description
Object

isComplete(){boolean}

Returns framebuffer completed.
Returns:
Type Description
boolean
Open dialog window with framebuffer image.

readAllPixels(){Array.<number>}

Reads all pixels(RGBA colors) from framebuffer.
Returns:
Type Description
Array.<number>

readPixel(x, y){Array.<number, number, number, number>}

Gets pixel RBGA color from framebuffer by coordinates.
Name Type Description
x number Normalized x - coordinate.
y number Normalized y - coordinate.
Returns:
Type Description
Array.<number, number, number, number>

setSize(width, height)

Sets framebuffer size. Must be before the activate method.
Name Type Description
width number Framebuffer width.
height number Framebuffer height.