{"action":"closed","number":1668,"pull_request":{"url":"https://api.github.com/repos/MovingBlocks/Terasology/pulls/1668","id":33308789,"html_url":"https://github.com/MovingBlocks/Terasology/pull/1668","diff_url":"https://github.com/MovingBlocks/Terasology/pull/1668.diff","patch_url":"https://github.com/MovingBlocks/Terasology/pull/1668.patch","issue_url":"https://api.github.com/repos/MovingBlocks/Terasology/issues/1668","number":1668,"state":"closed","locked":false,"title":"Rendering Process Refactoring - FBO creation","user":{"login":"emanuele3d","id":6934584,"avatar_url":"https://avatars.githubusercontent.com/u/6934584?v=3","gravatar_id":"","url":"https://api.github.com/users/emanuele3d","html_url":"https://github.com/emanuele3d","followers_url":"https://api.github.com/users/emanuele3d/followers","following_url":"https://api.github.com/users/emanuele3d/following{/other_user}","gists_url":"https://api.github.com/users/emanuele3d/gists{/gist_id}","starred_url":"https://api.github.com/users/emanuele3d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emanuele3d/subscriptions","organizations_url":"https://api.github.com/users/emanuele3d/orgs","repos_url":"https://api.github.com/users/emanuele3d/repos","events_url":"https://api.github.com/users/emanuele3d/events{/privacy}","received_events_url":"https://api.github.com/users/emanuele3d/received_events","type":"User","site_admin":false},"body":"This is the first of a number of PR aiming to refactor the class LwjglRenderingProcess. \r\n\r\nThe destination I am aiming for (minus feedback and some changes that have already taken place in this PR) is available in [this branch](https://github.com/emanuele3d/Terasology/tree/RendererChangesBKP). While there are no functional changes (the look and performance of Terasology's renderer should stay the same) the changes to the code are substantial, primarily in the interest of readability, maintainability and, eventually, ease of adding new capabilities. For this reason I won't submit that branch as a PR, only as a reference of where I'm heading.\r\n\r\nNow, some background info: OpenGL's FrameBuffers can be thought of boxes with a number of internal slots (attachment points). Once something is placed in one of those slots (is attached to the FrameBuffer's attachment point), it becomes available, among other things, to shaders to read from or write to. Oversimplifying, a shader might read from slot A, containing an image, and produce a blurred version of it in slot B.\r\n\r\nTo start small(ish) this PR focuses only on the code generating OpenGL FrameBuffers and their attachments, which are then wrapped and manipulated through FBO instances. The original FBO-generating code was in a single LwjglRenderingProcess.createFBO() method. This code has been restructured into (public) FBO.create() method and a number of (private) support methods. \r\n\r\nAlso, as originally suggested by @immortius long time ago, an LwjglRenderingProcess.FBObuilder class, is now available, making the FBO instantiation syntax a little easier on the eye.\r\n\r\nFinally, javadocs and some comments have been added throughout the new and affected code.","created_at":"2015-04-14T23:06:02Z","updated_at":"2015-04-17T01:50:23Z","closed_at":"2015-04-17T01:50:23Z","merged_at":"2015-04-17T01:50:23Z","merge_commit_sha":"dfc56164d3be9608b1c4d637701bcdee68aeabad","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MovingBlocks/Terasology/pulls/1668/commits","review_comments_url":"https://api.github.com/repos/MovingBlocks/Terasology/pulls/1668/comments","review_comment_url":"https://api.github.com/repos/MovingBlocks/Terasology/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MovingBlocks/Terasology/issues/1668/comments","statuses_url":"https://api.github.com/repos/MovingBlocks/Terasology/statuses/a29e3f2f36dea8943dc667dbece366ddd688daa7","head":{"label":"emanuele3d:ImproveFBOclassAndAddFBOBuilder","ref":"ImproveFBOclassAndAddFBOBuilder","sha":"a29e3f2f36dea8943dc667dbece366ddd688daa7","user":{"login":"emanuele3d","id":6934584,"avatar_url":"https://avatars.githubusercontent.com/u/6934584?v=3","gravatar_id":"","url":"https://api.github.com/users/emanuele3d","html_url":"https://github.com/emanuele3d","followers_url":"https://api.github.com/users/emanuele3d/followers","following_url":"https://api.github.com/users/emanuele3d/following{/other_user}","gists_url":"https://api.github.com/users/emanuele3d/gists{/gist_id}","starred_url":"https://api.github.com/users/emanuele3d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emanuele3d/subscriptions","organizations_url":"https://api.github.com/users/emanuele3d/orgs","repos_url":"https://api.github.com/users/emanuele3d/repos","events_url":"https://api.github.com/users/emanuele3d/events{/privacy}","received_events_url":"https://api.github.com/users/emanuele3d/received_events","type":"User","site_admin":false},"repo":{"id":18476733,"name":"Terasology","full_name":"emanuele3d/Terasology","owner":{"login":"emanuele3d","id":6934584,"avatar_url":"https://avatars.githubusercontent.com/u/6934584?v=3","gravatar_id":"","url":"https://api.github.com/users/emanuele3d","html_url":"https://github.com/emanuele3d","followers_url":"https://api.github.com/users/emanuele3d/followers","following_url":"https://api.github.com/users/emanuele3d/following{/other_user}","gists_url":"https://api.github.com/users/emanuele3d/gists{/gist_id}","starred_url":"https://api.github.com/users/emanuele3d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emanuele3d/subscriptions","organizations_url":"https://api.github.com/users/emanuele3d/orgs","repos_url":"https://api.github.com/users/emanuele3d/repos","events_url":"https://api.github.com/users/emanuele3d/events{/privacy}","received_events_url":"https://api.github.com/users/emanuele3d/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/emanuele3d/Terasology","description":"Terasology is an open source project started by Benjamin \"begla\" Glatzel to research procedural terrain generation and efficient rendering techniques in Java using the LWJGL. The engine uses a block-based voxel-like approach as seen in Minecraft.  After proving itself as a solid tech demo begla was joined at first by Anton \"small-jeeper\" Kireev and Rasmus \"Cervator\" Praestholm and a full-fledged game concept was born. Our goal is a game that pays ample tribute to Minecraft in initial look and origin, but stakes out its own niche by adopting the NPC-helper and caretaker feel from such games as Dwarf Fortress and Dungeon Keeper, while striving for added depth and sophistication in the foundation systems akin to DF.","fork":true,"url":"https://api.github.com/repos/emanuele3d/Terasology","forks_url":"https://api.github.com/repos/emanuele3d/Terasology/forks","keys_url":"https://api.github.com/repos/emanuele3d/Terasology/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emanuele3d/Terasology/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emanuele3d/Terasology/teams","hooks_url":"https://api.github.com/repos/emanuele3d/Terasology/hooks","issue_events_url":"https://api.github.com/repos/emanuele3d/Terasology/issues/events{/number}","events_url":"https://api.github.com/repos/emanuele3d/Terasology/events","assignees_url":"https://api.github.com/repos/emanuele3d/Terasology/assignees{/user}","branches_url":"https://api.github.com/repos/emanuele3d/Terasology/branches{/branch}","tags_url":"https://api.github.com/repos/emanuele3d/Terasology/tags","blobs_url":"https://api.github.com/repos/emanuele3d/Terasology/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emanuele3d/Terasology/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emanuele3d/Terasology/git/refs{/sha}","trees_url":"https://api.github.com/repos/emanuele3d/Terasology/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emanuele3d/Terasology/statuses/{sha}","languages_url":"https://api.github.com/repos/emanuele3d/Terasology/languages","stargazers_url":"https://api.github.com/repos/emanuele3d/Terasology/stargazers","contributors_url":"https://api.github.com/repos/emanuele3d/Terasology/contributors","subscribers_url":"https://api.github.com/repos/emanuele3d/Terasology/subscribers","subscription_url":"https://api.github.com/repos/emanuele3d/Terasology/subscription","commits_url":"https://api.github.com/repos/emanuele3d/Terasology/commits{/sha}","git_commits_url":"https://api.github.com/repos/emanuele3d/Terasology/git/commits{/sha}","comments_url":"https://api.github.com/repos/emanuele3d/Terasology/comments{/number}","issue_comment_url":"https://api.github.com/repos/emanuele3d/Terasology/issues/comments{/number}","contents_url":"https://api.github.com/repos/emanuele3d/Terasology/contents/{+path}","compare_url":"https://api.github.com/repos/emanuele3d/Terasology/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emanuele3d/Terasology/merges","archive_url":"https://api.github.com/repos/emanuele3d/Terasology/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emanuele3d/Terasology/downloads","issues_url":"https://api.github.com/repos/emanuele3d/Terasology/issues{/number}","pulls_url":"https://api.github.com/repos/emanuele3d/Terasology/pulls{/number}","milestones_url":"https://api.github.com/repos/emanuele3d/Terasology/milestones{/number}","notifications_url":"https://api.github.com/repos/emanuele3d/Terasology/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emanuele3d/Terasology/labels{/name}","releases_url":"https://api.github.com/repos/emanuele3d/Terasology/releases{/id}","created_at":"2014-04-05T21:11:26Z","updated_at":"2015-04-12T09:51:25Z","pushed_at":"2015-04-14T22:19:26Z","git_url":"git://github.com/emanuele3d/Terasology.git","ssh_url":"git@github.com:emanuele3d/Terasology.git","clone_url":"https://github.com/emanuele3d/Terasology.git","svn_url":"https://github.com/emanuele3d/Terasology","homepage":"http://terasology.org/","size":197779,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"MovingBlocks:develop","ref":"develop","sha":"a9091c156a2fd295f19e9998eb5bdace4f7deb0e","user":{"login":"MovingBlocks","id":1292442,"avatar_url":"https://avatars.githubusercontent.com/u/1292442?v=3","gravatar_id":"","url":"https://api.github.com/users/MovingBlocks","html_url":"https://github.com/MovingBlocks","followers_url":"https://api.github.com/users/MovingBlocks/followers","following_url":"https://api.github.com/users/MovingBlocks/following{/other_user}","gists_url":"https://api.github.com/users/MovingBlocks/gists{/gist_id}","starred_url":"https://api.github.com/users/MovingBlocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MovingBlocks/subscriptions","organizations_url":"https://api.github.com/users/MovingBlocks/orgs","repos_url":"https://api.github.com/users/MovingBlocks/repos","events_url":"https://api.github.com/users/MovingBlocks/events{/privacy}","received_events_url":"https://api.github.com/users/MovingBlocks/received_events","type":"Organization","site_admin":false},"repo":{"id":1438007,"name":"Terasology","full_name":"MovingBlocks/Terasology","owner":{"login":"MovingBlocks","id":1292442,"avatar_url":"https://avatars.githubusercontent.com/u/1292442?v=3","gravatar_id":"","url":"https://api.github.com/users/MovingBlocks","html_url":"https://github.com/MovingBlocks","followers_url":"https://api.github.com/users/MovingBlocks/followers","following_url":"https://api.github.com/users/MovingBlocks/following{/other_user}","gists_url":"https://api.github.com/users/MovingBlocks/gists{/gist_id}","starred_url":"https://api.github.com/users/MovingBlocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MovingBlocks/subscriptions","organizations_url":"https://api.github.com/users/MovingBlocks/orgs","repos_url":"https://api.github.com/users/MovingBlocks/repos","events_url":"https://api.github.com/users/MovingBlocks/events{/privacy}","received_events_url":"https://api.github.com/users/MovingBlocks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MovingBlocks/Terasology","description":"Terasology is an open source project started by Benjamin \"begla\" Glatzel to research procedural terrain generation and efficient rendering techniques in Java using the LWJGL. The engine uses a block-based voxel-like approach as seen in Minecraft.  After proving itself as a solid tech demo begla was joined at first by Anton \"small-jeeper\" Kireev and Rasmus \"Cervator\" Praestholm and a full-fledged game concept was born. Our goal is a game that pays ample tribute to Minecraft in initial look and origin, but stakes out its own niche by adopting the NPC-helper and caretaker feel from such games as Dwarf Fortress and Dungeon Keeper, while striving for added depth and sophistication in the foundation systems akin to DF.","fork":false,"url":"https://api.github.com/repos/MovingBlocks/Terasology","forks_url":"https://api.github.com/repos/MovingBlocks/Terasology/forks","keys_url":"https://api.github.com/repos/MovingBlocks/Terasology/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MovingBlocks/Terasology/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MovingBlocks/Terasology/teams","hooks_url":"https://api.github.com/repos/MovingBlocks/Terasology/hooks","issue_events_url":"https://api.github.com/repos/MovingBlocks/Terasology/issues/events{/number}","events_url":"https://api.github.com/repos/MovingBlocks/Terasology/events","assignees_url":"https://api.github.com/repos/MovingBlocks/Terasology/assignees{/user}","branches_url":"https://api.github.com/repos/MovingBlocks/Terasology/branches{/branch}","tags_url":"https://api.github.com/repos/MovingBlocks/Terasology/tags","blobs_url":"https://api.github.com/repos/MovingBlocks/Terasology/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MovingBlocks/Terasology/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MovingBlocks/Terasology/git/refs{/sha}","trees_url":"https://api.github.com/repos/MovingBlocks/Terasology/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MovingBlocks/Terasology/statuses/{sha}","languages_url":"https://api.github.com/repos/MovingBlocks/Terasology/languages","stargazers_url":"https://api.github.com/repos/MovingBlocks/Terasology/stargazers","contributors_url":"https://api.github.com/repos/MovingBlocks/Terasology/contributors","subscribers_url":"https://api.github.com/repos/MovingBlocks/Terasology/subscribers","subscription_url":"https://api.github.com/repos/MovingBlocks/Terasology/subscription","commits_url":"https://api.github.com/repos/MovingBlocks/Terasology/commits{/sha}","git_commits_url":"https://api.github.com/repos/MovingBlocks/Terasology/git/commits{/sha}","comments_url":"https://api.github.com/repos/MovingBlocks/Terasology/comments{/number}","issue_comment_url":"https://api.github.com/repos/MovingBlocks/Terasology/issues/comments{/number}","contents_url":"https://api.github.com/repos/MovingBlocks/Terasology/contents/{+path}","compare_url":"https://api.github.com/repos/MovingBlocks/Terasology/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MovingBlocks/Terasology/merges","archive_url":"https://api.github.com/repos/MovingBlocks/Terasology/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MovingBlocks/Terasology/downloads","issues_url":"https://api.github.com/repos/MovingBlocks/Terasology/issues{/number}","pulls_url":"https://api.github.com/repos/MovingBlocks/Terasology/pulls{/number}","milestones_url":"https://api.github.com/repos/MovingBlocks/Terasology/milestones{/number}","notifications_url":"https://api.github.com/repos/MovingBlocks/Terasology/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MovingBlocks/Terasology/labels{/name}","releases_url":"https://api.github.com/repos/MovingBlocks/Terasology/releases{/id}","created_at":"2011-03-04T03:49:19Z","updated_at":"2015-04-16T21:12:48Z","pushed_at":"2015-04-17T01:50:22Z","git_url":"git://github.com/MovingBlocks/Terasology.git","ssh_url":"git@github.com:MovingBlocks/Terasology.git","clone_url":"https://github.com/MovingBlocks/Terasology.git","svn_url":"https://github.com/MovingBlocks/Terasology","homepage":"http://terasology.org/","size":280954,"stargazers_count":1013,"watchers_count":1013,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":410,"mirror_url":null,"open_issues_count":255,"forks":410,"open_issues":255,"watchers":1013,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/MovingBlocks/Terasology/pulls/1668"},"html":{"href":"https://github.com/MovingBlocks/Terasology/pull/1668"},"issue":{"href":"https://api.github.com/repos/MovingBlocks/Terasology/issues/1668"},"comments":{"href":"https://api.github.com/repos/MovingBlocks/Terasology/issues/1668/comments"},"review_comments":{"href":"https://api.github.com/repos/MovingBlocks/Terasology/pulls/1668/comments"},"review_comment":{"href":"https://api.github.com/repos/MovingBlocks/Terasology/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MovingBlocks/Terasology/pulls/1668/commits"},"statuses":{"href":"https://api.github.com/repos/MovingBlocks/Terasology/statuses/a29e3f2f36dea8943dc667dbece366ddd688daa7"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"Cervator","id":1063833,"avatar_url":"https://avatars.githubusercontent.com/u/1063833?v=3","gravatar_id":"","url":"https://api.github.com/users/Cervator","html_url":"https://github.com/Cervator","followers_url":"https://api.github.com/users/Cervator/followers","following_url":"https://api.github.com/users/Cervator/following{/other_user}","gists_url":"https://api.github.com/users/Cervator/gists{/gist_id}","starred_url":"https://api.github.com/users/Cervator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cervator/subscriptions","organizations_url":"https://api.github.com/users/Cervator/orgs","repos_url":"https://api.github.com/users/Cervator/repos","events_url":"https://api.github.com/users/Cervator/events{/privacy}","received_events_url":"https://api.github.com/users/Cervator/received_events","type":"User","site_admin":false},"comments":6,"review_comments":0,"commits":1,"additions":699,"deletions":332,"changed_files":4}}