aboutsummaryrefslogtreecommitdiff
path: root/src/webGLWorker.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-18 14:16:19 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-18 14:16:19 -0700
commita7ab04e3eeda3f40e6daef4d6026ac87b1f39505 (patch)
tree6b9532cc812a677a4e0f508f291ed29fc06da4d1 /src/webGLWorker.js
parenta78fd466c4bf77bd453992f4766cd5da2b421ac9 (diff)
handle texImage2D with pixels === null
Diffstat (limited to 'src/webGLWorker.js')
-rw-r--r--src/webGLWorker.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/webGLWorker.js b/src/webGLWorker.js
index 9923d02e..64892714 100644
--- a/src/webGLWorker.js
+++ b/src/webGLWorker.js
@@ -746,8 +746,8 @@ function WebGLWorker() {
commandBuffer.push('texParameteri', 3, target, pname, param);
};
this.texImage2D = function(target, level, internalformat, width, height, border, format, type, pixels) {
- assert(pixels); // we do not support the overloads that have fewer params
- commandBuffer.push('texImage2D', 9, target, level, internalformat, width, height, border, format, type, new pixels.constructor(pixels));
+ assert(pixels || pixels === null); // we do not support the overloads that have fewer params
+ commandBuffer.push('texImage2D', 9, target, level, internalformat, width, height, border, format, type, pixels ? new pixels.constructor(pixels) : pixels);
};
this.compressedTexImage2D = function(target, level, internalformat, width, height, border, pixels) {
commandBuffer.push('compressedTexImage2D', 7, target, level, internalformat, width, height, border, new pixels.constructor(pixels));