{"action":"created","issue":{"url":"https://api.github.com/repos/tomaka/vulkano/issues/337","repository_url":"https://api.github.com/repos/tomaka/vulkano","labels_url":"https://api.github.com/repos/tomaka/vulkano/issues/337/labels{/name}","comments_url":"https://api.github.com/repos/tomaka/vulkano/issues/337/comments","events_url":"https://api.github.com/repos/tomaka/vulkano/issues/337/events","html_url":"https://github.com/tomaka/vulkano/issues/337","id":196734286,"number":337,"title":"Pipeline Instantiation: vertex_input: unable to infer enough type information about `_`","user":{"login":"minecrawler","id":1130708,"avatar_url":"https://avatars.githubusercontent.com/u/1130708?v=3","gravatar_id":"","url":"https://api.github.com/users/minecrawler","html_url":"https://github.com/minecrawler","followers_url":"https://api.github.com/users/minecrawler/followers","following_url":"https://api.github.com/users/minecrawler/following{/other_user}","gists_url":"https://api.github.com/users/minecrawler/gists{/gist_id}","starred_url":"https://api.github.com/users/minecrawler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minecrawler/subscriptions","organizations_url":"https://api.github.com/users/minecrawler/orgs","repos_url":"https://api.github.com/users/minecrawler/repos","events_url":"https://api.github.com/users/minecrawler/events{/privacy}","received_events_url":"https://api.github.com/users/minecrawler/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-20T17:38:11Z","updated_at":"2016-12-21T01:37:53Z","closed_at":"2016-12-21T01:37:53Z","body":"I use the [sample code from the triangle example](https://github.com/tomaka/vulkano/blob/master/examples/src/bin/triangle.rs#L278) (though the other ones aren't too different)\r\n\r\nI try to split up the whole initialization process and make it a bit easier to work with (since I have a specific setting in mind and only need certain configurations).\r\n\r\nSo, at the moment, I try to instantiate a new `GraphicsPipeline` object. Unfortunately, I get the error\r\n\r\n```\r\nerror[E0282]: unable to infer enough type information about `_`\r\n  --> src/renderer/graphics_pipeline_new.rs:70:27\r\n   |\r\n70 |             vertex_input: SingleBufferDefinition::new(),\r\n   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for `_`\r\n   |\r\n   = note: type annotations or generic parameter binding required\r\n```\r\n\r\nI tried to add the rest of the example code below, which solves the error, but I do not want to have the rendering loop in my graphics_pipeline module. So I tried to find out what might be the problem. I guess I need to add some `T` as in `vertex_input: SingleBufferDefinition::<T>::new(),`, but I do not understand what type I have to pass here. Could anyone please elaborate? I am sorry if this is  a stupid question..."},"comment":{"url":"https://api.github.com/repos/tomaka/vulkano/issues/comments/268410265","html_url":"https://github.com/tomaka/vulkano/issues/337#issuecomment-268410265","issue_url":"https://api.github.com/repos/tomaka/vulkano/issues/337","id":268410265,"user":{"login":"minecrawler","id":1130708,"avatar_url":"https://avatars.githubusercontent.com/u/1130708?v=3","gravatar_id":"","url":"https://api.github.com/users/minecrawler","html_url":"https://github.com/minecrawler","followers_url":"https://api.github.com/users/minecrawler/followers","following_url":"https://api.github.com/users/minecrawler/following{/other_user}","gists_url":"https://api.github.com/users/minecrawler/gists{/gist_id}","starred_url":"https://api.github.com/users/minecrawler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minecrawler/subscriptions","organizations_url":"https://api.github.com/users/minecrawler/orgs","repos_url":"https://api.github.com/users/minecrawler/repos","events_url":"https://api.github.com/users/minecrawler/events{/privacy}","received_events_url":"https://api.github.com/users/minecrawler/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T01:37:53Z","updated_at":"2016-12-21T01:37:53Z","body":"Ah, perfect. So I just have to create a new struct and call the `impl_vertex` macro on it\r\n\r\n```rust\r\nstruct Vertex { position: [f32; 2] }\r\nimpl_vertex!(Vertex, position);\r\n```\r\n\r\nand then pass it as type `SingleBufferDefinition::<Vertex>::new()`! I can work with that, thank you a lot!"}}
{"actor":{"display_login":"minecrawler"}}