Class: Compositor

me.WebGLRenderer. Compositor

new Compositor(renderer)

A WebGL texture Compositor object. This class handles all of the WebGL state
Pushes texture regions into WebGL buffers, automatically flushes to GPU
Parameters:
Name Type Description
renderer me.WebGLRenderer the current WebGL renderer session
Source:
compositor.js, line 32

Extends

Members

<static, readonly> length :Number

The number of quads held in the batch
Type:
  • Number
Source:
compositor.js, line 51

Methods

<static> addQuad(texture, key, x, y, w, h)

Add a textured quad
Parameters:
Name Type Description
texture me.video.renderer.Texture Source texture
key String Source texture region name
x Number Destination x-coordinate
y Number Destination y-coordinate
w Number Destination width
h Number Destination height
Source:
compositor.js, line 308

<static> clear()

Clear the frame buffer, flushes the composite operations and calls gl.clear()
Source:
compositor.js, line 540

<static> drawLine(points, open)

Draw a line
Parameters:
Name Type Argument Default Description
points Array.<me.Vector2d> Line vertices
open Boolean <optional>
false Whether the line is open (true) or closed (false)
Source:
compositor.js, line 445

<static> flush()

Flush batched texture operations to the GPU
Source:
compositor.js, line 414

<static> lineWidth(width)

Set the line width
Parameters:
Name Type Description
width Number Line width
Source:
compositor.js, line 529

<static> setProjection(w, h)

Sets the projection matrix with the given size
Parameters:
Name Type Description
w Number WebGL Canvas width
h Number WebGL Canvas height
Source:
compositor.js, line 202

<static> useShader(shader)

Select the shader to use for compositing
Parameters:
Name Type Description
shader WebGLProgram The shader program to use
Source:
compositor.js, line 293
Copyright © 2011 - 2017, Olivier Biot, Jason Oster, Aaron McLeod
Documentation generated by JSDoc 3.4.0 on 2017-02-28T11:37:42+08:00 using the DocStrap template modified by codename-.