Mercurial > touhou
comparison examples/eclrenderer.rs @ 717:d5d5496e4e53
examples: Propagate image loading errors.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 23 Sep 2019 14:01:35 +0200 |
parents | 5016c09e5d7c |
children | 0a250ddfae79 |
comparison
equal
deleted
inserted
replaced
716:5016c09e5d7c | 717:d5d5496e4e53 |
---|---|
131 let vertices: [Vertex; 4] = unsafe { std::mem::uninitialized() }; | 131 let vertices: [Vertex; 4] = unsafe { std::mem::uninitialized() }; |
132 | 132 |
133 let mut surface = GlfwSurface::new(WindowDim::Windowed(384, 448), "Touhou", WindowOpt::default()).unwrap(); | 133 let mut surface = GlfwSurface::new(WindowDim::Windowed(384, 448), "Touhou", WindowOpt::default()).unwrap(); |
134 | 134 |
135 // Open the image atlas matching this ANM. | 135 // Open the image atlas matching this ANM. |
136 let tex = load_anm_image(&mut surface, &anm0.borrow(), anm_filename); | 136 let tex = load_anm_image(&mut surface, &anm0.borrow(), anm_filename).expect("image loading"); |
137 | 137 |
138 // set the uniform interface to our type so that we can read textures from the shader | 138 // set the uniform interface to our type so that we can read textures from the shader |
139 let program = | 139 let program = |
140 Program::<Semantics, (), ShaderInterface>::from_strings(None, VS, None, FS).expect("program creation").ignore_warnings(); | 140 Program::<Semantics, (), ShaderInterface>::from_strings(None, VS, None, FS).expect("program creation").ignore_warnings(); |
141 | 141 |