{"action":"created","comment":{"url":"https://api.github.com/repos/super626/cocos2d-x/pulls/comments/27561308","id":27561308,"diff_hunk":"@@ -78,7 +77,14 @@ Terrain * Terrain::create(TerrainData &parameter, CrackFixedType fixedType)\n         textImage->initWithImageFile(parameter.detailMaps[0].detailMapSrc);\n         auto texture = new (std::nothrow)Texture2D();\n         texture->initWithImage(textImage);\n+        texture->generateMipmap();\n         terrain->_detailMapTextures[0] = texture;\n+        delete textImage;\n+        glBindTexture(GL_TEXTURE_2D,texture->getName());\n+        glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);\n+        glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);\n+        glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR);\n+        glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR_MIPMAP_LINEAR);","path":"cocos/3d/CCTerrain.cpp","position":31,"original_position":31,"commit_id":"6cd1077cb08020e7cfe00f82211ad0bd2e9ffd90","original_commit_id":"6cd1077cb08020e7cfe00f82211ad0bd2e9ffd90","user":{"login":"masterhou","id":567426,"avatar_url":"https://avatars.githubusercontent.com/u/567426?v=3","gravatar_id":"","url":"https://api.github.com/users/masterhou","html_url":"https://github.com/masterhou","followers_url":"https://api.github.com/users/masterhou/followers","following_url":"https://api.github.com/users/masterhou/following{/other_user}","gists_url":"https://api.github.com/users/masterhou/gists{/gist_id}","starred_url":"https://api.github.com/users/masterhou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masterhou/subscriptions","organizations_url":"https://api.github.com/users/masterhou/orgs","repos_url":"https://api.github.com/users/masterhou/repos","events_url":"https://api.github.com/users/masterhou/events{/privacy}","received_events_url":"https://api.github.com/users/masterhou/received_events","type":"User","site_admin":false},"body":"please use Texture2D setTexParameters","created_at":"2015-04-01T11:27:26Z","updated_at":"2015-04-01T11:27:26Z","html_url":"https://github.com/super626/cocos2d-x/pull/281#discussion_r27561308","pull_request_url":"https://api.github.com/repos/super626/cocos2d-x/pulls/281","_links":{"self":{"href":"https://api.github.com/repos/super626/cocos2d-x/pulls/comments/27561308"},"html":{"href":"https://github.com/super626/cocos2d-x/pull/281#discussion_r27561308"},"pull_request":{"href":"https://api.github.com/repos/super626/cocos2d-x/pulls/281"}}},"pull_request":{"url":"https://api.github.com/repos/super626/cocos2d-x/pulls/281","id":32406301,"html_url":"https://github.com/super626/cocos2d-x/pull/281","diff_url":"https://github.com/super626/cocos2d-x/pull/281.diff","patch_url":"https://github.com/super626/cocos2d-x/pull/281.patch","issue_url":"https://api.github.com/repos/super626/cocos2d-x/issues/281","number":281,"state":"open","locked":false,"title":"update terrain","user":{"login":"tangziwen","id":3488056,"avatar_url":"https://avatars.githubusercontent.com/u/3488056?v=3","gravatar_id":"","url":"https://api.github.com/users/tangziwen","html_url":"https://github.com/tangziwen","followers_url":"https://api.github.com/users/tangziwen/followers","following_url":"https://api.github.com/users/tangziwen/following{/other_user}","gists_url":"https://api.github.com/users/tangziwen/gists{/gist_id}","starred_url":"https://api.github.com/users/tangziwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangziwen/subscriptions","organizations_url":"https://api.github.com/users/tangziwen/orgs","repos_url":"https://api.github.com/users/tangziwen/repos","events_url":"https://api.github.com/users/tangziwen/events{/privacy}","received_events_url":"https://api.github.com/users/tangziwen/received_events","type":"User","site_admin":false},"body":"(1) fix memory leak\r\n(2) cache uniform location, cache terrain's ModelMatrix, precalculate AABB\r\n(3) fix Skirt indices bug, add interface to set the skirt height\r\n(4) detailMaps use the mipmap","created_at":"2015-04-01T10:27:00Z","updated_at":"2015-04-01T11:27:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"223ff7503fc495f16474bd24b3c014f5143d16f9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/super626/cocos2d-x/pulls/281/commits","review_comments_url":"https://api.github.com/repos/super626/cocos2d-x/pulls/281/comments","review_comment_url":"https://api.github.com/repos/super626/cocos2d-x/pulls/comments{/number}","comments_url":"https://api.github.com/repos/super626/cocos2d-x/issues/281/comments","statuses_url":"https://api.github.com/repos/super626/cocos2d-x/statuses/6cd1077cb08020e7cfe00f82211ad0bd2e9ffd90","head":{"label":"tangziwen:terrain","ref":"terrain","sha":"6cd1077cb08020e7cfe00f82211ad0bd2e9ffd90","user":{"login":"tangziwen","id":3488056,"avatar_url":"https://avatars.githubusercontent.com/u/3488056?v=3","gravatar_id":"","url":"https://api.github.com/users/tangziwen","html_url":"https://github.com/tangziwen","followers_url":"https://api.github.com/users/tangziwen/followers","following_url":"https://api.github.com/users/tangziwen/following{/other_user}","gists_url":"https://api.github.com/users/tangziwen/gists{/gist_id}","starred_url":"https://api.github.com/users/tangziwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangziwen/subscriptions","organizations_url":"https://api.github.com/users/tangziwen/orgs","repos_url":"https://api.github.com/users/tangziwen/repos","events_url":"https://api.github.com/users/tangziwen/events{/privacy}","received_events_url":"https://api.github.com/users/tangziwen/received_events","type":"User","site_admin":false},"repo":{"id":24621473,"name":"cocos2d-x","full_name":"tangziwen/cocos2d-x","owner":{"login":"tangziwen","id":3488056,"avatar_url":"https://avatars.githubusercontent.com/u/3488056?v=3","gravatar_id":"","url":"https://api.github.com/users/tangziwen","html_url":"https://github.com/tangziwen","followers_url":"https://api.github.com/users/tangziwen/followers","following_url":"https://api.github.com/users/tangziwen/following{/other_user}","gists_url":"https://api.github.com/users/tangziwen/gists{/gist_id}","starred_url":"https://api.github.com/users/tangziwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangziwen/subscriptions","organizations_url":"https://api.github.com/users/tangziwen/orgs","repos_url":"https://api.github.com/users/tangziwen/repos","events_url":"https://api.github.com/users/tangziwen/events{/privacy}","received_events_url":"https://api.github.com/users/tangziwen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tangziwen/cocos2d-x","description":"cocos2d-x for C++","fork":true,"url":"https://api.github.com/repos/tangziwen/cocos2d-x","forks_url":"https://api.github.com/repos/tangziwen/cocos2d-x/forks","keys_url":"https://api.github.com/repos/tangziwen/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangziwen/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangziwen/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/tangziwen/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/tangziwen/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/tangziwen/cocos2d-x/events","assignees_url":"https://api.github.com/repos/tangziwen/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/tangziwen/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/tangziwen/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/tangziwen/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangziwen/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangziwen/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangziwen/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangziwen/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/tangziwen/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/tangziwen/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/tangziwen/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/tangziwen/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/tangziwen/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/tangziwen/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangziwen/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangziwen/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangziwen/cocos2d-x/issues/comments{/number}","contents_url":"https://api.github.com/repos/tangziwen/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/tangziwen/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangziwen/cocos2d-x/merges","archive_url":"https://api.github.com/repos/tangziwen/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangziwen/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/tangziwen/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/tangziwen/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/tangziwen/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/tangziwen/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangziwen/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/tangziwen/cocos2d-x/releases{/id}","created_at":"2014-09-30T02:34:41Z","updated_at":"2014-10-29T14:04:00Z","pushed_at":"2015-04-01T10:24:23Z","git_url":"git://github.com/tangziwen/cocos2d-x.git","ssh_url":"git@github.com:tangziwen/cocos2d-x.git","clone_url":"https://github.com/tangziwen/cocos2d-x.git","svn_url":"https://github.com/tangziwen/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":871640,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"v3_merge"}},"base":{"label":"super626:terrain","ref":"terrain","sha":"45987b6a60eb47230621d068760057d5118c4f27","user":{"login":"super626","id":4159090,"avatar_url":"https://avatars.githubusercontent.com/u/4159090?v=3","gravatar_id":"","url":"https://api.github.com/users/super626","html_url":"https://github.com/super626","followers_url":"https://api.github.com/users/super626/followers","following_url":"https://api.github.com/users/super626/following{/other_user}","gists_url":"https://api.github.com/users/super626/gists{/gist_id}","starred_url":"https://api.github.com/users/super626/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/super626/subscriptions","organizations_url":"https://api.github.com/users/super626/orgs","repos_url":"https://api.github.com/users/super626/repos","events_url":"https://api.github.com/users/super626/events{/privacy}","received_events_url":"https://api.github.com/users/super626/received_events","type":"User","site_admin":false},"repo":{"id":18664943,"name":"cocos2d-x","full_name":"super626/cocos2d-x","owner":{"login":"super626","id":4159090,"avatar_url":"https://avatars.githubusercontent.com/u/4159090?v=3","gravatar_id":"","url":"https://api.github.com/users/super626","html_url":"https://github.com/super626","followers_url":"https://api.github.com/users/super626/followers","following_url":"https://api.github.com/users/super626/following{/other_user}","gists_url":"https://api.github.com/users/super626/gists{/gist_id}","starred_url":"https://api.github.com/users/super626/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/super626/subscriptions","organizations_url":"https://api.github.com/users/super626/orgs","repos_url":"https://api.github.com/users/super626/repos","events_url":"https://api.github.com/users/super626/events{/privacy}","received_events_url":"https://api.github.com/users/super626/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/super626/cocos2d-x","description":"cocos2d-x for C++","fork":true,"url":"https://api.github.com/repos/super626/cocos2d-x","forks_url":"https://api.github.com/repos/super626/cocos2d-x/forks","keys_url":"https://api.github.com/repos/super626/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/super626/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/super626/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/super626/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/super626/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/super626/cocos2d-x/events","assignees_url":"https://api.github.com/repos/super626/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/super626/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/super626/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/super626/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/super626/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/super626/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/super626/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/super626/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/super626/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/super626/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/super626/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/super626/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/super626/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/super626/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/super626/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/super626/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/super626/cocos2d-x/issues/comments{/number}","contents_url":"https://api.github.com/repos/super626/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/super626/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/super626/cocos2d-x/merges","archive_url":"https://api.github.com/repos/super626/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/super626/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/super626/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/super626/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/super626/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/super626/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/super626/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/super626/cocos2d-x/releases{/id}","created_at":"2014-04-11T06:39:38Z","updated_at":"2015-04-01T08:41:58Z","pushed_at":"2015-04-01T10:27:00Z","git_url":"git://github.com/super626/cocos2d-x.git","ssh_url":"git@github.com:super626/cocos2d-x.git","clone_url":"https://github.com/super626/cocos2d-x.git","svn_url":"https://github.com/super626/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":935474,"stargazers_count":6,"watchers_count":6,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":4,"forks":10,"open_issues":4,"watchers":6,"default_branch":"v3"}},"_links":{"self":{"href":"https://api.github.com/repos/super626/cocos2d-x/pulls/281"},"html":{"href":"https://github.com/super626/cocos2d-x/pull/281"},"issue":{"href":"https://api.github.com/repos/super626/cocos2d-x/issues/281"},"comments":{"href":"https://api.github.com/repos/super626/cocos2d-x/issues/281/comments"},"review_comments":{"href":"https://api.github.com/repos/super626/cocos2d-x/pulls/281/comments"},"review_comment":{"href":"https://api.github.com/repos/super626/cocos2d-x/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/super626/cocos2d-x/pulls/281/commits"},"statuses":{"href":"https://api.github.com/repos/super626/cocos2d-x/statuses/6cd1077cb08020e7cfe00f82211ad0bd2e9ffd90"}}}}