aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-09-14 11:54:28 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-09-14 11:54:28 -0700
commit6dd517fb22f22818db5998f409f80e36b9d769d6 (patch)
tree049824fbab938a41f1316fc0687d073dee5c6bce
parent09baeebf0b8ab9a35de149ef1c2415823bf46125 (diff)
more webgl shims for shell replay
-rwxr-xr-xtools/reproduceriter.py46
1 files changed, 41 insertions, 5 deletions
diff --git a/tools/reproduceriter.py b/tools/reproduceriter.py
index 8edd0883..10979e1b 100755
--- a/tools/reproduceriter.py
+++ b/tools/reproduceriter.py
@@ -650,10 +650,13 @@ if (typeof nagivator == 'undefined') {
bufferData: function(){},
getParameter: function(pname) {
switch(pname) {
- case /* GL_VENDOR */ 0x1F00: return 'FakeShellGLVendor';
- case /* GL_RENDERER */ 0x1F01: return 'FakeShellGLRenderer';
- case /* GL_VERSION */ 0x1F02: return '0.0.1';
- case /* GL_MAX_TEXTURE_SIZE */ 0x0D33: return 16384;
+ case /* GL_VENDOR */ 0x1F00: return 'FakeShellGLVendor';
+ case /* GL_RENDERER */ 0x1F01: return 'FakeShellGLRenderer';
+ case /* GL_VERSION */ 0x1F02: return '0.0.1';
+ case /* GL_MAX_TEXTURE_SIZE */ 0x0D33: return 16384;
+ case /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ 0x851C: return 16384;
+ case /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ 0x84FF: return 16;
+ case /* GL_MAX_TEXTURE_IMAGE_UNITS_NV */ 0x8872: return 16;
default: throw 'getParameter ' + pname;
}
},
@@ -670,10 +673,43 @@ if (typeof nagivator == 'undefined') {
},
getShaderParameter: function(shader, pname) {
switch(pname) {
- case /* GL_SHADER_TYPE */ 0x8B4F: return this.items[shader].type;
+ case /* GL_SHADER_TYPE */ 0x8B4F: return this.items[shader].type;
+ case /* GL_COMPILE_STATUS */ 0x8B81: return true;
default: throw 'getShaderParameter ' + pname;
}
},
+ shaderSource: function(){},
+ compileShader: function(){},
+ createProgram: function() {
+ var id = this.id++;
+ this.items[id] = {
+ which: 'program',
+ shaders: [],
+ };
+ return id;
+ },
+ attachShader: function(program, shader) {
+ this.items[program].shaders.push(shader);
+ },
+ bindAttribLocation: function(){},
+ linkProgram: function(){},
+ getProgramParameter: function(program, pname) {
+ switch(pname) {
+ case /* LINK_STATUS */ 0x8B82: return true;
+ default: throw 'getProgramParameter ' + pname;
+ }
+ },
+ deleteShader: function(){},
+ deleteProgram: function(){},
+ viewport: function(){},
+ clearColor: function(){},
+ clearDepth: function(){},
+ depthFunc: function(){},
+ enable: function(){},
+ disable: function(){},
+ frontFace: function(){},
+ cullFace: function(){},
+ activeTexture: function(){},
};
}
case '2d': {