{"action":"created","issue":{"url":"https://api.github.com/repos/tsherif/picogl.js/issues/93","repository_url":"https://api.github.com/repos/tsherif/picogl.js","labels_url":"https://api.github.com/repos/tsherif/picogl.js/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/tsherif/picogl.js/issues/93/comments","events_url":"https://api.github.com/repos/tsherif/picogl.js/issues/93/events","html_url":"https://github.com/tsherif/picogl.js/issues/93","id":298418437,"number":93,"title":"Function for validating framebuffers","user":{"login":"Shimmen","id":6798814,"avatar_url":"https://avatars1.githubusercontent.com/u/6798814?v=4","gravatar_id":"","url":"https://api.github.com/users/Shimmen","html_url":"https://github.com/Shimmen","followers_url":"https://api.github.com/users/Shimmen/followers","following_url":"https://api.github.com/users/Shimmen/following{/other_user}","gists_url":"https://api.github.com/users/Shimmen/gists{/gist_id}","starred_url":"https://api.github.com/users/Shimmen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shimmen/subscriptions","organizations_url":"https://api.github.com/users/Shimmen/orgs","repos_url":"https://api.github.com/users/Shimmen/repos","events_url":"https://api.github.com/users/Shimmen/events{/privacy}","received_events_url":"https://api.github.com/users/Shimmen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-19T22:33:56Z","updated_at":"2018-02-20T10:42:20Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"It would be convenient to have some function for validating that a framebuffer is valid, i.e. a wrapper around [`glCheckFramebufferStatus`](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/checkFramebufferStatus).\r\n\r\nI was implementing some basic shadow mapping today and had a framebuffer with a `GL_R16F` color buffer. Turns out it wasn't a valid setup and I got errors when trying to render to it, but for some reason very inconsistently (every other Ctrl-R it actually did work). Validating the framebuffer after construction always reported an error though.\r\n\r\nOf course we shouldn't build features on inconsistent behaviors like that, but I still think it's very comfortable to be able to validate a framebuffer in \"assembly time\" and it's something I usually always do.\r\n\r\nI propose that we add a function `getStatus`, or if we want a lighter API `isValid`, to the `Framebuffer` class."},"comment":{"url":"https://api.github.com/repos/tsherif/picogl.js/issues/comments/366937642","html_url":"https://github.com/tsherif/picogl.js/issues/93#issuecomment-366937642","issue_url":"https://api.github.com/repos/tsherif/picogl.js/issues/93","id":366937642,"user":{"login":"tsherif","id":476017,"avatar_url":"https://avatars2.githubusercontent.com/u/476017?v=4","gravatar_id":"","url":"https://api.github.com/users/tsherif","html_url":"https://github.com/tsherif","followers_url":"https://api.github.com/users/tsherif/followers","following_url":"https://api.github.com/users/tsherif/following{/other_user}","gists_url":"https://api.github.com/users/tsherif/gists{/gist_id}","starred_url":"https://api.github.com/users/tsherif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsherif/subscriptions","organizations_url":"https://api.github.com/users/tsherif/orgs","repos_url":"https://api.github.com/users/tsherif/repos","events_url":"https://api.github.com/users/tsherif/events{/privacy}","received_events_url":"https://api.github.com/users/tsherif/received_events","type":"User","site_admin":false},"created_at":"2018-02-20T10:42:20Z","updated_at":"2018-02-20T10:42:20Z","author_association":"OWNER","body":"Great idea. I think I'd prefer a `getStatus` method as it's more flexible. And it would be easy enough for the application to write a function that returns `fb.getStatus() === PicoGL.FRAMEBUFFER_COMPLETE.`\r\n\r\nWhile we're on the topic, I'm wondering if there are any other objects we'd want to have GL getter methods on. You can get some handy information for debugging, for example, from `getActiveUniformBlockParameter` and `getBufferParameter`."}}
{"actor":{"display_login":"tsherif"}}