comparison examples/common.rs @ 708:3954801b6299

examples: Update to luminance 0.32.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 08 Sep 2019 17:47:23 +0200
parents 987409d48991
children 2b2376811f46
comparison
equal deleted inserted replaced
707:987409d48991 708:3954801b6299
35 // shader (we’ll just use the default one) 35 // shader (we’ll just use the default one)
36 let tex = 36 let tex =
37 Texture::new(surface, [width, height], 0, &Sampler::default()).expect("luminance texture creation"); 37 Texture::new(surface, [width, height], 0, &Sampler::default()).expect("luminance texture creation");
38 38
39 // the first argument disables mipmap generation (we don’t care so far) 39 // the first argument disables mipmap generation (we don’t care so far)
40 tex.upload(GenMipmaps::No, &texels); 40 tex.upload(GenMipmaps::No, &texels).unwrap();
41 41
42 Some(LoadedTexture::Rgb(tex)) 42 Some(LoadedTexture::Rgb(tex))
43 } 43 }
44 44
45 Err(e) => { 45 Err(e) => {
79 // shader (we’ll just use the default one) 79 // shader (we’ll just use the default one)
80 let tex = 80 let tex =
81 Texture::new(surface, [width, height], 0, &Sampler::default()).expect("luminance texture creation"); 81 Texture::new(surface, [width, height], 0, &Sampler::default()).expect("luminance texture creation");
82 82
83 // the first argument disables mipmap generation (we don’t care so far) 83 // the first argument disables mipmap generation (we don’t care so far)
84 tex.upload(GenMipmaps::No, &texels); 84 tex.upload(GenMipmaps::No, &texels).unwrap();
85 85
86 Some(LoadedTexture::Rgba(tex)) 86 Some(LoadedTexture::Rgba(tex))
87 } 87 }
88 88
89 Err(e) => { 89 Err(e) => {