Unsigned textures silently fail with Intel... &#@@?!
.with_srgb(Some(true))
.with_title(format!("MandelWow"))
.build_glium()
.with_srgb(Some(true))
.with_title(format!("MandelWow"))
.build_glium()
+ //.build_glium_debug(glium::debug::DebugCallbackBehavior::PrintAll)
.unwrap();
gl_info(&display);
.unwrap();
gl_info(&display);
implement_vertex!(Vertex, position, tex_coords);
pub struct Text<'a> {
implement_vertex!(Vertex, position, tex_coords);
pub struct Text<'a> {
- tex: texture::UnsignedTexture2d,
+ tex: texture::Texture2d,
vertex_buffer: glium::VertexBuffer<Vertex>,
index_buffer: glium::IndexBuffer<u16>,
program: glium::Program,
vertex_buffer: glium::VertexBuffer<Vertex>,
index_buffer: glium::IndexBuffer<u16>,
program: glium::Program,
height: h,
format: glium::texture::ClientFormat::U8,
};
height: h,
format: glium::texture::ClientFormat::U8,
};
- let tex = glium::texture::UnsignedTexture2d::with_format(
+ let tex = glium::texture::Texture2d::with_format(
- glium::texture::UncompressedUintFormat::U8,
+ glium::texture::UncompressedFloatFormat::U8,
glium::texture::MipmapsOption::NoMipmap,
).unwrap();
glium::texture::MipmapsOption::NoMipmap,
).unwrap();
// Characters are arranged in a 16x16 square.
int xpos = index % 16;
int ypos = index / 16;
// Characters are arranged in a 16x16 square.
int xpos = index % 16;
int ypos = index / 16;
- v_tex_coords = (tex_coords) / 16.0 + vec2(xpos / 16., ypos / 16.);
+ v_tex_coords = (tex_coords + vec2(xpos, ypos)) / 16.;
}
",
fragment: "
#version 140
}
",
fragment: "
#version 140
- uniform usampler2D tex;
uniform vec4 bgcolor;
uniform vec4 fgcolor;
uniform vec4 bgcolor;
uniform vec4 fgcolor;