diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-03 11:59:02 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-03 11:59:02 -0800 |
commit | d3dcf0915b6b566bd492dc8473c0c4a24b2ba5b4 (patch) | |
tree | 5f771f5ac7ba45c04597d9f604dbe6a2e7699104 | |
parent | 519efb8e48baa01d4af89cb66dc060da18e439b2 (diff) |
fix output in glGetFramebufferAttachmentParameteriv
-rw-r--r-- | src/library_gl.js | 2 | ||||
-rw-r--r-- | tests/aniso.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index 6575a911..075d7cb5 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -1704,7 +1704,7 @@ var LibraryGL = { glGetFramebufferAttachmentParameteriv__sig: 'viiii', glGetFramebufferAttachmentParameteriv: function(target, attachment, pname, params) { var result = Module.ctx.getFramebufferAttachmentParameter(target, attachment, pname); - {{{ makeSetValue('params', '0', 'params', 'i32') }}}; + {{{ makeSetValue('params', '0', 'result', 'i32') }}}; }, glIsFramebuffer__sig: 'ii', diff --git a/tests/aniso.c b/tests/aniso.c index f1674cad..443e50aa 100644 --- a/tests/aniso.c +++ b/tests/aniso.c @@ -151,6 +151,11 @@ int main(int argc, char *argv[]) assert(!glGetError()); glBindFramebuffer(GL_RENDERBUFFER, 0); assert(glGetError()); + + GLint out = 321; + assert(!glGetError()); + glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &out); // invalid, just test output + assert(out == 0); } // Prepare and Render |