aboutsummaryrefslogtreecommitdiff
path: root/src/webGLWorker.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-17 12:47:36 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-17 12:47:36 -0700
commit65b9caa8199b1245cf2e089a5878713569cceeb8 (patch)
tree3343f695d95f4a69e01d8074b412d88efd84c0f6 /src/webGLWorker.js
parentb2058670260457f310d44999a8b9e842491364ef (diff)
fix bufferData copying
Diffstat (limited to 'src/webGLWorker.js')
-rw-r--r--src/webGLWorker.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/webGLWorker.js b/src/webGLWorker.js
index 984c201e..559e13bd 100644
--- a/src/webGLWorker.js
+++ b/src/webGLWorker.js
@@ -646,7 +646,7 @@ function WebGLWorker() {
commandBuffer.push('bindBuffer', 2, target, buffer ? buffer.id : 0);
};
this.bufferData = function(target, something, usage) {
- if (typeof something !== 'number') something = new Uint8Array(something);
+ if (typeof something !== 'number') something = new something.constructor(something);
commandBuffer.push('bufferData', 3, target, something, usage);
};
this.viewport = function(x, y, w, h) {