{"action":"created","comment":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/59352186","id":59352186,"diff_hunk":"@@ -224,13 +224,17 @@ public void EnableDepthBuffer()\n \t\t\tOpenGL.CheckGLError();\n \t\t\tOpenGL.glEnable(OpenGL.GL_DEPTH_TEST);\n \t\t\tOpenGL.CheckGLError();\n+\t\t\tOpenGL.glDepthFunc(OpenGL.GL_LEQUAL);\n+\t\t\tOpenGL.CheckGLError();\n \t\t}\n \n \t\tpublic void DisableDepthBuffer()\n \t\t{\n \t\t\tVerifyThreadAffinity();\n \t\t\tOpenGL.glDisable(OpenGL.GL_DEPTH_TEST);\n \t\t\tOpenGL.CheckGLError();\n+\t\t\tOpenGL.glDepthFunc(OpenGL.GL_ALWAYS);","path":"OpenRA.Platforms.Default/Sdl2GraphicsDevice.cs","position":22,"original_position":13,"commit_id":"d166c8ac85cdcc745b324886b5eccb4229bcd235","original_commit_id":"b73cf550bb76d090b459506b97f7dddf363492c6","user":{"login":"chrisforbes","id":128877,"avatar_url":"https://avatars.githubusercontent.com/u/128877?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisforbes","html_url":"https://github.com/chrisforbes","followers_url":"https://api.github.com/users/chrisforbes/followers","following_url":"https://api.github.com/users/chrisforbes/following{/other_user}","gists_url":"https://api.github.com/users/chrisforbes/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisforbes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisforbes/subscriptions","organizations_url":"https://api.github.com/users/chrisforbes/orgs","repos_url":"https://api.github.com/users/chrisforbes/repos","events_url":"https://api.github.com/users/chrisforbes/events{/privacy}","received_events_url":"https://api.github.com/users/chrisforbes/received_events","type":"User","site_admin":false},"body":"Why?","created_at":"2016-04-12T10:12:20Z","updated_at":"2016-04-12T10:12:20Z","html_url":"https://github.com/OpenRA/OpenRA/pull/11091#discussion_r59352186","pull_request_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/11091","_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/59352186"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/11091#discussion_r59352186"},"pull_request":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/11091"}}},"pull_request":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/11091","id":65914743,"html_url":"https://github.com/OpenRA/OpenRA/pull/11091","diff_url":"https://github.com/OpenRA/OpenRA/pull/11091.diff","patch_url":"https://github.com/OpenRA/OpenRA/pull/11091.patch","issue_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/11091","number":11091,"state":"open","locked":false,"title":"Add depth buffer support for sprites.","user":{"login":"pchote","id":167819,"avatar_url":"https://avatars.githubusercontent.com/u/167819?v=3","gravatar_id":"","url":"https://api.github.com/users/pchote","html_url":"https://github.com/pchote","followers_url":"https://api.github.com/users/pchote/followers","following_url":"https://api.github.com/users/pchote/following{/other_user}","gists_url":"https://api.github.com/users/pchote/gists{/gist_id}","starred_url":"https://api.github.com/users/pchote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchote/subscriptions","organizations_url":"https://api.github.com/users/pchote/orgs","repos_url":"https://api.github.com/users/pchote/repos","events_url":"https://api.github.com/users/pchote/events{/privacy}","received_events_url":"https://api.github.com/users/pchote/received_events","type":"User","site_admin":false},"body":"The next step towards #7520.\r\n\r\nThis enables the depth buffer properly for mods that define `EnableDepthBuffer` in their mod.yaml, and writes sensible data into the sprite z coordinates.  This fixes most of the \"scroll the map and X disappears\" issues from #11058 (but not for voxels or color effects), and gives the desired clipping behaviour for sprite based actors behind cliffs.\r\n\r\nLarge sprite actors (buildings) are partly clipped below the terrain: this is expected, and will be fixed in a future PR that adds support for per-sprite depth maps.  The clip level is not actually ground level because of the way the terrain depth is defined.  That will be fixed in the next PR.  It also disables the old per-sprite depth preview (with `EnableDepthBuffer` disabled), because that is no longer useful and it would be a pain to maintain support for it.\r\n\r\nGithub has also buggered up the commit order in their preview, as usual.  The \"TEST COMMIT\" is the head commit, and should be removed before merging.","created_at":"2016-04-10T16:10:32Z","updated_at":"2016-04-12T10:12:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0c4ebaff593ec98fa216f739c3e6219f33c3149f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/11091/commits","review_comments_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/11091/comments","review_comment_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/11091/comments","statuses_url":"https://api.github.com/repos/OpenRA/OpenRA/statuses/d166c8ac85cdcc745b324886b5eccb4229bcd235","head":{"label":"pchote:sprite-vertex-depth","ref":"sprite-vertex-depth","sha":"d166c8ac85cdcc745b324886b5eccb4229bcd235","user":{"login":"pchote","id":167819,"avatar_url":"https://avatars.githubusercontent.com/u/167819?v=3","gravatar_id":"","url":"https://api.github.com/users/pchote","html_url":"https://github.com/pchote","followers_url":"https://api.github.com/users/pchote/followers","following_url":"https://api.github.com/users/pchote/following{/other_user}","gists_url":"https://api.github.com/users/pchote/gists{/gist_id}","starred_url":"https://api.github.com/users/pchote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchote/subscriptions","organizations_url":"https://api.github.com/users/pchote/orgs","repos_url":"https://api.github.com/users/pchote/repos","events_url":"https://api.github.com/users/pchote/events{/privacy}","received_events_url":"https://api.github.com/users/pchote/received_events","type":"User","site_admin":false},"repo":{"id":455831,"name":"OpenRA","full_name":"pchote/OpenRA","owner":{"login":"pchote","id":167819,"avatar_url":"https://avatars.githubusercontent.com/u/167819?v=3","gravatar_id":"","url":"https://api.github.com/users/pchote","html_url":"https://github.com/pchote","followers_url":"https://api.github.com/users/pchote/followers","following_url":"https://api.github.com/users/pchote/following{/other_user}","gists_url":"https://api.github.com/users/pchote/gists{/gist_id}","starred_url":"https://api.github.com/users/pchote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchote/subscriptions","organizations_url":"https://api.github.com/users/pchote/orgs","repos_url":"https://api.github.com/users/pchote/repos","events_url":"https://api.github.com/users/pchote/events{/privacy}","received_events_url":"https://api.github.com/users/pchote/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pchote/OpenRA","description":"Open Source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert written in C# using SDL and OpenGL. Runs on Windows, Linux, *BSD and Mac OS X.","fork":true,"url":"https://api.github.com/repos/pchote/OpenRA","forks_url":"https://api.github.com/repos/pchote/OpenRA/forks","keys_url":"https://api.github.com/repos/pchote/OpenRA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pchote/OpenRA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pchote/OpenRA/teams","hooks_url":"https://api.github.com/repos/pchote/OpenRA/hooks","issue_events_url":"https://api.github.com/repos/pchote/OpenRA/issues/events{/number}","events_url":"https://api.github.com/repos/pchote/OpenRA/events","assignees_url":"https://api.github.com/repos/pchote/OpenRA/assignees{/user}","branches_url":"https://api.github.com/repos/pchote/OpenRA/branches{/branch}","tags_url":"https://api.github.com/repos/pchote/OpenRA/tags","blobs_url":"https://api.github.com/repos/pchote/OpenRA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pchote/OpenRA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pchote/OpenRA/git/refs{/sha}","trees_url":"https://api.github.com/repos/pchote/OpenRA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pchote/OpenRA/statuses/{sha}","languages_url":"https://api.github.com/repos/pchote/OpenRA/languages","stargazers_url":"https://api.github.com/repos/pchote/OpenRA/stargazers","contributors_url":"https://api.github.com/repos/pchote/OpenRA/contributors","subscribers_url":"https://api.github.com/repos/pchote/OpenRA/subscribers","subscription_url":"https://api.github.com/repos/pchote/OpenRA/subscription","commits_url":"https://api.github.com/repos/pchote/OpenRA/commits{/sha}","git_commits_url":"https://api.github.com/repos/pchote/OpenRA/git/commits{/sha}","comments_url":"https://api.github.com/repos/pchote/OpenRA/comments{/number}","issue_comment_url":"https://api.github.com/repos/pchote/OpenRA/issues/comments{/number}","contents_url":"https://api.github.com/repos/pchote/OpenRA/contents/{+path}","compare_url":"https://api.github.com/repos/pchote/OpenRA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pchote/OpenRA/merges","archive_url":"https://api.github.com/repos/pchote/OpenRA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pchote/OpenRA/downloads","issues_url":"https://api.github.com/repos/pchote/OpenRA/issues{/number}","pulls_url":"https://api.github.com/repos/pchote/OpenRA/pulls{/number}","milestones_url":"https://api.github.com/repos/pchote/OpenRA/milestones{/number}","notifications_url":"https://api.github.com/repos/pchote/OpenRA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pchote/OpenRA/labels{/name}","releases_url":"https://api.github.com/repos/pchote/OpenRA/releases{/id}","deployments_url":"https://api.github.com/repos/pchote/OpenRA/deployments","created_at":"2010-01-02T07:54:09Z","updated_at":"2016-04-06T00:37:35Z","pushed_at":"2016-04-11T00:35:33Z","git_url":"git://github.com/pchote/OpenRA.git","ssh_url":"git@github.com:pchote/OpenRA.git","clone_url":"https://github.com/pchote/OpenRA.git","svn_url":"https://github.com/pchote/OpenRA","homepage":"http://www.openra.net","size":105671,"stargazers_count":12,"watchers_count":12,"language":"C#","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":12,"default_branch":"master"}},"base":{"label":"OpenRA:bleed","ref":"bleed","sha":"3a3be979f30f438027b6301656dedfc2d2a9ae7c","user":{"login":"OpenRA","id":409046,"avatar_url":"https://avatars.githubusercontent.com/u/409046?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenRA","html_url":"https://github.com/OpenRA","followers_url":"https://api.github.com/users/OpenRA/followers","following_url":"https://api.github.com/users/OpenRA/following{/other_user}","gists_url":"https://api.github.com/users/OpenRA/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenRA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenRA/subscriptions","organizations_url":"https://api.github.com/users/OpenRA/orgs","repos_url":"https://api.github.com/users/OpenRA/repos","events_url":"https://api.github.com/users/OpenRA/events{/privacy}","received_events_url":"https://api.github.com/users/OpenRA/received_events","type":"Organization","site_admin":false},"repo":{"id":959908,"name":"OpenRA","full_name":"OpenRA/OpenRA","owner":{"login":"OpenRA","id":409046,"avatar_url":"https://avatars.githubusercontent.com/u/409046?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenRA","html_url":"https://github.com/OpenRA","followers_url":"https://api.github.com/users/OpenRA/followers","following_url":"https://api.github.com/users/OpenRA/following{/other_user}","gists_url":"https://api.github.com/users/OpenRA/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenRA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenRA/subscriptions","organizations_url":"https://api.github.com/users/OpenRA/orgs","repos_url":"https://api.github.com/users/OpenRA/repos","events_url":"https://api.github.com/users/OpenRA/events{/privacy}","received_events_url":"https://api.github.com/users/OpenRA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenRA/OpenRA","description":"Open Source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert written in C# using SDL and OpenGL. Runs on Windows, Linux, *BSD and Mac OS X.","fork":false,"url":"https://api.github.com/repos/OpenRA/OpenRA","forks_url":"https://api.github.com/repos/OpenRA/OpenRA/forks","keys_url":"https://api.github.com/repos/OpenRA/OpenRA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenRA/OpenRA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenRA/OpenRA/teams","hooks_url":"https://api.github.com/repos/OpenRA/OpenRA/hooks","issue_events_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/events{/number}","events_url":"https://api.github.com/repos/OpenRA/OpenRA/events","assignees_url":"https://api.github.com/repos/OpenRA/OpenRA/assignees{/user}","branches_url":"https://api.github.com/repos/OpenRA/OpenRA/branches{/branch}","tags_url":"https://api.github.com/repos/OpenRA/OpenRA/tags","blobs_url":"https://api.github.com/repos/OpenRA/OpenRA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenRA/OpenRA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenRA/OpenRA/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenRA/OpenRA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenRA/OpenRA/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenRA/OpenRA/languages","stargazers_url":"https://api.github.com/repos/OpenRA/OpenRA/stargazers","contributors_url":"https://api.github.com/repos/OpenRA/OpenRA/contributors","subscribers_url":"https://api.github.com/repos/OpenRA/OpenRA/subscribers","subscription_url":"https://api.github.com/repos/OpenRA/OpenRA/subscription","commits_url":"https://api.github.com/repos/OpenRA/OpenRA/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenRA/OpenRA/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenRA/OpenRA/contents/{+path}","compare_url":"https://api.github.com/repos/OpenRA/OpenRA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenRA/OpenRA/merges","archive_url":"https://api.github.com/repos/OpenRA/OpenRA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenRA/OpenRA/downloads","issues_url":"https://api.github.com/repos/OpenRA/OpenRA/issues{/number}","pulls_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenRA/OpenRA/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenRA/OpenRA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenRA/OpenRA/labels{/name}","releases_url":"https://api.github.com/repos/OpenRA/OpenRA/releases{/id}","deployments_url":"https://api.github.com/repos/OpenRA/OpenRA/deployments","created_at":"2010-10-04T07:38:05Z","updated_at":"2016-04-12T05:55:36Z","pushed_at":"2016-04-11T19:11:44Z","git_url":"git://github.com/OpenRA/OpenRA.git","ssh_url":"git@github.com:OpenRA/OpenRA.git","clone_url":"https://github.com/OpenRA/OpenRA.git","svn_url":"https://github.com/OpenRA/OpenRA","homepage":"http://www.openra.net","size":146472,"stargazers_count":2708,"watchers_count":2708,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":922,"mirror_url":null,"open_issues_count":997,"forks":922,"open_issues":997,"watchers":2708,"default_branch":"bleed"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/11091"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/11091"},"issue":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/11091"},"comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/11091/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/11091/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/11091/commits"},"statuses":{"href":"https://api.github.com/repos/OpenRA/OpenRA/statuses/d166c8ac85cdcc745b324886b5eccb4229bcd235"}}}}