aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-02-27 18:26:06 -0500
committerAlon Zakai <alonzakai@gmail.com>2013-02-27 18:26:06 -0500
commit85b862ac83b28519b572777b849f0011dd437ec1 (patch)
treea3a97473550b078cc8d288e4d5a0fd25fbf7673b /src
parent4b67d79bd54fae6bbab74ee83a6e16829f311717 (diff)
properly emit calls to gl passthroughs with 0 params, and test for glError
Diffstat (limited to 'src')
-rw-r--r--src/library_gl.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index 995f2358..38b330f7 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -2794,6 +2794,8 @@ var LibraryGL = {
glTexCoord3f: function() { throw 'glTexCoord3f: TODO' },
glGetTexLevelParameteriv: function() { throw 'glGetTexLevelParameteriv: TODO' },
+ glShadeModel: function() { Runtime.warnOnce('TODO: glShadeModel') },
+
// signatures of simple pass-through functions, see later
glActiveTexture__sig: 'vi',
glEnableVertexAttribArray__sig: 'vi',
@@ -2820,7 +2822,7 @@ var LibraryGL = {
};
// Simple pass-through functions. Starred ones have return values. [X] ones have X in the C name but not in the JS name
-[[0, 'shadeModel getError* finish flush'],
+[[0, 'getError* finish flush'],
[1, 'clearDepth clearDepth[f] depthFunc enable disable frontFace cullFace clear enableVertexAttribArray disableVertexAttribArray lineWidth clearStencil depthMask stencilMask checkFramebufferStatus* generateMipmap activeTexture blendEquation sampleCoverage isEnabled*'],
[2, 'blendFunc blendEquationSeparate depthRange depthRange[f] stencilMaskSeparate hint polygonOffset'],
[3, 'texParameteri texParameterf drawArrays vertexAttrib2f stencilFunc stencilOp'],
@@ -2831,8 +2833,8 @@ var LibraryGL = {
var num = data[0];
var names = data[1];
var args = range(num).map(function(i) { return 'x' + i }).join(', ');
- var plainStub = '(function(' + args + ') { ' + (num > 0 ? 'Module.ctx.NAME(' + args + ')' : '') + ' })';
- var returnStub = '(function(' + args + ') { ' + (num > 0 ? 'return Module.ctx.NAME(' + args + ')' : '') + ' })';
+ var plainStub = '(function(' + args + ') { Module.ctx.NAME(' + args + ') })';
+ var returnStub = '(function(' + args + ') { return Module.ctx.NAME(' + args + ') })';
names.split(' ').forEach(function(name) {
var stub = plainStub;
if (name[name.length-1] == '*') {