aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/library_gl.js48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index 055f5782..e73ff776 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -190,6 +190,54 @@ var LibraryGL = {
Module.ctx.bindBuffer(target, GL.buffers[buffer]);
},
+ glVertexAttrib1f: function(index, v0) {
+ Module.ctx.vertexAttrib1f(index, v0);
+ },
+
+ glVertexAttrib2f: function(index, v0, v1) {
+ Module.ctx.vertexAttrib2f(index, v0, v1);
+ },
+
+ glVertexAttrib3f: function(index, v0, v1, v2) {
+ Module.ctx.vertexAttrib3f(index, v0, v1, v2);
+ },
+
+ glVertexAttrib4f: function(index, v0, v1, v2, v3) {
+ Module.ctx.vertexAttrib4f(index, v0, v1, v2, v3);
+ },
+
+ glVertexAttrib1fv: function(index, v) {
+ v = new Float32Array(IHEAP.slice(v, value + 1*4)); // TODO: optimize
+ Module.ctx.vertexAttrib1fv(index, v);
+ },
+
+ glVertexAttrib2fv: function(index, v) {
+ v = new Float32Array(IHEAP.slice(v, value + 2*4)); // TODO: optimize
+ Module.ctx.vertexAttrib2fv(index, v);
+ },
+
+ glVertexAttrib3fv: function(index, v) {
+ v = new Float32Array(IHEAP.slice(v, value + 3*4)); // TODO: optimize
+ Module.ctx.vertexAttrib3fv(index, v);
+ },
+
+ glVertexAttrib4fv: function(index, v) {
+ v = new Float32Array(IHEAP.slice(v, value + 4*4)); // TODO: optimize
+ Module.ctx.vertexAttrib4fv(index, v);
+ },
+
+ glVertexAttribPointer: function(index, size, type, normalized, stride, pointer) {
+ Module.ctx.vertexAttribPointer(index, size, type, normalized, stride, pointer);
+ },
+
+ glEnableVertexAttribArray: function(index) {
+ Module.ctx.enableVertexAttribArray(index);
+ },
+
+ glDisableVertexAttribArray: function(index) {
+ Module.ctx.disableVertexAttribArray(index);
+ },
+
glClearColor: function(red, green, blue, alpha) {
Module.ctx.clearColor(red, green, blue, alpha);
},