aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2012-04-13 17:46:16 -0400
committerEhsan Akhgari <ehsan.akhgari@gmail.com>2012-04-13 18:18:56 -0400
commitba0a651f1a4513610c97caf47767d36d086cb0fa (patch)
tree4040e7b057d03e4ecc0f2fa0928129e4ebb03205
parent5edc8d89a3d46928b78cf0e571d4851f73dcd599 (diff)
Assume that the texture is already bound
-rw-r--r--src/library_gl.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index 2e1e5d6e..0b118555 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -1131,8 +1131,9 @@ var LibraryGL = {
Module.ctx.enableVertexAttribArray(this.texCoordLocation);
Module.ctx.activeTexture(Module.ctx.TEXTURE0);
- this.textureId = Module.ctx.createTexture();
- Module.ctx.bindTexture(Module.ctx.TEXTURE_2D, this.textureId);
+ // Assume the texture is bound
+ //this.textureId = Module.ctx.getParameter(Module.ctx.TEXTURE_BINDING_2D);
+ //Module.ctx.bindTexture(Module.ctx.TEXTURE_2D, this.textureId);
Module.ctx.uniform1i(this.textureLocation, 0);