Display a ground chunk with a given biome
This commit is contained in:
+8
-3
@@ -18,10 +18,15 @@ fn main() {
|
||||
// building the vertex and index buffers
|
||||
let vertex_buffer = support::load_ground(&display);
|
||||
|
||||
let image = image::load(Cursor::new(&include_bytes!("../opengl.png")),
|
||||
image::ImageFormat::Png).unwrap().to_rgba8();
|
||||
let image = image::load(
|
||||
Cursor::new(&include_bytes!("../grassGreen.jpg")),
|
||||
image::ImageFormat::Jpeg,
|
||||
)
|
||||
.unwrap()
|
||||
.to_rgba8();
|
||||
let image_dimensions = image.dimensions();
|
||||
let image = glium::texture::RawImage2d::from_raw_rgba_reversed(&image.into_raw(), image_dimensions);
|
||||
let image =
|
||||
glium::texture::RawImage2d::from_raw_rgba_reversed(&image.into_raw(), image_dimensions);
|
||||
let texture = glium::texture::SrgbTexture2d::new(&display, image).unwrap();
|
||||
|
||||
// the program
|
||||
|
||||
Reference in New Issue
Block a user