Implement headless rendering

This commit is contained in:
Tomaka17 2014-10-04 19:17:02 +02:00
parent cfb0cb7001
commit e565bfeb13
17 changed files with 791 additions and 518 deletions

View file

@ -12,6 +12,10 @@ mod support;
#[cfg(target_os = "android")]
android_start!(main)
#[cfg(not(feature = "window"))]
fn main() { println!("This example requires glutin to be compiled with the `window` feature"); }
#[cfg(feature = "window")]
fn main() {
let window1 = glutin::Window::new().unwrap();
let window2 = glutin::Window::new().unwrap();
@ -30,6 +34,7 @@ fn main() {
});
}
#[cfg(feature = "window")]
fn run(window: glutin::Window, color: (f32, f32, f32, f32)) {
unsafe { window.make_current() };