Namespace: shader

me.video. shader

The WebGL Shader singleton
There is no constructor function for me.video.shader
Source:
shader.js, line 9

Methods

<static> createShader(gl, vertex, fragment) → {Object}

Create a shader program (with bindings) using the given GLSL sources
Parameters:
Name Type Description
gl WebGLContext WebGL Context
vertex String Vertex shader source
fragment String Fragment shader source
Source:
shader.js, line 61
Returns:
A reference to the WebGL Shader Program
Type
Object

<static> createTexture(gl, unit, image, filter, repeat, w, h, b) → {WebGLTexture}

Create a texture from an image
Parameters:
Name Type Argument Default Description
gl WebGLContext WebGL Context
unit Number Destination texture unit
image Image | Canvas | ImageData | Array.<UInt8Array> | Array.<Float32Array> Source image
filter Number gl.LINEAR or gl.NEAREST
repeat String <optional>
"no-repeat" Image repeat behavior (see me.ImageLayer#repeat)
w Number <optional>
Source image width (Only use with UInt8Array[] or Float32Array[] source image)
h Number <optional>
Source image height (Only use with UInt8Array[] or Float32Array[] source image)
b Number <optional>
Source image border (Only use with UInt8Array[] or Float32Array[] source image)
Source:
shader.js, line 160
Returns:
A texture object
Type
WebGLTexture
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-.