{"action":"created","issue":{"url":"https://api.github.com/repos/GoranM/bdx/issues/437","labels_url":"https://api.github.com/repos/GoranM/bdx/issues/437/labels{/name}","comments_url":"https://api.github.com/repos/GoranM/bdx/issues/437/comments","events_url":"https://api.github.com/repos/GoranM/bdx/issues/437/events","html_url":"https://github.com/GoranM/bdx/issues/437","id":106160030,"number":437,"title":"Suggestion: Join objects tool to reduce GL draw calls","user":{"login":"rafcolson","id":10002909,"avatar_url":"https://avatars.githubusercontent.com/u/10002909?v=3","gravatar_id":"","url":"https://api.github.com/users/rafcolson","html_url":"https://github.com/rafcolson","followers_url":"https://api.github.com/users/rafcolson/followers","following_url":"https://api.github.com/users/rafcolson/following{/other_user}","gists_url":"https://api.github.com/users/rafcolson/gists{/gist_id}","starred_url":"https://api.github.com/users/rafcolson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafcolson/subscriptions","organizations_url":"https://api.github.com/users/rafcolson/orgs","repos_url":"https://api.github.com/users/rafcolson/repos","events_url":"https://api.github.com/users/rafcolson/events{/privacy}","received_events_url":"https://api.github.com/users/rafcolson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":29,"created_at":"2015-09-12T13:29:33Z","updated_at":"2015-10-17T18:34:59Z","closed_at":null,"body":"We were discussing this before. I didn't seem like a good idea to everyone, but in this issue I'll try to show the benefits, more specifically on Android machines.\r\n\r\nThe initial idea is to join objects (that share the same model) into new objects. Those new objects would then replace the actual objects visually. The actual objects are now invisible. This for the sole purpose to reduce GL draw calls.\r\n\r\nThis would imply that the actual objects shouldn't be moved, rotated, scaled, ... as long as they are \"joined\".\r\n\r\nI would like it to be part of ```Scene.java```, so the function could work as following:\r\n```java\r\nLinkedListNamed<GameObject> joinedObjects = g.scene.addJoined(LinkedListNamed<GameObject>, boolean hideOriginals)\r\n```\r\nBy default ```hideOriginals``` will be ```true```.\r\n\r\nThat's it for now. When I'm finished, I'll let you know.\r\n\r\nAny ideas, suggestions, remarks are welcome.\r\n\r\nEdit: Eventually this could evolve into a greater solution, by updating ```joinedObjects``` every time one of the actual objects is transformed. However, I think that would be rather expensive, but I'll definitely check that out."},"comment":{"url":"https://api.github.com/repos/GoranM/bdx/issues/comments/148940685","html_url":"https://github.com/GoranM/bdx/issues/437#issuecomment-148940685","issue_url":"https://api.github.com/repos/GoranM/bdx/issues/437","id":148940685,"user":{"login":"rafcolson","id":10002909,"avatar_url":"https://avatars.githubusercontent.com/u/10002909?v=3","gravatar_id":"","url":"https://api.github.com/users/rafcolson","html_url":"https://github.com/rafcolson","followers_url":"https://api.github.com/users/rafcolson/followers","following_url":"https://api.github.com/users/rafcolson/following{/other_user}","gists_url":"https://api.github.com/users/rafcolson/gists{/gist_id}","starred_url":"https://api.github.com/users/rafcolson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafcolson/subscriptions","organizations_url":"https://api.github.com/users/rafcolson/orgs","repos_url":"https://api.github.com/users/rafcolson/repos","events_url":"https://api.github.com/users/rafcolson/events{/privacy}","received_events_url":"https://api.github.com/users/rafcolson/received_events","type":"User","site_admin":false},"created_at":"2015-10-17T18:34:59Z","updated_at":"2015-10-17T18:34:59Z","body":"Okay, I'll make the proposed changes."}}