diff options
Diffstat (limited to 'src/webGLWorker.js')
-rw-r--r-- | src/webGLWorker.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/webGLWorker.js b/src/webGLWorker.js index 08b72e01..3457f097 100644 --- a/src/webGLWorker.js +++ b/src/webGLWorker.js @@ -489,8 +489,12 @@ function WebGLWorker() { commandBuffer.push('clearColor', 4, r, g, b, a); }; this.createShader = function(type) { - commandBuffer.push('createShader', 1, type); - return { id: nextId++, what: 'shader', type: type }; + var id = nextId++; + commandBuffer.push('createShader', -2, type, id); + return { id: id, what: 'shader', type: type }; + } + this.shaderSource = function(shader, source) { + commandBuffer.push('shaderSource', 2, shader.id, source); } // Setup |