{"action":"created","issue":{"url":"https://api.github.com/repos/mono/MonoGame/issues/4188","labels_url":"https://api.github.com/repos/mono/MonoGame/issues/4188/labels{/name}","comments_url":"https://api.github.com/repos/mono/MonoGame/issues/4188/comments","events_url":"https://api.github.com/repos/mono/MonoGame/issues/4188/events","html_url":"https://github.com/mono/MonoGame/pull/4188","id":112138908,"number":4188,"title":"Added OcclusionQuery implementation for DirectX.","user":{"login":"Helikin","id":3626369,"avatar_url":"https://avatars.githubusercontent.com/u/3626369?v=3","gravatar_id":"","url":"https://api.github.com/users/Helikin","html_url":"https://github.com/Helikin","followers_url":"https://api.github.com/users/Helikin/followers","following_url":"https://api.github.com/users/Helikin/following{/other_user}","gists_url":"https://api.github.com/users/Helikin/gists{/gist_id}","starred_url":"https://api.github.com/users/Helikin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Helikin/subscriptions","organizations_url":"https://api.github.com/users/Helikin/orgs","repos_url":"https://api.github.com/users/Helikin/repos","events_url":"https://api.github.com/users/Helikin/events{/privacy}","received_events_url":"https://api.github.com/users/Helikin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-19T12:57:38Z","updated_at":"2015-10-19T20:03:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mono/MonoGame/pulls/4188","html_url":"https://github.com/mono/MonoGame/pull/4188","diff_url":"https://github.com/mono/MonoGame/pull/4188.diff","patch_url":"https://github.com/mono/MonoGame/pull/4188.patch"},"body":"This PR splits the OcclusionQuery.cs into OcclusionQuery.*Platform*.cs files and adds an implementation for DirectX.\r\n\r\nThe PR also adds unit tests. One test uses the SpriteBatch. It should currently fail because of the SpriteBatch z value bug. It should work after following PR is merged:\r\n- Fix: SpriteBatch writes wrong z value. #4184\r\n\r\nPreviously, OcclusionQuery.cs was excluded from iOS, Android and Ouya builds. I have tested the occlusion query on iOS and Android, and the query works if the device supports OpenGL ES 3.0. I have not tested on devices without ES 3.0 support - therefore, the OcclusionQuery files are still excluded on iOS, Android and Ouya.\r\n\r\nThis PR should also fix a bug in the OpenGL implementation: \r\nThe pixel count was retrieved with ```QueryResultAvailable``` (which returns only true/false) instead of ```QueryResult```. (The MonoMac code path did not have this problem.)\r\n\r\nRelated issues: \r\n- Missing OcclusionQuery class from Graphics namespace #414\r\n- DirectX and OcclusionQuery #4033"},"comment":{"url":"https://api.github.com/repos/mono/MonoGame/issues/comments/149330678","html_url":"https://github.com/mono/MonoGame/pull/4188#issuecomment-149330678","issue_url":"https://api.github.com/repos/mono/MonoGame/issues/4188","id":149330678,"user":{"login":"Helikin","id":3626369,"avatar_url":"https://avatars.githubusercontent.com/u/3626369?v=3","gravatar_id":"","url":"https://api.github.com/users/Helikin","html_url":"https://github.com/Helikin","followers_url":"https://api.github.com/users/Helikin/followers","following_url":"https://api.github.com/users/Helikin/following{/other_user}","gists_url":"https://api.github.com/users/Helikin/gists{/gist_id}","starred_url":"https://api.github.com/users/Helikin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Helikin/subscriptions","organizations_url":"https://api.github.com/users/Helikin/orgs","repos_url":"https://api.github.com/users/Helikin/repos","events_url":"https://api.github.com/users/Helikin/events{/privacy}","received_events_url":"https://api.github.com/users/Helikin/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T20:03:56Z","updated_at":"2015-10-19T20:03:56Z","body":"> it doesn't merge with develop for you.\r\n\r\nAh yeah, right. I spend too little time with git. ;-)\r\nWill do tomorrow."}}