{"action":"created","issue":{"url":"https://api.github.com/repos/PistonDevelopers/gfx_text/issues/40","repository_url":"https://api.github.com/repos/PistonDevelopers/gfx_text","labels_url":"https://api.github.com/repos/PistonDevelopers/gfx_text/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/PistonDevelopers/gfx_text/issues/40/comments","events_url":"https://api.github.com/repos/PistonDevelopers/gfx_text/issues/40/events","html_url":"https://github.com/PistonDevelopers/gfx_text/pull/40","id":136682295,"number":40,"title":"Update to gfx 0.9.1","user":{"login":"guycook","id":3148046,"avatar_url":"https://avatars.githubusercontent.com/u/3148046?v=3","gravatar_id":"","url":"https://api.github.com/users/guycook","html_url":"https://github.com/guycook","followers_url":"https://api.github.com/users/guycook/followers","following_url":"https://api.github.com/users/guycook/following{/other_user}","gists_url":"https://api.github.com/users/guycook/gists{/gist_id}","starred_url":"https://api.github.com/users/guycook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guycook/subscriptions","organizations_url":"https://api.github.com/users/guycook/orgs","repos_url":"https://api.github.com/users/guycook/repos","events_url":"https://api.github.com/users/guycook/events{/privacy}","received_events_url":"https://api.github.com/users/guycook/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-26T12:14:02Z","updated_at":"2016-02-26T14:12:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PistonDevelopers/gfx_text/pulls/40","html_url":"https://github.com/PistonDevelopers/gfx_text/pull/40","diff_url":"https://github.com/PistonDevelopers/gfx_text/pull/40.diff","patch_url":"https://github.com/PistonDevelopers/gfx_text/pull/40.patch"},"body":"Fixes #37\r\n\r\nThis isn't quite ready to merge yet, I think it's ok except for one issue - draw isn't generic over the RenderTargetView format, i.e if in example/style.rs you try to init with an Srgb8 output format it won't build.\r\n\r\nI'm not sure what the right approach is here, paging @kvark, @sectopod"},"comment":{"url":"https://api.github.com/repos/PistonDevelopers/gfx_text/issues/comments/189296166","html_url":"https://github.com/PistonDevelopers/gfx_text/pull/40#issuecomment-189296166","issue_url":"https://api.github.com/repos/PistonDevelopers/gfx_text/issues/40","id":189296166,"user":{"login":"kvark","id":107301,"avatar_url":"https://avatars.githubusercontent.com/u/107301?v=3","gravatar_id":"","url":"https://api.github.com/users/kvark","html_url":"https://github.com/kvark","followers_url":"https://api.github.com/users/kvark/followers","following_url":"https://api.github.com/users/kvark/following{/other_user}","gists_url":"https://api.github.com/users/kvark/gists{/gist_id}","starred_url":"https://api.github.com/users/kvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvark/subscriptions","organizations_url":"https://api.github.com/users/kvark/orgs","repos_url":"https://api.github.com/users/kvark/repos","events_url":"https://api.github.com/users/kvark/events{/privacy}","received_events_url":"https://api.github.com/users/kvark/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T14:12:52Z","updated_at":"2016-02-26T14:12:52Z","body":"@guycook Nice work!\r\n\r\nI see the problem with the output format. There can be several solutions:\r\n  1. Have the whole `Renderer` generic over the output format. Is it supposed to be drawing to surfaces of different formats?\r\n  2. Have 2 separate functions for `Rgba8` and `Srgba8`, which use different PSOs.\r\n  3. Have a map of `output_format -> PSO` in either a typed form (`AnyMap`? Haven't used it so I don't know), or raw form:\r\n```rust\r\npub fn draw<T: gfx::format::RenderFormat>(..., target: gfx::RenderTargetView<R, T>) {\r\n    use gfx::core::factory::Typed;\r\n    self.draw_raw(..., target.raw(), T::get_format());\r\n}\r\nfn draw_raw(..., target: gfx::RawRenderTargetView<R>, format: gfx::format::Format) {\r\n    // have a map of `Format -> PSO`, pick the PSO from there and draw\r\n}\r\n```\r\n"}}