12 releases (5 breaking)
✓ Uses Rust 2018 edition
|0.8.0||Sep 29, 2019|
|0.6.0||Sep 12, 2019|
|0.2.4||Jul 26, 2018|
|0.1.1||Oct 1, 2017|
#58 in Graphics APIs
225 downloads per month
Used in 5 crates (3 directly)
This is the base, abstract crate for windowing common types and functions in luminance. The
luminance crate provides you with abstracting over OpenGL, but it doesn’t give you a way to
create an OpenGL context. This is due to the fact that creating and managing OpenGL contexts is
tightly related to the type of application you target. Typical PC applications might need
something like GLFW or glutin whilst others will directly bind to X11 or Windows
API. Several crates –
luminance-* – exist to solve that problem. They all provide a
different implementation for a simple need: opening an OpenGL context, opening a window and
manage events. In theory, you could even have a
luminance-qt to embed
luminance in surfaces in those libraries.
This crate exposes several important types that all backends must use. Among them, you’ll find:
WindowDim: abstraction over the dimension of a window and its mode (windowed, fullscreen, fullscreen restricted).
WindowOpt: an opaque type giving access to hints to customize the window integration, such as whether the cursor should be hidden or not.
Device trait must be implemented by a backend so that an application is completely
agnostic of the backend. This trait defines several basic methods that will help you to:
- Retrieve the dimension of the window / framebuffer.
- Iterate over the system events captured by your application.
- Draw and swap the buffer chain.