aboutsummaryrefslogtreecommitdiff
path: root/src/library_gl.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-31 17:40:41 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-31 17:40:41 -0800
commitabc177f64fddca0ce07becbfc712309377755a5f (patch)
treefe3a975e893ee13e1853252fed8ad2497510fd0e /src/library_gl.js
parent375eb145c8a6c1627a8b93f81d40fd1aa7fc899b (diff)
fix glIsTexture from throwing a warning on null-ified textures, and add testing
Diffstat (limited to 'src/library_gl.js')
-rw-r--r--src/library_gl.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index 0566b3a0..f7966dab 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -424,11 +424,9 @@ var LibraryGL = {
},
glIsTexture: function(texture) {
- var fb = GL.textures[texture];
- if (typeof(fb) == 'undefined') {
- return 0;
- }
- return Module.ctx.isTexture(fb);
+ var texture = GL.textures[texture];
+ if (!texture) return 0;
+ return Module.ctx.isTexture(texture);
},
glGenBuffers__sig: 'vii',