comparison examples/stdrenderer.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 2b2376811f46
children 0a250ddfae79
comparison
equal deleted inserted replaced
716:5016c09e5d7c 717:d5d5496e4e53
157 let mut stage_runner = StageRunner::new(Rc::new(RefCell::new(stage))); 157 let mut stage_runner = StageRunner::new(Rc::new(RefCell::new(stage)));
158 158
159 let mut surface = GlfwSurface::new(WindowDim::Windowed(384, 448), "Touhou", WindowOpt::default()).unwrap(); 159 let mut surface = GlfwSurface::new(WindowDim::Windowed(384, 448), "Touhou", WindowOpt::default()).unwrap();
160 160
161 // Open the image atlas matching this ANM. 161 // Open the image atlas matching this ANM.
162 let tex = load_anm_image(&mut surface, &anm0, anm_filename); 162 let tex = load_anm_image(&mut surface, &anm0, anm_filename).expect("image loading");
163 163
164 // set the uniform interface to our type so that we can read textures from the shader 164 // set the uniform interface to our type so that we can read textures from the shader
165 let program = 165 let program =
166 Program::<Semantics, (), ShaderInterface>::from_strings(None, VS, None, FS).expect("program creation").ignore_warnings(); 166 Program::<Semantics, (), ShaderInterface>::from_strings(None, VS, None, FS).expect("program creation").ignore_warnings();
167 167