{"action":"created","issue":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/5605","labels_url":"https://api.github.com/repos/mrdoob/three.js/issues/5605/labels{/name}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/5605/comments","events_url":"https://api.github.com/repos/mrdoob/three.js/issues/5605/events","html_url":"https://github.com/mrdoob/three.js/issues/5605","id":48341236,"number":5605,"title":"BufferGeometry.offsets vs BufferGeometry.drawcalls","user":{"login":"WestLangley","id":1000017,"avatar_url":"https://avatars.githubusercontent.com/u/1000017?v=3","gravatar_id":"","url":"https://api.github.com/users/WestLangley","html_url":"https://github.com/WestLangley","followers_url":"https://api.github.com/users/WestLangley/followers","following_url":"https://api.github.com/users/WestLangley/following{/other_user}","gists_url":"https://api.github.com/users/WestLangley/gists{/gist_id}","starred_url":"https://api.github.com/users/WestLangley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WestLangley/subscriptions","organizations_url":"https://api.github.com/users/WestLangley/orgs","repos_url":"https://api.github.com/users/WestLangley/repos","events_url":"https://api.github.com/users/WestLangley/events{/privacy}","received_events_url":"https://api.github.com/users/WestLangley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mrdoob/three.js/labels/Bug","name":"Bug","color":"ffcfcf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":27,"created_at":"2014-11-11T02:36:27Z","updated_at":"2015-08-17T18:18:24Z","closed_at":null,"body":"`BufferGeometry` contains the following code for backward compatibility:\r\n\r\n\tthis.drawcalls = [];\r\n\tthis.offsets = this.drawcalls; // backwards compatibility\r\n\r\nThing is, `BufferGeometry.offsets` gets overwritten in `BufferGeometry.computeOffsets()`:\r\n\r\n\tthis.offsets = offsets;\r\n\r\n(`BufferGeometry.computeOffsets()` is called by `CTMLoader`.)\r\n\r\nThis bug has been hidden, because most of the code accesses `.offsets`. `WireframeHelper`, on the other hand, accesses `.drawcalls`.\r\n\r\n---\r\n\r\nOn a related note, is the 65k addressable limit, which `BufferGeometry.computeOffsets()` addresses, still an issue?\r\n"},"comment":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/131914913","html_url":"https://github.com/mrdoob/three.js/issues/5605#issuecomment-131914913","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/5605","id":131914913,"user":{"login":"mrdoob","id":97088,"avatar_url":"https://avatars.githubusercontent.com/u/97088?v=3","gravatar_id":"","url":"https://api.github.com/users/mrdoob","html_url":"https://github.com/mrdoob","followers_url":"https://api.github.com/users/mrdoob/followers","following_url":"https://api.github.com/users/mrdoob/following{/other_user}","gists_url":"https://api.github.com/users/mrdoob/gists{/gist_id}","starred_url":"https://api.github.com/users/mrdoob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrdoob/subscriptions","organizations_url":"https://api.github.com/users/mrdoob/orgs","repos_url":"https://api.github.com/users/mrdoob/repos","events_url":"https://api.github.com/users/mrdoob/events{/privacy}","received_events_url":"https://api.github.com/users/mrdoob/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T18:18:24Z","updated_at":"2015-08-17T18:18:24Z","body":"> You can smush a bunch geometries together, including their indexes without renumbering and use the indexOffset to handle the it; but that would result in multiple draws. So, it would make much more sense to renumber the indexes and then it would be a single draw.\r\n\r\nIt's always multiple draw calls. I guess the main benefit is that we don't have to re-upload the position/normal/color buffer. However, I don't think the code ever did that. I think we have to do more refactoring around all this for it to actually make sense."}}