diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-19 13:21:50 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-19 13:21:50 -0700 |
commit | d53193e2f5662c3fb9598251b178cfc2fe2bcc7e (patch) | |
tree | 63f28a06b35cd85ef67958fcde50df69cb753f7b | |
parent | 5ecf10671320d7bebbda27f3b7c36d48f41402fc (diff) |
drop objects on client when delete'd
-rw-r--r-- | src/webGLClient.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/webGLClient.js b/src/webGLClient.js index 82f741d4..6c2238b3 100644 --- a/src/webGLClient.js +++ b/src/webGLClient.js @@ -14,7 +14,12 @@ function WebGLClient() { case 'deleteBuffer': case 'deleteShader': case 'deleteProgram': - case 'deleteTexture': + case 'deleteTexture': { + var id = args[0]; + args[0] = objects[id]; + objects[id] = null; // stop holding on to the object globally + break; + } case 'getProgramParameter': case 'getShaderParameter': case 'uniform1i': |