{"action":"opened","number":3520,"pull_request":{"url":"https://api.github.com/repos/kivy/kivy/pulls/3520","id":40313403,"html_url":"https://github.com/kivy/kivy/pull/3520","diff_url":"https://github.com/kivy/kivy/pull/3520.diff","patch_url":"https://github.com/kivy/kivy/pull/3520.patch","issue_url":"https://api.github.com/repos/kivy/kivy/issues/3520","number":3520,"state":"open","locked":false,"title":"add depth+stencil buffer support to fbo","user":{"login":"kived","id":1126441,"avatar_url":"https://avatars.githubusercontent.com/u/1126441?v=3","gravatar_id":"","url":"https://api.github.com/users/kived","html_url":"https://github.com/kived","followers_url":"https://api.github.com/users/kived/followers","following_url":"https://api.github.com/users/kived/following{/other_user}","gists_url":"https://api.github.com/users/kived/gists{/gist_id}","starred_url":"https://api.github.com/users/kived/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kived/subscriptions","organizations_url":"https://api.github.com/users/kived/orgs","repos_url":"https://api.github.com/users/kived/repos","events_url":"https://api.github.com/users/kived/events{/privacy}","received_events_url":"https://api.github.com/users/kived/received_events","type":"User","site_admin":false},"body":"Adds support for depth+stencil buffer using `GL_DEPTH24_STENCIL8`/`GL_DEPTH24_STENCIL8_OES`. If an FBO is created with only depth or stencil buffers, but not both, and an FBO unsupported error occurs, then it will automatically attempt to create a depth+stencil buffer instead.\r\n\r\nAllows stencil buffer to be used on platforms such as OS X, where an FBO cannot be created with solely a stencil buffer. In a perfect world it would work on iOS as well, which has the same limitation, however iOS currently suffers from a freezing issue (#3428). Since it automatically switches to depth+stencil, it works seamlessly with existing code like garden.graph.\r\n\r\nThis has been tested on OS X 10.10.4 with XCode 7 and Android 5.0 with SDK 21 using the code below. On OS X, the Graph FBO automatically switches to depth+stencil. The `on_start` code checks to ensure that using depth+stencil doesn't immediately crash on other platforms (like Android) which won't need to switch.\r\n\r\n````python\r\nimport sys, os, math\r\n\r\nfrom kivy.app import App\r\nfrom kivy.garden.graph import Graph, MeshLinePlot\r\nfrom kivy.graphics import Fbo\r\n\r\nclass MyApp(App):\r\n    def build(self):\r\n        print 'create graph'\r\n        graph = Graph(xlabel='X', ylabel='Y', x_ticks_minor=5,\r\n                      x_ticks_major=25, y_ticks_major=1,\r\n                      y_grid_label=True, x_grid_label=True, padding=5,\r\n                      x_grid=True, y_grid=True, xmin=-0, xmax=100, ymin=-1, ymax=1)\r\n        plot = MeshLinePlot(color=[1, 0, 0, 1])\r\n        plot.points = [(x, math.sin(x / 10.)) for x in range(0, 101)]\r\n        graph.add_plot(plot)\r\n        return graph\r\n\r\n    def on_start(self):\r\n        print 'create d+s fbo'\r\n        fbo = Fbo(size=(100, 100), with_depthbuffer=True, with_stencilbuffer=True)\r\n        print fbo\r\n\r\n\r\nif __name__ == '__main__':\r\n    app = MyApp()\r\n    app.run()\r\n````","created_at":"2015-07-19T19:23:56Z","updated_at":"2015-07-19T19:23:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kivy/kivy/pulls/3520/commits","review_comments_url":"https://api.github.com/repos/kivy/kivy/pulls/3520/comments","review_comment_url":"https://api.github.com/repos/kivy/kivy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kivy/kivy/issues/3520/comments","statuses_url":"https://api.github.com/repos/kivy/kivy/statuses/7dd5c6f465cb2995a406607f20b8b7d437e2559c","head":{"label":"kived:fbo-depthstencil","ref":"fbo-depthstencil","sha":"7dd5c6f465cb2995a406607f20b8b7d437e2559c","user":{"login":"kived","id":1126441,"avatar_url":"https://avatars.githubusercontent.com/u/1126441?v=3","gravatar_id":"","url":"https://api.github.com/users/kived","html_url":"https://github.com/kived","followers_url":"https://api.github.com/users/kived/followers","following_url":"https://api.github.com/users/kived/following{/other_user}","gists_url":"https://api.github.com/users/kived/gists{/gist_id}","starred_url":"https://api.github.com/users/kived/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kived/subscriptions","organizations_url":"https://api.github.com/users/kived/orgs","repos_url":"https://api.github.com/users/kived/repos","events_url":"https://api.github.com/users/kived/events{/privacy}","received_events_url":"https://api.github.com/users/kived/received_events","type":"User","site_admin":false},"repo":{"id":6725425,"name":"kivy","full_name":"kived/kivy","owner":{"login":"kived","id":1126441,"avatar_url":"https://avatars.githubusercontent.com/u/1126441?v=3","gravatar_id":"","url":"https://api.github.com/users/kived","html_url":"https://github.com/kived","followers_url":"https://api.github.com/users/kived/followers","following_url":"https://api.github.com/users/kived/following{/other_user}","gists_url":"https://api.github.com/users/kived/gists{/gist_id}","starred_url":"https://api.github.com/users/kived/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kived/subscriptions","organizations_url":"https://api.github.com/users/kived/orgs","repos_url":"https://api.github.com/users/kived/repos","events_url":"https://api.github.com/users/kived/events{/privacy}","received_events_url":"https://api.github.com/users/kived/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kived/kivy","description":"Open source software library for creating NUI applications, running on Windows, Linux, MacOSX, Android","fork":true,"url":"https://api.github.com/repos/kived/kivy","forks_url":"https://api.github.com/repos/kived/kivy/forks","keys_url":"https://api.github.com/repos/kived/kivy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kived/kivy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kived/kivy/teams","hooks_url":"https://api.github.com/repos/kived/kivy/hooks","issue_events_url":"https://api.github.com/repos/kived/kivy/issues/events{/number}","events_url":"https://api.github.com/repos/kived/kivy/events","assignees_url":"https://api.github.com/repos/kived/kivy/assignees{/user}","branches_url":"https://api.github.com/repos/kived/kivy/branches{/branch}","tags_url":"https://api.github.com/repos/kived/kivy/tags","blobs_url":"https://api.github.com/repos/kived/kivy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kived/kivy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kived/kivy/git/refs{/sha}","trees_url":"https://api.github.com/repos/kived/kivy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kived/kivy/statuses/{sha}","languages_url":"https://api.github.com/repos/kived/kivy/languages","stargazers_url":"https://api.github.com/repos/kived/kivy/stargazers","contributors_url":"https://api.github.com/repos/kived/kivy/contributors","subscribers_url":"https://api.github.com/repos/kived/kivy/subscribers","subscription_url":"https://api.github.com/repos/kived/kivy/subscription","commits_url":"https://api.github.com/repos/kived/kivy/commits{/sha}","git_commits_url":"https://api.github.com/repos/kived/kivy/git/commits{/sha}","comments_url":"https://api.github.com/repos/kived/kivy/comments{/number}","issue_comment_url":"https://api.github.com/repos/kived/kivy/issues/comments{/number}","contents_url":"https://api.github.com/repos/kived/kivy/contents/{+path}","compare_url":"https://api.github.com/repos/kived/kivy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kived/kivy/merges","archive_url":"https://api.github.com/repos/kived/kivy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kived/kivy/downloads","issues_url":"https://api.github.com/repos/kived/kivy/issues{/number}","pulls_url":"https://api.github.com/repos/kived/kivy/pulls{/number}","milestones_url":"https://api.github.com/repos/kived/kivy/milestones{/number}","notifications_url":"https://api.github.com/repos/kived/kivy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kived/kivy/labels{/name}","releases_url":"https://api.github.com/repos/kived/kivy/releases{/id}","created_at":"2012-11-16T17:34:24Z","updated_at":"2015-05-03T19:35:30Z","pushed_at":"2015-07-19T19:08:10Z","git_url":"git://github.com/kived/kivy.git","ssh_url":"git@github.com:kived/kivy.git","clone_url":"https://github.com/kived/kivy.git","svn_url":"https://github.com/kived/kivy","homepage":"http://kivy.org/","size":47136,"stargazers_count":1,"watchers_count":1,"language":"Python","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":1,"default_branch":"master"}},"base":{"label":"kivy:master","ref":"master","sha":"8519085e194022ad18af514bbd1e561440db3bbe","user":{"login":"kivy","id":1266152,"avatar_url":"https://avatars.githubusercontent.com/u/1266152?v=3","gravatar_id":"","url":"https://api.github.com/users/kivy","html_url":"https://github.com/kivy","followers_url":"https://api.github.com/users/kivy/followers","following_url":"https://api.github.com/users/kivy/following{/other_user}","gists_url":"https://api.github.com/users/kivy/gists{/gist_id}","starred_url":"https://api.github.com/users/kivy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kivy/subscriptions","organizations_url":"https://api.github.com/users/kivy/orgs","repos_url":"https://api.github.com/users/kivy/repos","events_url":"https://api.github.com/users/kivy/events{/privacy}","received_events_url":"https://api.github.com/users/kivy/received_events","type":"Organization","site_admin":false},"repo":{"id":1049095,"name":"kivy","full_name":"kivy/kivy","owner":{"login":"kivy","id":1266152,"avatar_url":"https://avatars.githubusercontent.com/u/1266152?v=3","gravatar_id":"","url":"https://api.github.com/users/kivy","html_url":"https://github.com/kivy","followers_url":"https://api.github.com/users/kivy/followers","following_url":"https://api.github.com/users/kivy/following{/other_user}","gists_url":"https://api.github.com/users/kivy/gists{/gist_id}","starred_url":"https://api.github.com/users/kivy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kivy/subscriptions","organizations_url":"https://api.github.com/users/kivy/orgs","repos_url":"https://api.github.com/users/kivy/repos","events_url":"https://api.github.com/users/kivy/events{/privacy}","received_events_url":"https://api.github.com/users/kivy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kivy/kivy","description":"Open source Python framework for creating NUI applications, running on Windows, Linux, OS X, Android and iOS","fork":false,"url":"https://api.github.com/repos/kivy/kivy","forks_url":"https://api.github.com/repos/kivy/kivy/forks","keys_url":"https://api.github.com/repos/kivy/kivy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kivy/kivy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kivy/kivy/teams","hooks_url":"https://api.github.com/repos/kivy/kivy/hooks","issue_events_url":"https://api.github.com/repos/kivy/kivy/issues/events{/number}","events_url":"https://api.github.com/repos/kivy/kivy/events","assignees_url":"https://api.github.com/repos/kivy/kivy/assignees{/user}","branches_url":"https://api.github.com/repos/kivy/kivy/branches{/branch}","tags_url":"https://api.github.com/repos/kivy/kivy/tags","blobs_url":"https://api.github.com/repos/kivy/kivy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kivy/kivy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kivy/kivy/git/refs{/sha}","trees_url":"https://api.github.com/repos/kivy/kivy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kivy/kivy/statuses/{sha}","languages_url":"https://api.github.com/repos/kivy/kivy/languages","stargazers_url":"https://api.github.com/repos/kivy/kivy/stargazers","contributors_url":"https://api.github.com/repos/kivy/kivy/contributors","subscribers_url":"https://api.github.com/repos/kivy/kivy/subscribers","subscription_url":"https://api.github.com/repos/kivy/kivy/subscription","commits_url":"https://api.github.com/repos/kivy/kivy/commits{/sha}","git_commits_url":"https://api.github.com/repos/kivy/kivy/git/commits{/sha}","comments_url":"https://api.github.com/repos/kivy/kivy/comments{/number}","issue_comment_url":"https://api.github.com/repos/kivy/kivy/issues/comments{/number}","contents_url":"https://api.github.com/repos/kivy/kivy/contents/{+path}","compare_url":"https://api.github.com/repos/kivy/kivy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kivy/kivy/merges","archive_url":"https://api.github.com/repos/kivy/kivy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kivy/kivy/downloads","issues_url":"https://api.github.com/repos/kivy/kivy/issues{/number}","pulls_url":"https://api.github.com/repos/kivy/kivy/pulls{/number}","milestones_url":"https://api.github.com/repos/kivy/kivy/milestones{/number}","notifications_url":"https://api.github.com/repos/kivy/kivy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kivy/kivy/labels{/name}","releases_url":"https://api.github.com/repos/kivy/kivy/releases{/id}","created_at":"2010-11-03T20:27:32Z","updated_at":"2015-07-19T12:10:30Z","pushed_at":"2015-07-19T18:00:41Z","git_url":"git://github.com/kivy/kivy.git","ssh_url":"git@github.com:kivy/kivy.git","clone_url":"https://github.com/kivy/kivy.git","svn_url":"https://github.com/kivy/kivy","homepage":"http://kivy.org","size":159049,"stargazers_count":3345,"watchers_count":3345,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":841,"mirror_url":null,"open_issues_count":456,"forks":841,"open_issues":456,"watchers":3345,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kivy/kivy/pulls/3520"},"html":{"href":"https://github.com/kivy/kivy/pull/3520"},"issue":{"href":"https://api.github.com/repos/kivy/kivy/issues/3520"},"comments":{"href":"https://api.github.com/repos/kivy/kivy/issues/3520/comments"},"review_comments":{"href":"https://api.github.com/repos/kivy/kivy/pulls/3520/comments"},"review_comment":{"href":"https://api.github.com/repos/kivy/kivy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kivy/kivy/pulls/3520/commits"},"statuses":{"href":"https://api.github.com/repos/kivy/kivy/statuses/7dd5c6f465cb2995a406607f20b8b7d437e2559c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":38,"deletions":4,"changed_files":4}}