GitHub PullRequestEvent at 2014-04-28 03:11:59
Repository: cocos2d-x
Actor: cocosQA
Payload: {"action":"opened","number":238,"pull_request":{"url":"https://api.github.com/repos/heliclei/cocos2d-x/pulls/238","id":15219703,"html_url":"https://github.com/heliclei/cocos2d-x/pull/238","diff_url":"https://github.com/heliclei/cocos2d-x/pull/238.diff","patch_url":"https://github.com/heliclei/cocos2d-x/pull/238.patch","issue_url":"https://api.github.com/repos/heliclei/cocos2d-x/issues/238","number":238,"state":"open","title":"Batching of Label rendering.","user":{"login":"cocosQA","id":6768144,"avatar_url":"https://avatars.githubusercontent.com/u/6768144?","gravatar_id":"39c5e01e6c80125981ddd1bc3aedc5c1","url":"https://api.github.com/users/cocosQA","html_url":"https://github.com/cocosQA","followers_url":"https://api.github.com/users/cocosQA/followers","following_url":"https://api.github.com/users/cocosQA/following{/other_user}","gists_url":"https://api.github.com/users/cocosQA/gists{/gist_id}","starred_url":"https://api.github.com/users/cocosQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocosQA/subscriptions","organizations_url":"https://api.github.com/users/cocosQA/orgs","repos_url":"https://api.github.com/users/cocosQA/repos","events_url":"https://api.github.com/users/cocosQA/events{/privacy}","received_events_url":"https://api.github.com/users/cocosQA/received_events","type":"User","site_admin":false},"body":"Label is now derived from Node. Every characters is a Sprite added to that node. Render will batch them like other Sprites.\r\n\r\nProblems left:\r\n- render problems BMFonts\r\n- set/getBlendMode not supported yet.\r\n- inefficient code as character sprites are added/removed every time. Add caching.\r\n- shadow and distant field not supported\r\n\r\nThe code is way more simple as there is no special rendering involved. The Label class does have too much legacy code and is very hard to read and maintain. Many code parts are only used when a Label is created in a special way.  Also the API for the user is hard too understand. This should be cleaned up. I would drop some legacy code. Is there any need for the LabelTTF class and the LabelBMFont class anymore. They are already using the Label class and lots of code is there to handle these special cases.\r\n\r\nThis is not the most efficient way to draw labels. Each character is a Sprite and the Renderer will have to copy the quad of each sprite to a single array before it will be drawn in one batch. One idea to fix this is to allow a Sprite to have more than one quad.\r\n\r\nThis pull request is for starting the discussion.\r\n","created_at":"2014-04-28T03:11:59Z","updated_at":"2014-04-28T03:11:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/heliclei/cocos2d-x/pulls/238/commits","review_comments_url":"https://api.github.com/repos/heliclei/cocos2d-x/pulls/238/comments","review_comment_url":"https://api.github.com/repos/heliclei/cocos2d-x/pulls/comments/{number}","comments_url":"https://api.github.com/repos/heliclei/cocos2d-x/issues/238/comments","statuses_url":"https://api.github.com/repos/heliclei/cocos2d-x/statuses/790c26411108011ab0fd8f96e827c7672f12f17d","head":{"label":"thoechsmann:features/LabelBatchRendering","ref":"features/LabelBatchRendering","sha":"790c26411108011ab0fd8f96e827c7672f12f17d","user":{"login":"thoechsmann","id":473859,"avatar_url":"https://avatars.githubusercontent.com/u/473859?","gravatar_id":"3020885b10ec5c9f5ac51ac8b7c096a9","url":"https://api.github.com/users/thoechsmann","html_url":"https://github.com/thoechsmann","followers_url":"https://api.github.com/users/thoechsmann/followers","following_url":"https://api.github.com/users/thoechsmann/following{/other_user}","gists_url":"https://api.github.com/users/thoechsmann/gists{/gist_id}","starred_url":"https://api.github.com/users/thoechsmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoechsmann/subscriptions","organizations_url":"https://api.github.com/users/thoechsmann/orgs","repos_url":"https://api.github.com/users/thoechsmann/repos","events_url":"https://api.github.com/users/thoechsmann/events{/privacy}","received_events_url":"https://api.github.com/users/thoechsmann/received_events","type":"User","site_admin":false},"repo":{"id":18106832,"name":"cocos2d-x","full_name":"thoechsmann/cocos2d-x","owner":{"login":"thoechsmann","id":473859,"avatar_url":"https://avatars.githubusercontent.com/u/473859?","gravatar_id":"3020885b10ec5c9f5ac51ac8b7c096a9","url":"https://api.github.com/users/thoechsmann","html_url":"https://github.com/thoechsmann","followers_url":"https://api.github.com/users/thoechsmann/followers","following_url":"https://api.github.com/users/thoechsmann/following{/other_user}","gists_url":"https://api.github.com/users/thoechsmann/gists{/gist_id}","starred_url":"https://api.github.com/users/thoechsmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoechsmann/subscriptions","organizations_url":"https://api.github.com/users/thoechsmann/orgs","repos_url":"https://api.github.com/users/thoechsmann/repos","events_url":"https://api.github.com/users/thoechsmann/events{/privacy}","received_events_url":"https://api.github.com/users/thoechsmann/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thoechsmann/cocos2d-x","description":"cocos2d-x for C++","fork":true,"url":"https://api.github.com/repos/thoechsmann/cocos2d-x","forks_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/forks","keys_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/events","assignees_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/issues/comments/{number}","contents_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/merges","archive_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/thoechsmann/cocos2d-x/releases{/id}","created_at":"2014-03-25T16:05:46Z","updated_at":"2014-04-28T03:11:59Z","pushed_at":"2014-04-01T14:38:18Z","git_url":"git://github.com/thoechsmann/cocos2d-x.git","ssh_url":"git@github.com:thoechsmann/cocos2d-x.git","clone_url":"https://github.com/thoechsmann/cocos2d-x.git","svn_url":"https://github.com/thoechsmann/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":718971,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"heliclei:v5","ref":"v5","sha":"57a76fbfb0bb0b505a01685d02e08bc0bdd1c58d","user":{"login":"heliclei","id":3006761,"avatar_url":"https://avatars.githubusercontent.com/u/3006761?","gravatar_id":"0321a891e9aea325bc943cf1687872f4","url":"https://api.github.com/users/heliclei","html_url":"https://github.com/heliclei","followers_url":"https://api.github.com/users/heliclei/followers","following_url":"https://api.github.com/users/heliclei/following{/other_user}","gists_url":"https://api.github.com/users/heliclei/gists{/gist_id}","starred_url":"https://api.github.com/users/heliclei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heliclei/subscriptions","organizations_url":"https://api.github.com/users/heliclei/orgs","repos_url":"https://api.github.com/users/heliclei/repos","events_url":"https://api.github.com/users/heliclei/events{/privacy}","received_events_url":"https://api.github.com/users/heliclei/received_events","type":"User","site_admin":false},"repo":{"id":15527523,"name":"cocos2d-x","full_name":"heliclei/cocos2d-x","owner":{"login":"heliclei","id":3006761,"avatar_url":"https://avatars.githubusercontent.com/u/3006761?","gravatar_id":"0321a891e9aea325bc943cf1687872f4","url":"https://api.github.com/users/heliclei","html_url":"https://github.com/heliclei","followers_url":"https://api.github.com/users/heliclei/followers","following_url":"https://api.github.com/users/heliclei/following{/other_user}","gists_url":"https://api.github.com/users/heliclei/gists{/gist_id}","starred_url":"https://api.github.com/users/heliclei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heliclei/subscriptions","organizations_url":"https://api.github.com/users/heliclei/orgs","repos_url":"https://api.github.com/users/heliclei/repos","events_url":"https://api.github.com/users/heliclei/events{/privacy}","received_events_url":"https://api.github.com/users/heliclei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/heliclei/cocos2d-x","description":"cocos2d for iOS, Android, Win32 and OS X. Built using C++","fork":true,"url":"https://api.github.com/repos/heliclei/cocos2d-x","forks_url":"https://api.github.com/repos/heliclei/cocos2d-x/forks","keys_url":"https://api.github.com/repos/heliclei/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/heliclei/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/heliclei/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/heliclei/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/heliclei/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/heliclei/cocos2d-x/events","assignees_url":"https://api.github.com/repos/heliclei/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/heliclei/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/heliclei/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/heliclei/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/heliclei/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/heliclei/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/heliclei/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/heliclei/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/heliclei/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/heliclei/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/heliclei/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/heliclei/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/heliclei/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/heliclei/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/heliclei/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/heliclei/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/heliclei/cocos2d-x/issues/comments/{number}","contents_url":"https://api.github.com/repos/heliclei/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/heliclei/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/heliclei/cocos2d-x/merges","archive_url":"https://api.github.com/repos/heliclei/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/heliclei/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/heliclei/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/heliclei/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/heliclei/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/heliclei/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/heliclei/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/heliclei/cocos2d-x/releases{/id}","created_at":"2013-12-30T12:40:59Z","updated_at":"2014-04-28T03:11:57Z","pushed_at":"2014-04-28T03:10:22Z","git_url":"git://github.com/heliclei/cocos2d-x.git","ssh_url":"git@github.com:heliclei/cocos2d-x.git","clone_url":"https://github.com/heliclei/cocos2d-x.git","svn_url":"https://github.com/heliclei/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":792609,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":131,"forks":0,"open_issues":131,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/heliclei/cocos2d-x/pulls/238"},"html":{"href":"https://github.com/heliclei/cocos2d-x/pull/238"},"issue":{"href":"https://api.github.com/repos/heliclei/cocos2d-x/issues/238"},"comments":{"href":"https://api.github.com/repos/heliclei/cocos2d-x/issues/238/comments"},"review_comments":{"href":"https://api.github.com/repos/heliclei/cocos2d-x/pulls/238/comments"},"review_comment":{"href":"https://api.github.com/repos/heliclei/cocos2d-x/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/heliclei/cocos2d-x/pulls/238/commits"},"statuses":{"href":"https://api.github.com/repos/heliclei/cocos2d-x/statuses/790c26411108011ab0fd8f96e827c7672f12f17d"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":8449,"additions":0,"deletions":0,"changed_files":0}}