{"action":"created","issue":{"url":"https://api.github.com/repos/bkaradzic/bgfx/issues/227","labels_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/227/comments","events_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/227/events","html_url":"https://github.com/bkaradzic/bgfx/issues/227","id":53731935,"number":227,"title":"Add framebuffer discard support","user":{"login":"attilaz","id":4198194,"avatar_url":"https://avatars.githubusercontent.com/u/4198194?v=3","gravatar_id":"","url":"https://api.github.com/users/attilaz","html_url":"https://github.com/attilaz","followers_url":"https://api.github.com/users/attilaz/followers","following_url":"https://api.github.com/users/attilaz/following{/other_user}","gists_url":"https://api.github.com/users/attilaz/gists{/gist_id}","starred_url":"https://api.github.com/users/attilaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attilaz/subscriptions","organizations_url":"https://api.github.com/users/attilaz/orgs","repos_url":"https://api.github.com/users/attilaz/repos","events_url":"https://api.github.com/users/attilaz/events{/privacy}","received_events_url":"https://api.github.com/users/attilaz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bkaradzic/bgfx/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-08T09:48:03Z","updated_at":"2015-01-12T08:24:08Z","closed_at":null,"body":"This is a major optimization on tile-based renderers like PowerVR, Mali.\r\n\r\n- on OpenGL ES 2.0 this is supported with https://www.khronos.org/registry/gles/extensions/EXT/EXT_discard_framebuffer.txt\r\n\r\n- on ES3.0: https://www.khronos.org/opengles/sdk/docs/man3/html/glInvalidateFramebuffer.xhtml\r\n\r\n- on metal: https://developer.apple.com/library/ios/documentation/Metal/Reference/MTLRenderPassAttachmentDescriptor_Ref/index.html#//apple_ref/occ/instp/MTLRenderPassAttachmentDescriptor/storeAction\r\nMetal has also a setting for load action, this way it could avoid clearing the framebuffer. It would be nice to be supported too.\r\n\r\n- D3D11: http://msdn.microsoft.com/en-us/library/windows/desktop/hh404562(v=vs.85).aspx#discard_resources_and_resource_views\r\n\r\nThis could be a hint if hardware/backend doesn't support it. \r\n"},"comment":{"url":"https://api.github.com/repos/bkaradzic/bgfx/issues/comments/69539613","html_url":"https://github.com/bkaradzic/bgfx/issues/227#issuecomment-69539613","issue_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/227","id":69539613,"user":{"login":"attilaz","id":4198194,"avatar_url":"https://avatars.githubusercontent.com/u/4198194?v=3","gravatar_id":"","url":"https://api.github.com/users/attilaz","html_url":"https://github.com/attilaz","followers_url":"https://api.github.com/users/attilaz/followers","following_url":"https://api.github.com/users/attilaz/following{/other_user}","gists_url":"https://api.github.com/users/attilaz/gists{/gist_id}","starred_url":"https://api.github.com/users/attilaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attilaz/subscriptions","organizations_url":"https://api.github.com/users/attilaz/orgs","repos_url":"https://api.github.com/users/attilaz/repos","events_url":"https://api.github.com/users/attilaz/events{/privacy}","received_events_url":"https://api.github.com/users/attilaz/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T08:24:08Z","updated_at":"2015-01-12T08:24:08Z","body":"thanks. I will try it."}}