{"action":"created","comment":{"url":"https://api.github.com/repos/SFML/SFML/pulls/comments/33353635","id":33353635,"diff_hunk":"@@ -281,6 +281,14 @@ void RenderTarget::draw(const Vertex* vertices, std::size_t vertexCount,\n         if (states.shader)\n             applyShader(NULL);\n \n+        // If the texture we used to draw belonged to a RenderTexture, then forcibly unbind that texture.\n+        // This prevents a bug where some drivers do not clear RenderTextures properly.\n+        if (states.texture && states.texture->m_ownedByRenderTexture)\n+        {\n+            Texture::bind(NULL);\n+            m_cache.lastTextureId = 0;","path":"src/SFML/Graphics/RenderTarget.cpp","position":9,"original_position":9,"commit_id":"598ab8743fdf96f2ff012aef4125284814542d88","original_commit_id":"598ab8743fdf96f2ff012aef4125284814542d88","user":{"login":"binary1248","id":949359,"avatar_url":"https://avatars.githubusercontent.com/u/949359?v=3","gravatar_id":"","url":"https://api.github.com/users/binary1248","html_url":"https://github.com/binary1248","followers_url":"https://api.github.com/users/binary1248/followers","following_url":"https://api.github.com/users/binary1248/following{/other_user}","gists_url":"https://api.github.com/users/binary1248/gists{/gist_id}","starred_url":"https://api.github.com/users/binary1248/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binary1248/subscriptions","organizations_url":"https://api.github.com/users/binary1248/orgs","repos_url":"https://api.github.com/users/binary1248/repos","events_url":"https://api.github.com/users/binary1248/events{/privacy}","received_events_url":"https://api.github.com/users/binary1248/received_events","type":"User","site_admin":false},"body":"Replace these 2 lines with `applyTexture(NULL)`.","created_at":"2015-06-26T13:08:44Z","updated_at":"2015-06-26T13:08:44Z","html_url":"https://github.com/SFML/SFML/pull/915#discussion_r33353635","pull_request_url":"https://api.github.com/repos/SFML/SFML/pulls/915","_links":{"self":{"href":"https://api.github.com/repos/SFML/SFML/pulls/comments/33353635"},"html":{"href":"https://github.com/SFML/SFML/pull/915#discussion_r33353635"},"pull_request":{"href":"https://api.github.com/repos/SFML/SFML/pulls/915"}}},"pull_request":{"url":"https://api.github.com/repos/SFML/SFML/pulls/915","id":38640781,"html_url":"https://github.com/SFML/SFML/pull/915","diff_url":"https://github.com/SFML/SFML/pull/915.diff","patch_url":"https://github.com/SFML/SFML/pull/915.patch","issue_url":"https://api.github.com/repos/SFML/SFML/issues/915","number":915,"state":"open","locked":false,"title":"Fix clear bug on RenderTextures","user":{"login":"Kipernal","id":6545436,"avatar_url":"https://avatars.githubusercontent.com/u/6545436?v=3","gravatar_id":"","url":"https://api.github.com/users/Kipernal","html_url":"https://github.com/Kipernal","followers_url":"https://api.github.com/users/Kipernal/followers","following_url":"https://api.github.com/users/Kipernal/following{/other_user}","gists_url":"https://api.github.com/users/Kipernal/gists{/gist_id}","starred_url":"https://api.github.com/users/Kipernal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kipernal/subscriptions","organizations_url":"https://api.github.com/users/Kipernal/orgs","repos_url":"https://api.github.com/users/Kipernal/repos","events_url":"https://api.github.com/users/Kipernal/events{/privacy}","received_events_url":"https://api.github.com/users/Kipernal/received_events","type":"User","site_admin":false},"body":"Based on http://en.sfml-dev.org/forums/index.php?topic=18428.0.\r\n\r\nCertain drivers seem to ignore requests to clear RenderTextures under certain circumstances.   Seems to be related to #591, which fixed part of the problem.  This fixes another part (hopefully the rest!).","created_at":"2015-06-26T11:35:02Z","updated_at":"2015-06-26T13:08:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3238c785fea81e297263f8fcb78ca811b1a43b2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SFML/SFML/pulls/915/commits","review_comments_url":"https://api.github.com/repos/SFML/SFML/pulls/915/comments","review_comment_url":"https://api.github.com/repos/SFML/SFML/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SFML/SFML/issues/915/comments","statuses_url":"https://api.github.com/repos/SFML/SFML/statuses/598ab8743fdf96f2ff012aef4125284814542d88","head":{"label":"Kipernal:bugfix/rendertexture_clear","ref":"bugfix/rendertexture_clear","sha":"598ab8743fdf96f2ff012aef4125284814542d88","user":{"login":"Kipernal","id":6545436,"avatar_url":"https://avatars.githubusercontent.com/u/6545436?v=3","gravatar_id":"","url":"https://api.github.com/users/Kipernal","html_url":"https://github.com/Kipernal","followers_url":"https://api.github.com/users/Kipernal/followers","following_url":"https://api.github.com/users/Kipernal/following{/other_user}","gists_url":"https://api.github.com/users/Kipernal/gists{/gist_id}","starred_url":"https://api.github.com/users/Kipernal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kipernal/subscriptions","organizations_url":"https://api.github.com/users/Kipernal/orgs","repos_url":"https://api.github.com/users/Kipernal/repos","events_url":"https://api.github.com/users/Kipernal/events{/privacy}","received_events_url":"https://api.github.com/users/Kipernal/received_events","type":"User","site_admin":false},"repo":{"id":33998118,"name":"SFML","full_name":"Kipernal/SFML","owner":{"login":"Kipernal","id":6545436,"avatar_url":"https://avatars.githubusercontent.com/u/6545436?v=3","gravatar_id":"","url":"https://api.github.com/users/Kipernal","html_url":"https://github.com/Kipernal","followers_url":"https://api.github.com/users/Kipernal/followers","following_url":"https://api.github.com/users/Kipernal/following{/other_user}","gists_url":"https://api.github.com/users/Kipernal/gists{/gist_id}","starred_url":"https://api.github.com/users/Kipernal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kipernal/subscriptions","organizations_url":"https://api.github.com/users/Kipernal/orgs","repos_url":"https://api.github.com/users/Kipernal/repos","events_url":"https://api.github.com/users/Kipernal/events{/privacy}","received_events_url":"https://api.github.com/users/Kipernal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Kipernal/SFML","description":"Simple and Fast Multimedia Library","fork":true,"url":"https://api.github.com/repos/Kipernal/SFML","forks_url":"https://api.github.com/repos/Kipernal/SFML/forks","keys_url":"https://api.github.com/repos/Kipernal/SFML/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kipernal/SFML/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kipernal/SFML/teams","hooks_url":"https://api.github.com/repos/Kipernal/SFML/hooks","issue_events_url":"https://api.github.com/repos/Kipernal/SFML/issues/events{/number}","events_url":"https://api.github.com/repos/Kipernal/SFML/events","assignees_url":"https://api.github.com/repos/Kipernal/SFML/assignees{/user}","branches_url":"https://api.github.com/repos/Kipernal/SFML/branches{/branch}","tags_url":"https://api.github.com/repos/Kipernal/SFML/tags","blobs_url":"https://api.github.com/repos/Kipernal/SFML/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kipernal/SFML/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kipernal/SFML/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kipernal/SFML/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kipernal/SFML/statuses/{sha}","languages_url":"https://api.github.com/repos/Kipernal/SFML/languages","stargazers_url":"https://api.github.com/repos/Kipernal/SFML/stargazers","contributors_url":"https://api.github.com/repos/Kipernal/SFML/contributors","subscribers_url":"https://api.github.com/repos/Kipernal/SFML/subscribers","subscription_url":"https://api.github.com/repos/Kipernal/SFML/subscription","commits_url":"https://api.github.com/repos/Kipernal/SFML/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kipernal/SFML/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kipernal/SFML/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kipernal/SFML/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kipernal/SFML/contents/{+path}","compare_url":"https://api.github.com/repos/Kipernal/SFML/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kipernal/SFML/merges","archive_url":"https://api.github.com/repos/Kipernal/SFML/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kipernal/SFML/downloads","issues_url":"https://api.github.com/repos/Kipernal/SFML/issues{/number}","pulls_url":"https://api.github.com/repos/Kipernal/SFML/pulls{/number}","milestones_url":"https://api.github.com/repos/Kipernal/SFML/milestones{/number}","notifications_url":"https://api.github.com/repos/Kipernal/SFML/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kipernal/SFML/labels{/name}","releases_url":"https://api.github.com/repos/Kipernal/SFML/releases{/id}","created_at":"2015-04-15T14:17:22Z","updated_at":"2015-05-01T04:18:34Z","pushed_at":"2015-06-26T11:02:12Z","git_url":"git://github.com/Kipernal/SFML.git","ssh_url":"git@github.com:Kipernal/SFML.git","clone_url":"https://github.com/Kipernal/SFML.git","svn_url":"https://github.com/Kipernal/SFML","homepage":"http://www.sfml-dev.org/","size":73332,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"SFML:master","ref":"master","sha":"80214d1cb916ae5f49c63ade4c167369faab9b9e","user":{"login":"SFML","id":4226899,"avatar_url":"https://avatars.githubusercontent.com/u/4226899?v=3","gravatar_id":"","url":"https://api.github.com/users/SFML","html_url":"https://github.com/SFML","followers_url":"https://api.github.com/users/SFML/followers","following_url":"https://api.github.com/users/SFML/following{/other_user}","gists_url":"https://api.github.com/users/SFML/gists{/gist_id}","starred_url":"https://api.github.com/users/SFML/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SFML/subscriptions","organizations_url":"https://api.github.com/users/SFML/orgs","repos_url":"https://api.github.com/users/SFML/repos","events_url":"https://api.github.com/users/SFML/events{/privacy}","received_events_url":"https://api.github.com/users/SFML/received_events","type":"Organization","site_admin":false},"repo":{"id":1524684,"name":"SFML","full_name":"SFML/SFML","owner":{"login":"SFML","id":4226899,"avatar_url":"https://avatars.githubusercontent.com/u/4226899?v=3","gravatar_id":"","url":"https://api.github.com/users/SFML","html_url":"https://github.com/SFML","followers_url":"https://api.github.com/users/SFML/followers","following_url":"https://api.github.com/users/SFML/following{/other_user}","gists_url":"https://api.github.com/users/SFML/gists{/gist_id}","starred_url":"https://api.github.com/users/SFML/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SFML/subscriptions","organizations_url":"https://api.github.com/users/SFML/orgs","repos_url":"https://api.github.com/users/SFML/repos","events_url":"https://api.github.com/users/SFML/events{/privacy}","received_events_url":"https://api.github.com/users/SFML/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SFML/SFML","description":"Simple and Fast Multimedia Library","fork":false,"url":"https://api.github.com/repos/SFML/SFML","forks_url":"https://api.github.com/repos/SFML/SFML/forks","keys_url":"https://api.github.com/repos/SFML/SFML/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SFML/SFML/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SFML/SFML/teams","hooks_url":"https://api.github.com/repos/SFML/SFML/hooks","issue_events_url":"https://api.github.com/repos/SFML/SFML/issues/events{/number}","events_url":"https://api.github.com/repos/SFML/SFML/events","assignees_url":"https://api.github.com/repos/SFML/SFML/assignees{/user}","branches_url":"https://api.github.com/repos/SFML/SFML/branches{/branch}","tags_url":"https://api.github.com/repos/SFML/SFML/tags","blobs_url":"https://api.github.com/repos/SFML/SFML/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SFML/SFML/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SFML/SFML/git/refs{/sha}","trees_url":"https://api.github.com/repos/SFML/SFML/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SFML/SFML/statuses/{sha}","languages_url":"https://api.github.com/repos/SFML/SFML/languages","stargazers_url":"https://api.github.com/repos/SFML/SFML/stargazers","contributors_url":"https://api.github.com/repos/SFML/SFML/contributors","subscribers_url":"https://api.github.com/repos/SFML/SFML/subscribers","subscription_url":"https://api.github.com/repos/SFML/SFML/subscription","commits_url":"https://api.github.com/repos/SFML/SFML/commits{/sha}","git_commits_url":"https://api.github.com/repos/SFML/SFML/git/commits{/sha}","comments_url":"https://api.github.com/repos/SFML/SFML/comments{/number}","issue_comment_url":"https://api.github.com/repos/SFML/SFML/issues/comments{/number}","contents_url":"https://api.github.com/repos/SFML/SFML/contents/{+path}","compare_url":"https://api.github.com/repos/SFML/SFML/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SFML/SFML/merges","archive_url":"https://api.github.com/repos/SFML/SFML/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SFML/SFML/downloads","issues_url":"https://api.github.com/repos/SFML/SFML/issues{/number}","pulls_url":"https://api.github.com/repos/SFML/SFML/pulls{/number}","milestones_url":"https://api.github.com/repos/SFML/SFML/milestones{/number}","notifications_url":"https://api.github.com/repos/SFML/SFML/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SFML/SFML/labels{/name}","releases_url":"https://api.github.com/repos/SFML/SFML/releases{/id}","created_at":"2011-03-25T08:05:25Z","updated_at":"2015-06-26T05:32:25Z","pushed_at":"2015-06-26T11:35:02Z","git_url":"git://github.com/SFML/SFML.git","ssh_url":"git@github.com:SFML/SFML.git","clone_url":"https://github.com/SFML/SFML.git","svn_url":"https://github.com/SFML/SFML","homepage":"http://www.sfml-dev.org/","size":85127,"stargazers_count":2189,"watchers_count":2189,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":465,"mirror_url":null,"open_issues_count":66,"forks":465,"open_issues":66,"watchers":2189,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SFML/SFML/pulls/915"},"html":{"href":"https://github.com/SFML/SFML/pull/915"},"issue":{"href":"https://api.github.com/repos/SFML/SFML/issues/915"},"comments":{"href":"https://api.github.com/repos/SFML/SFML/issues/915/comments"},"review_comments":{"href":"https://api.github.com/repos/SFML/SFML/pulls/915/comments"},"review_comment":{"href":"https://api.github.com/repos/SFML/SFML/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SFML/SFML/pulls/915/commits"},"statuses":{"href":"https://api.github.com/repos/SFML/SFML/statuses/598ab8743fdf96f2ff012aef4125284814542d88"}}}}