Crate glutin [stability]
[-] [+]
[src]
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()thenbuilder.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.
Features
This crate has two Cargo features: window and headless.
windowallows you to create regular windows and enables theWindowBuilderobject.headlessallows you to do headless rendering, and enables theHeadlessRendererBuilderobject.
By default only window is enabled.
Structs
| AvailableMonitorsIter | An iterator for the list of available monitors. |
| MonitorID | Identifier for a monitor. |
| PixelFormat | Describes a possible format. Unused. |
| PollEventsIterator | An iterator for the |
| WaitEventsIterator | An iterator for the |
| Window | Represents an OpenGL context and the Window or environment around it. |
| WindowBuilder | Object that allows you to build windows. |
| WindowProxy | Represents a thread safe subset of operations that can be called on a window. This structure can be safely cloned and sent between threads. |
Enums
| Api | All APIs related to OpenGL that you can possibly get while using glutin. |
| CreationError | Error that can happen while creating a window or a headless renderer. |
| CursorState | Describes how glutin handles the cursor. |
| ElementState | |
| Event | |
| GlRequest | Describes the OpenGL API and version that are being requested when a context is created. |
| MouseButton | |
| MouseCursor | |
| NativeMonitorId | Native platform identifier for a monitor. Different platforms use fundamentally different types to represent a monitor ID. |
| VirtualKeyCode |
Functions
| get_available_monitors | Returns the list of all available monitors. |
| get_primary_monitor | Returns the primary monitor of the system. |
Type Definitions
| ScanCode |