[dependencies]
cgmath = "*"
-glium = "0.15.0"
-glutin = "0.6.2"
+glium = "0.16.0"
+glutin = "0.7.4"
genmesh = "0.4.1"
image = "0.12.0"
obj = { version = "0.5", features = ["usegenmesh"] }
[replace]
"backtrace:0.2.3" = { git = "https://github.com/badboy/backtrace-rs", branch = "emscripten-fix" }
+"glutin:0.7.4" = { path = "/home/bernie/src/glutin" }
+"glium:0.16.0" = { path = "/home/bernie/src/glium" }
[[bin]]
name = "mandelwow"
image.save(&mut output, image::ImageFormat::PNG).unwrap();
}
+fn gl_info(display : &glium::Display) {
+ let version = *display.get_opengl_version();
+ let api = match version {
+ glium::Version(glium::Api::Gl, _, _) => "OpenGL",
+ glium::Version(glium::Api::GlEs, _, _) => "OpenGL ES"
+ };
+ println!("{} context verson: {}", api, display.get_opengl_version_string());
+}
+
#[allow(non_camel_case_types)]
type em_callback_func = unsafe extern fn();
extern {
let _soundplayer = sound::start();
let display = glutin::WindowBuilder::new()
- .with_dimensions(300, 300)
+ .with_dimensions(600, 600)
//.with_fullscreen(glutin::get_primary_monitor())
.with_depth_buffer(24)
.with_vsync()
.build_glium()
.unwrap();
- let version = *display.get_opengl_version();
- let api = match version {
- glium::Version(glium::Api::Gl, _, _) => "OpenGL",
- glium::Version(glium::Api::GlEs, _, _) => "OpenGL ES"
- };
- println!("{} context verson: {}", api, display.get_opengl_version_string());
+ gl_info(&display);
let mandelwow_program = mandelwow::program(&display);
let bounding_box_program = bounding_box::solid_fill_program(&display);