{"action":"created","issue":{"url":"https://api.github.com/repos/kripken/emscripten/issues/4700","repository_url":"https://api.github.com/repos/kripken/emscripten","labels_url":"https://api.github.com/repos/kripken/emscripten/issues/4700/labels{/name}","comments_url":"https://api.github.com/repos/kripken/emscripten/issues/4700/comments","events_url":"https://api.github.com/repos/kripken/emscripten/issues/4700/events","html_url":"https://github.com/kripken/emscripten/issues/4700","id":187742932,"number":4700,"title":"Treating OpenGL function colorMask as passthrough conflicts with WebGL spec","user":{"login":"AlexPerrot","id":2419665,"avatar_url":"https://avatars.githubusercontent.com/u/2419665?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexPerrot","html_url":"https://github.com/AlexPerrot","followers_url":"https://api.github.com/users/AlexPerrot/followers","following_url":"https://api.github.com/users/AlexPerrot/following{/other_user}","gists_url":"https://api.github.com/users/AlexPerrot/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexPerrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexPerrot/subscriptions","organizations_url":"https://api.github.com/users/AlexPerrot/orgs","repos_url":"https://api.github.com/users/AlexPerrot/repos","events_url":"https://api.github.com/users/AlexPerrot/events{/privacy}","received_events_url":"https://api.github.com/users/AlexPerrot/received_events","type":"User","site_admin":false},"labels":[{"id":117362613,"url":"https://api.github.com/repos/kripken/emscripten/labels/GL","name":"GL","color":"009800","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-07T15:34:38Z","updated_at":"2016-11-10T01:51:01Z","closed_at":"2016-11-10T01:51:01Z","body":"Hi,\r\nI am using the OpenGL function `colorMask`, which in OpenGL takes `GLBoolean` (a.k.a. `unsigned char`), but in WebGL takes a `GLboolean`, which is a simple `boolean` (see [here](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Types) ).\r\n\r\nEmscripten treats this function as a simple passthrough function, so it does not convert the args from `Number` to `boolean`.\r\nWhile this is not in line with the WebGL specification, it does work in every web browser I tested.\r\nBut I want to use [node-webgl](https://github.com/mikeseven/node-webgl), which is strictly enforcing the WebGL spec for `colorMask` (https://github.com/mikeseven/node-webgl/blob/master/lib/webgl.js#L186).\r\n\r\nAny ideas to fix this ?\r\n\r\nEdit : This is also valid for any other OpenGL function with a `GLBoolean` argument."},"comment":{"url":"https://api.github.com/repos/kripken/emscripten/issues/comments/259580585","html_url":"https://github.com/kripken/emscripten/issues/4700#issuecomment-259580585","issue_url":"https://api.github.com/repos/kripken/emscripten/issues/4700","id":259580585,"user":{"login":"kripken","id":173661,"avatar_url":"https://avatars.githubusercontent.com/u/173661?v=3","gravatar_id":"","url":"https://api.github.com/users/kripken","html_url":"https://github.com/kripken","followers_url":"https://api.github.com/users/kripken/followers","following_url":"https://api.github.com/users/kripken/following{/other_user}","gists_url":"https://api.github.com/users/kripken/gists{/gist_id}","starred_url":"https://api.github.com/users/kripken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kripken/subscriptions","organizations_url":"https://api.github.com/users/kripken/orgs","repos_url":"https://api.github.com/users/kripken/repos","events_url":"https://api.github.com/users/kripken/events{/privacy}","received_events_url":"https://api.github.com/users/kripken/received_events","type":"User","site_admin":false},"created_at":"2016-11-10T01:51:01Z","updated_at":"2016-11-10T01:51:01Z","body":"Fixed by your PR."}}
{"actor":{"display_login":"kripken"}}