diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-04-13 17:46:16 -0400 |
---|---|---|
committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-04-13 18:18:56 -0400 |
commit | ba0a651f1a4513610c97caf47767d36d086cb0fa (patch) | |
tree | 4040e7b057d03e4ecc0f2fa0928129e4ebb03205 | |
parent | 5edc8d89a3d46928b78cf0e571d4851f73dcd599 (diff) |
Assume that the texture is already bound
-rw-r--r-- | src/library_gl.js | 5 |
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); |