diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2014-08-07 17:54:04 +0200 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2014-08-07 17:54:04 +0200 |
commit | 76ebf39bcdec733bd11950ea8478c665878460a6 (patch) | |
tree | d758748fbbcb78dd9a36d347ff2f1b9b2799eb2a /src/lib.rs | |
parent | 5d997b618f1a16efb107028960b20e41a6b1bcce (diff) | |
parent | d2bd19bc21889e78c18bf64a570677e6330bbad0 (diff) | |
download | glutin-76ebf39bcdec733bd11950ea8478c665878460a6.tar.gz glutin-76ebf39bcdec733bd11950ea8478c665878460a6.zip |
Merge branch 'master' of https://github.com/tomaka/gl-init-rs
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 31 |
1 files changed, 27 insertions, 4 deletions
@@ -2,25 +2,48 @@ #![feature(globs)] #![unstable] +//! The purpose of this library is to provide an OpenGL context on as many +//! platforms as possible. +//! +//! # Building a window +//! +//! There are two ways to create a window: +//! +//! - Calling `Window::new()`. +//! - Calling `let builder = WindowBuilder::new()` then `builder.build()`. +//! +//! The first way is the simpliest way and will give you default values. +//! +//! The second way allows you to customize the way your window and GL context +//! will look and behave. + extern crate libc; pub use events::*; #[cfg(windows)] use winimpl = win32; -#[cfg(unix)] +#[cfg(target_os = "linux")] use winimpl = x11; +#[cfg(target_os = "macos")] +use winimpl = osx; -#[cfg(windows)] +#[cfg(target_os = "win32")] mod win32; -#[cfg(unix)] +#[cfg(target_os = "linux")] mod x11; +#[cfg(target_os = "macos")] +mod osx; #[allow(dead_code)] //mod egl; mod events; +#[cfg(not(target_os = "win32"), not(target_os = "linux"), not(target_os = "macos"))] +#[static_assert] +static this_platform_is_not_supposed: bool = false; + /// Identifier for a monitor. pub struct MonitorID(winimpl::MonitorID); @@ -99,7 +122,7 @@ impl WindowBuilder { /// /// # Example /// -/// ``` +/// ```ignore /// let window = Window::new().unwrap(); /// /// unsafe { window.make_current() }; |