diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-26 16:20:30 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-26 16:20:30 -0800 |
commit | bc1b905273c8b95a00ae6f5d17042eefae6a7be9 (patch) | |
tree | 4cfd9423b30610cd097e2a9346ac819b956100b3 /src | |
parent | 6693e8ca0509fbc6ca3708c44dc5f7ad113bfb99 (diff) | |
parent | 097af50a10627ab2f26b2dae2fad9304df5f3bbe (diff) |
Merge pull request #870 from michaeljbishop/adding-glgetbooleanv-gl-vertex-array
Added support in glGetBooleanv GL_VERTEX_ARRAY.
Diffstat (limited to 'src')
-rw-r--r-- | src/library_gl.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index 027b2841..a20eccf6 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -1057,6 +1057,26 @@ var LibraryGL = { return Module.ctx.isEnabled(cap); }; + var glGetBooleanv = _glGetBooleanv; + _glGetBooleanv = function(pname, p) { + var attrib = null; + switch (pname) { + case 0x8078: // GL_TEXTURE_COORD_ARRAY + case 0x0de1: // GL_TEXTURE_2D - XXX not according to spec, and not in desktop GL, but works in some GLES1.x apparently, so support it + attrib = GL.immediate.TEXTURE0 + GL.immediate.clientActiveTexture; break; + case 0x8074: // GL_VERTEX_ARRAY + attrib = GL.immediate.VERTEX; break; + case 0x8076: // GL_COLOR_ARRAY + attrib = GL.immediate.COLOR; break; + } + if (attrib != null) { + var result = GL.immediate.enabledClientAttributes[attrib]; + {{{ makeSetValue('p', '0', 'result === true ? 1 : 0', 'i8') }}}; + return; + } + glGetBooleanv(pname, p); + }; + var glGetIntegerv = _glGetIntegerv; _glGetIntegerv = function(pname, params) { switch (pname) { |