diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2014-09-22 09:53:36 +0200 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2014-09-22 09:53:36 +0200 |
commit | 07734275139d2e2abd0b800f9fd53871ffa88ceb (patch) | |
tree | b413bb12605c28ad91502bd5c2218e844d433965 /examples | |
parent | 795d04c123312a623306d1ddfa24f2becaa4bae3 (diff) | |
parent | 02ba9d33d75b6bb723f3d3f8d7090136956e4317 (diff) | |
download | glutin-07734275139d2e2abd0b800f9fd53871ffa88ceb.tar.gz glutin-07734275139d2e2abd0b800f9fd53871ffa88ceb.zip |
Merge pull request #42 from tomaka/rename-glutin
Rename crate to glutin
Diffstat (limited to 'examples')
-rw-r--r-- | examples/fullscreen.rs | 10 | ||||
-rw-r--r-- | examples/multiwindow.rs | 12 | ||||
-rw-r--r-- | examples/support/mod.rs | 4 | ||||
-rw-r--r-- | examples/window.rs | 6 |
4 files changed, 16 insertions, 16 deletions
diff --git a/examples/fullscreen.rs b/examples/fullscreen.rs index 1df5124..cbe0303 100644 --- a/examples/fullscreen.rs +++ b/examples/fullscreen.rs @@ -5,7 +5,7 @@ #[phase(plugin, link)] extern crate android_glue; -extern crate gl_init; +extern crate glutin; use std::io::stdio::stdin; @@ -17,21 +17,21 @@ android_start!(main) fn main() { // enumerating monitors let monitor = { - for (num, monitor) in gl_init::get_available_monitors().enumerate() { + for (num, monitor) in glutin::get_available_monitors().enumerate() { println!("Monitor #{}: {}", num, monitor.get_name()); } print!("Please write the number of the monitor to use: "); let num = from_str(stdin().read_line().unwrap().as_slice().trim()) .expect("Plase enter a number"); - let monitor = gl_init::get_available_monitors().nth(num).expect("Please enter a valid ID"); + let monitor = glutin::get_available_monitors().nth(num).expect("Please enter a valid ID"); println!("Using {}", monitor.get_name()); monitor }; - let window = gl_init::WindowBuilder::new() + let window = glutin::WindowBuilder::new() .with_title("Hello world!".to_string()) .with_fullscreen(monitor) .build() @@ -46,6 +46,6 @@ fn main() { context.draw_frame((0.0, 1.0, 0.0, 1.0)); window.swap_buffers(); - println!("{}", window.wait_events().collect::<Vec<gl_init::Event>>()); + println!("{}", window.wait_events().collect::<Vec<glutin::Event>>()); } } diff --git a/examples/multiwindow.rs b/examples/multiwindow.rs index 84af061..ad50312 100644 --- a/examples/multiwindow.rs +++ b/examples/multiwindow.rs @@ -5,7 +5,7 @@ #[phase(plugin, link)] extern crate android_glue; -extern crate gl_init; +extern crate glutin; mod support; @@ -13,9 +13,9 @@ mod support; android_start!(main) fn main() { - let window1 = gl_init::Window::new().unwrap(); - let window2 = gl_init::Window::new().unwrap(); - let window3 = gl_init::Window::new().unwrap(); + let window1 = glutin::Window::new().unwrap(); + let window2 = glutin::Window::new().unwrap(); + let window3 = glutin::Window::new().unwrap(); spawn(proc() { run(window1, (0.0, 1.0, 0.0, 1.0)); @@ -30,7 +30,7 @@ fn main() { }); } -fn run(window: gl_init::Window, color: (f32, f32, f32, f32)) { +fn run(window: glutin::Window, color: (f32, f32, f32, f32)) { unsafe { window.make_current() }; let context = support::load(&window); @@ -39,6 +39,6 @@ fn run(window: gl_init::Window, color: (f32, f32, f32, f32)) { context.draw_frame(color); window.swap_buffers(); - window.wait_events().collect::<Vec<gl_init::Event>>(); + window.wait_events().collect::<Vec<glutin::Event>>(); } } diff --git a/examples/support/mod.rs b/examples/support/mod.rs index 1dddfc3..31ccf1d 100644 --- a/examples/support/mod.rs +++ b/examples/support/mod.rs @@ -1,7 +1,7 @@ #[phase(plugin)] extern crate gl_generator; -use gl_init; +use glutin; #[cfg(not(target_os = "android"))] mod gl { @@ -18,7 +18,7 @@ pub struct Context { gl: gl::Gl } -pub fn load(window: &gl_init::Window) -> Context { +pub fn load(window: &glutin::Window) -> Context { let gl = gl::Gl::load_with(|symbol| window.get_proc_address(symbol)); let version = { diff --git a/examples/window.rs b/examples/window.rs index 66ca7ca..b2ad82e 100644 --- a/examples/window.rs +++ b/examples/window.rs @@ -5,7 +5,7 @@ #[phase(plugin, link)] extern crate android_glue; -extern crate gl_init; +extern crate glutin; mod support; @@ -13,7 +13,7 @@ mod support; android_start!(main) fn main() { - let window = gl_init::Window::new().unwrap(); + let window = glutin::Window::new().unwrap(); unsafe { window.make_current() }; @@ -23,6 +23,6 @@ fn main() { context.draw_frame((0.0, 1.0, 0.0, 1.0)); window.swap_buffers(); - println!("{}", window.wait_events().collect::<Vec<gl_init::Event>>()); + println!("{}", window.wait_events().collect::<Vec<glutin::Event>>()); } } |