-
Notifications
You must be signed in to change notification settings - Fork 47
/
09_shader_modules.rs.diff
31 lines (28 loc) · 1.03 KB
/
09_shader_modules.rs.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- a/08_graphics_pipeline.rs
+++ b/09_shader_modules.rs
@@ -290,8 +290,27 @@ impl HelloTriangleApplication {
(swap_chain, images)
}
- fn create_graphics_pipeline(_device: &Arc<Device>) {
+ fn create_graphics_pipeline(
+ device: &Arc<Device>,
+ ) {
+ mod vertex_shader {
+ vulkano_shaders::shader! {
+ ty: "vertex",
+ path: "src/bin/09_shader_base.vert"
+ }
+ }
+
+ mod fragment_shader {
+ vulkano_shaders::shader! {
+ ty: "fragment",
+ path: "src/bin/09_shader_base.frag"
+ }
+ }
+ let _vert_shader_module = vertex_shader::Shader::load(device.clone())
+ .expect("failed to create vertex shader module!");
+ let _frag_shader_module = fragment_shader::Shader::load(device.clone())
+ .expect("failed to create fragment shader module!");
}
fn find_queue_families(surface: &Arc<Surface<Window>>, device: &PhysicalDevice) -> QueueFamilyIndices {