diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-04-13 10:58:10 -0400 |
---|---|---|
committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-04-13 10:58:10 -0400 |
commit | 99bf4944608edca58c97f9e62459469ad53f7419 (patch) | |
tree | d6f072a6593ca02ae97d3d6aa46e87a2e5c08fdc | |
parent | 3c6ef3a1a20dbba335d9882fde0eb4a80e4a3097 (diff) |
Create the texture before binding it
-rw-r--r-- | src/library_gl.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index a26b6032..5d96744c 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -1103,6 +1103,7 @@ var LibraryGL = { Module.ctx.enableVertexAttribArray(this.texCoordLoc); Module.ctx.activeTexture(Module.ctx.TEXTURE0); + this.textureId = Module.ctx.createTexture(); Module.ctx.bindTexture(Module.ctx.TEXTURE_2D, this.textureId); Module.ctx.uniform1i(this.textureLocation, 0); |