{"action":"created","issue":{"url":"https://api.github.com/repos/tomaka/vulkano/issues/291","repository_url":"https://api.github.com/repos/tomaka/vulkano","labels_url":"https://api.github.com/repos/tomaka/vulkano/issues/291/labels{/name}","comments_url":"https://api.github.com/repos/tomaka/vulkano/issues/291/comments","events_url":"https://api.github.com/repos/tomaka/vulkano/issues/291/events","html_url":"https://github.com/tomaka/vulkano/issues/291","id":179150437,"number":291,"title":"Compile, load and run GLSL at runtime","user":{"login":"Limeth","id":1978878,"avatar_url":"https://avatars.githubusercontent.com/u/1978878?v=3","gravatar_id":"","url":"https://api.github.com/users/Limeth","html_url":"https://github.com/Limeth","followers_url":"https://api.github.com/users/Limeth/followers","following_url":"https://api.github.com/users/Limeth/following{/other_user}","gists_url":"https://api.github.com/users/Limeth/gists{/gist_id}","starred_url":"https://api.github.com/users/Limeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Limeth/subscriptions","organizations_url":"https://api.github.com/users/Limeth/orgs","repos_url":"https://api.github.com/users/Limeth/repos","events_url":"https://api.github.com/users/Limeth/events{/privacy}","received_events_url":"https://api.github.com/users/Limeth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tomaka/vulkano/labels/status:%20workable","name":"status: workable","color":"fbca04"},{"url":"https://api.github.com/repos/tomaka/vulkano/labels/type:%20enhancement","name":"type: enhancement","color":"c5def5"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-09-26T06:42:26Z","updated_at":"2016-10-04T18:19:29Z","closed_at":null,"body":"I can currently transpile GLSL to SPIR-V at runtime via:\r\n```rust\r\n    let vs_spirv = glsl_to_spirv::compile(SHADER_VERTEX, ShaderType::Vertex)\r\n        .expect(\"failed to transpile the vertex shader\");\r\n    let fs_spirv = glsl_to_spirv::compile(SHADER_FRAGMENT, ShaderType::Fragment)\r\n        .expect(\"failed to transpile the fragment shader\");\r\n```\r\nThen, I [edited](https://github.com/Limeth/vulkano/commit/c919c2250f0ee748b500a1ec885bddb20959ef77#diff-4439a959368b9ae0576a673e3685c267R200) `vulkano-shaders` so I could do this:\r\n```rust\r\n    let vs = vulkano_shaders::load_spirv(vs_spirv, &device);\r\n    let fs = vulkano_shaders::load_spirv(fs_spirv, &device);\r\n```\r\nThe last thing I need, is to get the `main_entry_point` to run the shader, if I understand this correctly. I am willing to implement it myself, so it complies with the current code. Would you mind guiding me?"},"comment":{"url":"https://api.github.com/repos/tomaka/vulkano/issues/comments/251470016","html_url":"https://github.com/tomaka/vulkano/issues/291#issuecomment-251470016","issue_url":"https://api.github.com/repos/tomaka/vulkano/issues/291","id":251470016,"user":{"login":"Limeth","id":1978878,"avatar_url":"https://avatars.githubusercontent.com/u/1978878?v=3","gravatar_id":"","url":"https://api.github.com/users/Limeth","html_url":"https://github.com/Limeth","followers_url":"https://api.github.com/users/Limeth/followers","following_url":"https://api.github.com/users/Limeth/following{/other_user}","gists_url":"https://api.github.com/users/Limeth/gists{/gist_id}","starred_url":"https://api.github.com/users/Limeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Limeth/subscriptions","organizations_url":"https://api.github.com/users/Limeth/orgs","repos_url":"https://api.github.com/users/Limeth/repos","events_url":"https://api.github.com/users/Limeth/events{/privacy}","received_events_url":"https://api.github.com/users/Limeth/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T18:19:29Z","updated_at":"2016-10-04T18:19:29Z","body":"So `SpirvFileShaderLoader` itself will have to insert it into `GraphicsPipeline` or `GraphicsPipelineParams`, meaning that it will have to hold a reference to them, correct?"}}
{"actor":{"display_login":"Limeth"}}