{"action":"created","comment":{"url":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments/35033318","id":35033318,"diff_hunk":"@@ -12,28 +12,16 @@ void SpriteLabel::pushTransform(VboMesh& _mesh) {\n     if (m_dirty) {\n         TypedMesh<BufferVert>& mesh = static_cast<TypedMesh<BufferVert>&>(_mesh);\n \n-        // used to write all attributes memory at once, good for caching\n-        struct VertexAttributes {\n-            glm::vec2 screenPos;\n-            float alpha;\n-            float rot;\n-        };\n-\n-        GLintptr stride = std::min<GLintptr>(m_attribOffsets.m_position, std::min<GLintptr>(m_attribOffsets.m_alpha, m_attribOffsets.m_rotation));\n-\n-        VertexAttributes newAttributes {\n-            m_transform.m_screenPosition + m_offset,\n-            m_transform.m_alpha,\n-            m_transform.m_rotation,\n-        };\n+        BufferVert::State state(m_transform.state);\n+        state.screenPos += m_offset;","path":"core/src/labels/spriteLabel.cpp","position":31,"original_position":31,"commit_id":"00c02c3f50dbbae1a3ba7e85ac11bc3f27fadafd","original_commit_id":"00c02c3f50dbbae1a3ba7e85ac11bc3f27fadafd","user":{"login":"hjanetzek","id":1747,"avatar_url":"https://avatars.githubusercontent.com/u/1747?v=3","gravatar_id":"","url":"https://api.github.com/users/hjanetzek","html_url":"https://github.com/hjanetzek","followers_url":"https://api.github.com/users/hjanetzek/followers","following_url":"https://api.github.com/users/hjanetzek/following{/other_user}","gists_url":"https://api.github.com/users/hjanetzek/gists{/gist_id}","starred_url":"https://api.github.com/users/hjanetzek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hjanetzek/subscriptions","organizations_url":"https://api.github.com/users/hjanetzek/orgs","repos_url":"https://api.github.com/users/hjanetzek/repos","events_url":"https://api.github.com/users/hjanetzek/events{/privacy}","received_events_url":"https://api.github.com/users/hjanetzek/received_events","type":"User","site_admin":false},"body":"Either that, offset could also be used for TextLabels or override setScreenPosition in SpriteLabel. Any preference? ","created_at":"2015-07-20T19:26:52Z","updated_at":"2015-07-20T19:26:52Z","html_url":"https://github.com/tangrams/tangram-es/pull/202#discussion_r35033318","pull_request_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/202","_links":{"self":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments/35033318"},"html":{"href":"https://github.com/tangrams/tangram-es/pull/202#discussion_r35033318"},"pull_request":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/202"}}},"pull_request":{"url":"https://api.github.com/repos/tangrams/tangram-es/pulls/202","id":40278000,"html_url":"https://github.com/tangrams/tangram-es/pull/202","diff_url":"https://github.com/tangrams/tangram-es/pull/202.diff","patch_url":"https://github.com/tangrams/tangram-es/pull/202.patch","issue_url":"https://api.github.com/repos/tangrams/tangram-es/issues/202","number":202,"state":"open","locked":false,"title":"Sprite and label tweaks","user":{"login":"hjanetzek","id":1747,"avatar_url":"https://avatars.githubusercontent.com/u/1747?v=3","gravatar_id":"","url":"https://api.github.com/users/hjanetzek","html_url":"https://github.com/hjanetzek","followers_url":"https://api.github.com/users/hjanetzek/followers","following_url":"https://api.github.com/users/hjanetzek/following{/other_user}","gists_url":"https://api.github.com/users/hjanetzek/gists{/gist_id}","starred_url":"https://api.github.com/users/hjanetzek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hjanetzek/subscriptions","organizations_url":"https://api.github.com/users/hjanetzek/orgs","repos_url":"https://api.github.com/users/hjanetzek/repos","events_url":"https://api.github.com/users/hjanetzek/events{/privacy}","received_events_url":"https://api.github.com/users/hjanetzek/received_events","type":"User","site_admin":false},"body":"@karimnaaji, could you comment on this?\r\n\r\nI've change the use of GLvoid* and GLintptr to size_t as these are treated as offsets into the vbo when a vbo is bound during the call to glVertexAttribPointer [https://www.khronos.org/opengles/sdk/docs/man/xhtml/glVertexAttribPointer.xml]. And I find this conceptually more clear than to provide a pointer type just because the c api has no overloads :)\r\n\r\nEdit: I'm also ok with GLintptr instead of GLvoid* for the getAttribOffset. Though I would prefer to use the types provided by c++ than to pull in GL headers into everything just for some typedefs.\r\nGLintptr is http://en.cppreference.com/w/cpp/types/ptrdiff_t\r\n","created_at":"2015-07-17T22:40:11Z","updated_at":"2015-07-20T19:26:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a83498e920d629ea912ec8eff09bd4a9ae23a8d8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/202/commits","review_comments_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/202/comments","review_comment_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/issues/202/comments","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/00c02c3f50dbbae1a3ba7e85ac11bc3f27fadafd","head":{"label":"tangrams:sprite-and-label-tweaks","ref":"sprite-and-label-tweaks","sha":"00c02c3f50dbbae1a3ba7e85ac11bc3f27fadafd","user":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"repo":{"id":23391501,"name":"tangram-es","full_name":"tangrams/tangram-es","owner":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tangrams/tangram-es","description":"2D and 3D map renderer using OpenGL ES","fork":false,"url":"https://api.github.com/repos/tangrams/tangram-es","forks_url":"https://api.github.com/repos/tangrams/tangram-es/forks","keys_url":"https://api.github.com/repos/tangrams/tangram-es/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangrams/tangram-es/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangrams/tangram-es/teams","hooks_url":"https://api.github.com/repos/tangrams/tangram-es/hooks","issue_events_url":"https://api.github.com/repos/tangrams/tangram-es/issues/events{/number}","events_url":"https://api.github.com/repos/tangrams/tangram-es/events","assignees_url":"https://api.github.com/repos/tangrams/tangram-es/assignees{/user}","branches_url":"https://api.github.com/repos/tangrams/tangram-es/branches{/branch}","tags_url":"https://api.github.com/repos/tangrams/tangram-es/tags","blobs_url":"https://api.github.com/repos/tangrams/tangram-es/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangrams/tangram-es/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangrams/tangram-es/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangrams/tangram-es/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/{sha}","languages_url":"https://api.github.com/repos/tangrams/tangram-es/languages","stargazers_url":"https://api.github.com/repos/tangrams/tangram-es/stargazers","contributors_url":"https://api.github.com/repos/tangrams/tangram-es/contributors","subscribers_url":"https://api.github.com/repos/tangrams/tangram-es/subscribers","subscription_url":"https://api.github.com/repos/tangrams/tangram-es/subscription","commits_url":"https://api.github.com/repos/tangrams/tangram-es/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangrams/tangram-es/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangrams/tangram-es/issues/comments{/number}","contents_url":"https://api.github.com/repos/tangrams/tangram-es/contents/{+path}","compare_url":"https://api.github.com/repos/tangrams/tangram-es/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangrams/tangram-es/merges","archive_url":"https://api.github.com/repos/tangrams/tangram-es/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangrams/tangram-es/downloads","issues_url":"https://api.github.com/repos/tangrams/tangram-es/issues{/number}","pulls_url":"https://api.github.com/repos/tangrams/tangram-es/pulls{/number}","milestones_url":"https://api.github.com/repos/tangrams/tangram-es/milestones{/number}","notifications_url":"https://api.github.com/repos/tangrams/tangram-es/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangrams/tangram-es/labels{/name}","releases_url":"https://api.github.com/repos/tangrams/tangram-es/releases{/id}","created_at":"2014-08-27T13:56:56Z","updated_at":"2015-06-30T09:58:58Z","pushed_at":"2015-07-20T18:12:01Z","git_url":"git://github.com/tangrams/tangram-es.git","ssh_url":"git@github.com:tangrams/tangram-es.git","clone_url":"https://github.com/tangrams/tangram-es.git","svn_url":"https://github.com/tangrams/tangram-es","homepage":"","size":28150,"stargazers_count":59,"watchers_count":59,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":6,"forks":13,"open_issues":6,"watchers":59,"default_branch":"master"}},"base":{"label":"tangrams:default-build-methods","ref":"default-build-methods","sha":"0bd0a37bf3407a63fc022fa7449a2fcdf358ca98","user":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"repo":{"id":23391501,"name":"tangram-es","full_name":"tangrams/tangram-es","owner":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tangrams/tangram-es","description":"2D and 3D map renderer using OpenGL ES","fork":false,"url":"https://api.github.com/repos/tangrams/tangram-es","forks_url":"https://api.github.com/repos/tangrams/tangram-es/forks","keys_url":"https://api.github.com/repos/tangrams/tangram-es/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangrams/tangram-es/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangrams/tangram-es/teams","hooks_url":"https://api.github.com/repos/tangrams/tangram-es/hooks","issue_events_url":"https://api.github.com/repos/tangrams/tangram-es/issues/events{/number}","events_url":"https://api.github.com/repos/tangrams/tangram-es/events","assignees_url":"https://api.github.com/repos/tangrams/tangram-es/assignees{/user}","branches_url":"https://api.github.com/repos/tangrams/tangram-es/branches{/branch}","tags_url":"https://api.github.com/repos/tangrams/tangram-es/tags","blobs_url":"https://api.github.com/repos/tangrams/tangram-es/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangrams/tangram-es/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangrams/tangram-es/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangrams/tangram-es/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/{sha}","languages_url":"https://api.github.com/repos/tangrams/tangram-es/languages","stargazers_url":"https://api.github.com/repos/tangrams/tangram-es/stargazers","contributors_url":"https://api.github.com/repos/tangrams/tangram-es/contributors","subscribers_url":"https://api.github.com/repos/tangrams/tangram-es/subscribers","subscription_url":"https://api.github.com/repos/tangrams/tangram-es/subscription","commits_url":"https://api.github.com/repos/tangrams/tangram-es/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangrams/tangram-es/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangrams/tangram-es/issues/comments{/number}","contents_url":"https://api.github.com/repos/tangrams/tangram-es/contents/{+path}","compare_url":"https://api.github.com/repos/tangrams/tangram-es/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangrams/tangram-es/merges","archive_url":"https://api.github.com/repos/tangrams/tangram-es/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangrams/tangram-es/downloads","issues_url":"https://api.github.com/repos/tangrams/tangram-es/issues{/number}","pulls_url":"https://api.github.com/repos/tangrams/tangram-es/pulls{/number}","milestones_url":"https://api.github.com/repos/tangrams/tangram-es/milestones{/number}","notifications_url":"https://api.github.com/repos/tangrams/tangram-es/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangrams/tangram-es/labels{/name}","releases_url":"https://api.github.com/repos/tangrams/tangram-es/releases{/id}","created_at":"2014-08-27T13:56:56Z","updated_at":"2015-06-30T09:58:58Z","pushed_at":"2015-07-20T18:12:01Z","git_url":"git://github.com/tangrams/tangram-es.git","ssh_url":"git@github.com:tangrams/tangram-es.git","clone_url":"https://github.com/tangrams/tangram-es.git","svn_url":"https://github.com/tangrams/tangram-es","homepage":"","size":28150,"stargazers_count":59,"watchers_count":59,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":6,"forks":13,"open_issues":6,"watchers":59,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/202"},"html":{"href":"https://github.com/tangrams/tangram-es/pull/202"},"issue":{"href":"https://api.github.com/repos/tangrams/tangram-es/issues/202"},"comments":{"href":"https://api.github.com/repos/tangrams/tangram-es/issues/202/comments"},"review_comments":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/202/comments"},"review_comment":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/202/commits"},"statuses":{"href":"https://api.github.com/repos/tangrams/tangram-es/statuses/00c02c3f50dbbae1a3ba7e85ac11bc3f27fadafd"}}}}