comparison examples/anmrenderer.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
130 fill_vertices(sprite.clone(), &mut vertices); 130 fill_vertices(sprite.clone(), &mut vertices);
131 131
132 let mut surface = GlfwSurface::new(WindowDim::Windowed(384, 448), "Touhou", WindowOpt::default()).unwrap(); 132 let mut surface = GlfwSurface::new(WindowDim::Windowed(384, 448), "Touhou", WindowOpt::default()).unwrap();
133 133
134 // Open the image atlas matching this ANM. 134 // Open the image atlas matching this ANM.
135 let tex = load_anm_image(&mut surface, &anm0, anm_filename); 135 let tex = load_anm_image(&mut surface, &anm0, anm_filename).expect("image loading");
136 136
137 // set the uniform interface to our type so that we can read textures from the shader 137 // set the uniform interface to our type so that we can read textures from the shader
138 let program = 138 let program =
139 Program::<Semantics, (), ShaderInterface>::from_strings(None, VS, None, FS).expect("program creation").ignore_warnings(); 139 Program::<Semantics, (), ShaderInterface>::from_strings(None, VS, None, FS).expect("program creation").ignore_warnings();
140 140