{"action":"published","release":{"url":"https://api.github.com/repos/npomf/opengl-ruby/releases/3053297","assets_url":"https://api.github.com/repos/npomf/opengl-ruby/releases/3053297/assets","upload_url":"https://uploads.github.com/repos/npomf/opengl-ruby/releases/3053297/assets{?name,label}","html_url":"https://github.com/npomf/opengl-ruby/releases/tag/v0.4.1","id":3053297,"tag_name":"v0.4.1","target_commitish":"master","name":"glDrawBuffers() support for GL::Framebuffer","draft":false,"author":{"login":"npomf","id":14838968,"avatar_url":"https://avatars.githubusercontent.com/u/14838968?v=3","gravatar_id":"","url":"https://api.github.com/users/npomf","html_url":"https://github.com/npomf","followers_url":"https://api.github.com/users/npomf/followers","following_url":"https://api.github.com/users/npomf/following{/other_user}","gists_url":"https://api.github.com/users/npomf/gists{/gist_id}","starred_url":"https://api.github.com/users/npomf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npomf/subscriptions","organizations_url":"https://api.github.com/users/npomf/orgs","repos_url":"https://api.github.com/users/npomf/repos","events_url":"https://api.github.com/users/npomf/events{/privacy}","received_events_url":"https://api.github.com/users/npomf/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2016-04-19T16:52:57Z","published_at":"2016-04-19T17:03:16Z","assets":[{"url":"https://api.github.com/repos/npomf/opengl-ruby/releases/assets/1571508","id":1571508,"name":"opengl-glfw-0.4.1.gem","label":null,"uploader":{"login":"npomf","id":14838968,"avatar_url":"https://avatars.githubusercontent.com/u/14838968?v=3","gravatar_id":"","url":"https://api.github.com/users/npomf","html_url":"https://github.com/npomf","followers_url":"https://api.github.com/users/npomf/followers","following_url":"https://api.github.com/users/npomf/following{/other_user}","gists_url":"https://api.github.com/users/npomf/gists{/gist_id}","starred_url":"https://api.github.com/users/npomf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npomf/subscriptions","organizations_url":"https://api.github.com/users/npomf/orgs","repos_url":"https://api.github.com/users/npomf/repos","events_url":"https://api.github.com/users/npomf/events{/privacy}","received_events_url":"https://api.github.com/users/npomf/received_events","type":"User","site_admin":false},"content_type":"application/x-tar","state":"uploaded","size":35328,"download_count":0,"created_at":"2016-04-19T16:57:58Z","updated_at":"2016-04-19T16:58:00Z","browser_download_url":"https://github.com/npomf/opengl-ruby/releases/download/v0.4.1/opengl-glfw-0.4.1.gem"}],"tarball_url":"https://api.github.com/repos/npomf/opengl-ruby/tarball/v0.4.1","zipball_url":"https://api.github.com/repos/npomf/opengl-ruby/zipball/v0.4.1","body":"You can now define the drawing buffers for a Framebuffer by simply calling the new `#draw_buffers()` method.\r\n\r\n**Example**\r\n\r\n```ruby\r\n# our fragment buffer\r\nfragments = GL::Texture.new()\r\nfragments.parameters(\r\n    GL_TEXTURE_MIN_FILTER: GL_NEAREST,\r\n    GL_TEXTURE_MAG_FILTER: GL_NEAREST,\r\n    GL_TEXTURE_WRAP_S: GL_CLAMP_TO_EDGE,\r\n    GL_TEXTURE_WRAP_T: GL_CLAMP_TO_EDGE\r\n)\r\n\r\n# our normal buffer\r\nnormals = GL::Texture.new()\r\nnormals.parameters(\r\n    GL_TEXTURE_MIN_FILTER: GL_NEAREST,\r\n    GL_TEXTURE_MAG_FILTER: GL_NEAREST\r\n)\r\n\r\n# a depth buffer\r\ndepth_buffer = GL::Renderbuffer.new()\r\n\r\n# TODO set their sizes\r\n\r\nframebuffer = GL::Framebuffer.new()\r\nframebuffer.attach( GL_DEPTH_ATTACHMENT, depth_buffer )\r\n           .attach( GL_COLOR_ATTACHMENT0, fragments )  # location = 0\r\n           .attach( GL_COLOR_ATTACHMENT1, normals )    # location = 1\r\n           .draw_buffers( GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 )\r\n\r\n# now feel free to make use of it all!\r\n```"}}