- glium::texture::RawImage2d::from_raw_rgba_reversed(image.into_raw(), dimensions);
- let tex = glium::texture::CompressedSrgbTexture2d::new(display, image).unwrap();
+ image::load_from_memory_with_format(&include_bytes!("c64-font.png")[..], image::PNG)
+ .unwrap()
+ .to_luma();
+ let (w, h) = image.dimensions();
+ let image = glium::texture::RawImage2d {
+ data: std::borrow::Cow::from(image.into_raw()),
+ width: w,
+ height: h,
+ format: glium::texture::ClientFormat::U8,
+ };
+ let tex = glium::texture::Texture2d::with_format(
+ display,
+ image,
+ glium::texture::UncompressedFloatFormat::U8,
+ glium::texture::MipmapsOption::NoMipmap,
+ ).unwrap();