aboutsummaryrefslogtreecommitdiff
path: root/src/library_gl.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-05-15 16:26:57 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-05-15 16:26:57 -0700
commit798e635cf912d778f08f8107d6d59fcd11b20082 (patch)
treeb4627e55014a017c02d952c92feda76d745415ee /src/library_gl.js
parent3afb3d53d70c6d9a3e84e488cfa986b8cd7b2733 (diff)
support for reading files synchronously
Diffstat (limited to 'src/library_gl.js')
-rw-r--r--src/library_gl.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index 8e4159af..d1c21fa1 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -59,12 +59,17 @@ var LibraryGL = {
}
Module.ctxGL.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
},
+
+ glBindTexture: function(target, texture) {
+ Module.ctxGL.bindTexture(target, GL.textures[texture]);
+ },
};
// Simple pass-through functions
[[0, 'shadeModel fogi fogfv'],
[1, 'clearDepth depthFunc enable disable frontFace cullFace'],
[2, 'pixelStorei'],
+ [3, 'texParameteri texParameterf'],
[4, 'viewport clearColor']].forEach(function(data) {
var num = data[0];
var names = data[1];