diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-09 16:50:11 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-09 16:50:11 -0700 |
commit | e46022269a67837521327d8e16a2ed21547f9d98 (patch) | |
tree | 3b22b2c5fb72fcbd93502387860df144ccdc5e0a /src | |
parent | baf91b75b1e9a775b4cbc77daaf7c4e12a1a7f46 (diff) |
misc functions
Diffstat (limited to 'src')
-rw-r--r-- | src/webGLWorker.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/webGLWorker.js b/src/webGLWorker.js index 39ee97e5..2ed63b44 100644 --- a/src/webGLWorker.js +++ b/src/webGLWorker.js @@ -573,14 +573,30 @@ function WebGLWorker() { this.uniform4fv = function(location, data) { commandBuffer.push('uniform4fv', 2, location.id, data); }; + this.uniformMatrix4fv = function(location, transpose, data) { + commandBuffer.push('uniformMatrix4fv', 3, location.id, transpose, data); + }; this.createBuffer = function() { var id = nextId++; commandBuffer.push('createBuffer', -1, id); return { what: 'buffer', id: id }; }; this.bindBuffer = function(target, buffer) { - commandBuffer.push('bindBuffer', target, buffer.id); + commandBuffer.push('bindBuffer', 2, target, buffer.id); + }; + this.bufferData = function(target, something, usage) { + commandBuffer.push('bufferData', 3, target, something, usage); + }; + this.viewport = function(x, y, w, h) { + commandBuffer.push('viewport', 4, x, y, w, h); }; + this.vertexAttribPointer = function(index, size, type, normalized, stride, offset) { + commandBuffer.push('vertexAttribPointer', 6, index, size, type, normalized, stride, offset); + }; + this.enableVertexAttribArray = function(index) { + commandBuffer.push('enableVertexAttribArray', 1, index); + }; + // Setup var postMainLoop = Module['postMainLoop']; |