diff options
Diffstat (limited to 'examples/multiwindow.rs')
-rw-r--r-- | examples/multiwindow.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/multiwindow.rs b/examples/multiwindow.rs index ad50312..ab48b6b 100644 --- a/examples/multiwindow.rs +++ b/examples/multiwindow.rs @@ -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() }; |