docs.rs failed to build glutin-0.22.0-alpha3
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
glutin-0.32.3
The purpose of this library is to provide an OpenGL Context on as many
platforms as possible.
Building a WindowedContext<T>
A WindowedContext<T> is composed of a Window and an OpenGL
Context.
Due to some operating-system-specific quirks, glutin prefers control over
the order of creation of the Context and Window. Here is an example
of building a WindowedContext<T>:
# fn main() {
let el = glutin::event_loop::EventLoop::new();
let wb = glutin::window::WindowBuilder::new()
.with_title("Hello world!")
.with_inner_size(glutin::dpi::LogicalSize::new(1024.0, 768.0));
let windowed_context = glutin::ContextBuilder::new()
.build_windowed(wb, &el)
.unwrap();
# }
You can, of course, create a RawContext<T> separately from an existing
window, however that may result in an suboptimal configuration of the window
on some platforms. In that case use the unsafe platform-specific
[RawContextExt] available on unix operating systems and Windows.
You can also produce headless Contexts via the
[ContextBuilder::build_headless] function.