diff options
-rwxr-xr-x | tools/reproduceriter.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/reproduceriter.py b/tools/reproduceriter.py index 10979e1b..e6db454c 100755 --- a/tools/reproduceriter.py +++ b/tools/reproduceriter.py @@ -710,11 +710,32 @@ if (typeof nagivator == 'undefined') { frontFace: function(){}, cullFace: function(){}, activeTexture: function(){}, + createTexture: function() { + var id = this.id++; + this.items[id] = { + which: 'texture', + }; + return id; + }, + boundTextures: {}, + bindTexture: function(target, texture) { + this.boundTextures[target] = texture; + }, + texParameteri: function(){}, + pixelStorei: function(){}, + texImage2D: function(){}, }; } case '2d': { return { drawImage: function(){}, + getImageData: function(x, y, w, h) { + return { + width: w, + height: h, + data: new Uint8ClampedArray(w*h), + }; + }, }; } default: throw 'canvas.getContext: ' + which; |