Mercurial > touhou
diff examples/menu.rs @ 753:a662dddd4a2b
examples: Use array textures for enemy PNGs
This requires luminance 0.39.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 25 Feb 2020 21:03:44 +0100 |
parents | eab7dde1164f |
children |
line wrap: on
line diff
--- a/examples/menu.rs +++ b/examples/menu.rs @@ -6,7 +6,7 @@ use luminance::pixel::NormUnsigned; use luminance::render_state::RenderState; use luminance::shader::program::{Program, Uniform}; use luminance::tess::{Mode, TessBuilder}; -use luminance::texture::{Dim2, Flat}; +use luminance::texture::Dim2; use luminance_derive::{Semantics, Vertex, UniformInterface}; use luminance_glfw::{Action, Key, WindowEvent, GlfwSurface, Surface, WindowDim, WindowOpt}; use touhou::th06::pbg3; @@ -82,7 +82,7 @@ struct Vertex { #[derive(UniformInterface)] struct ShaderInterface { // the 'static lifetime acts as “anything” here - color_map: Uniform<&'static BoundTexture<'static, Flat, Dim2, NormUnsigned>>, + color_map: Uniform<&'static BoundTexture<'static, Dim2, NormUnsigned>>, #[uniform(name = "mvp")] mvp: Uniform<[[f32; 4]; 4]>, @@ -136,6 +136,7 @@ fn main() { let mut background = match background { LoadedTexture::Rgb(tex) => tex, LoadedTexture::Rgba(tex) => unreachable!(), + LoadedTexture::RgbaArray(tex) => unreachable!(), }; // set the uniform interface to our type so that we can read textures from the shader