aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael J. Bishop <mbtyke@gmail.com>2013-11-01 13:52:49 -0400
committerMichael J. Bishop <mbtyke@gmail.com>2013-11-01 13:52:49 -0400
commit504683b8ecabf0c73c06444dd0f103bc461a52b6 (patch)
treed519bff6e6e7682e107377154deee92a13fa55a7 /src
parent90dcac551fee69cf284ae4431db949bc69796a1c (diff)
Adds to a test case verifying glGetIntegerv returns
correct results when the current texture id is not TEXTURE0 and fixes library_gl.js so that it returns correct results.
Diffstat (limited to 'src')
-rw-r--r--src/library_gl.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index 76501111..6ae20185 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -1793,17 +1793,17 @@ var LibraryGL = {
return;
}
case 0x8088: { // GL_TEXTURE_COORD_ARRAY_SIZE
- var attribute = GLImmediate.clientAttributes[GLImmediate.TEXTURE0];
+ var attribute = GLImmediate.clientAttributes[GLImmediate.TEXTURE0 + GLImmediate.clientActiveTexture];
{{{ makeSetValue('params', '0', 'attribute ? attribute.size : 0', 'i32') }}};
return;
}
case 0x8089: { // GL_TEXTURE_COORD_ARRAY_TYPE
- var attribute = GLImmediate.clientAttributes[GLImmediate.TEXTURE0];
+ var attribute = GLImmediate.clientAttributes[GLImmediate.TEXTURE0 + GLImmediate.clientActiveTexture];
{{{ makeSetValue('params', '0', 'attribute ? attribute.type : 0', 'i32') }}};
return;
}
case 0x808A: { // GL_TEXTURE_COORD_ARRAY_STRIDE
- var attribute = GLImmediate.clientAttributes[GLImmediate.TEXTURE0];
+ var attribute = GLImmediate.clientAttributes[GLImmediate.TEXTURE0 + GLImmediate.clientActiveTexture];
{{{ makeSetValue('params', '0', 'attribute ? attribute.stride : 0', 'i32') }}};
return;
}
@@ -2190,7 +2190,7 @@ var LibraryGL = {
case 0x8090: // GL_COLOR_ARRAY_POINTER
attribute = GLImmediate.clientAttributes[GLImmediate.COLOR]; break;
case 0x8092: // GL_TEXTURE_COORD_ARRAY_POINTER
- attribute = GLImmediate.clientAttributes[GLImmediate.TEXTURE0]; break;
+ attribute = GLImmediate.clientAttributes[GLImmediate.TEXTURE0 + GLImmediate.clientActiveTexture]; break;
default: throw 'TODO: glGetPointerv for ' + name;
}
{{{ makeSetValue('p', '0', 'attribute ? attribute.pointer : 0', 'i32') }}};