Crates.io | glutin |
lib.rs | glutin |
version | 0.32.1 |
source | src |
created_at | 2014-11-12 18:43:29.326539 |
updated_at | 2024-09-11 16:40:39.684997 |
description | Cross-platform OpenGL context provider. |
homepage | |
repository | https://github.com/rust-windowing/glutin |
max_upload_size | |
id | 70 |
size | 335,941 |
A low-level library for OpenGL context creation.
Join us in any of these:
Warning: These are examples for master
. You can find examples for
the latest released version here.
The examples use gl_generator
to
generate OpenGL bindings.
git clone https://github.com/rust-windowing/glutin
cd glutin
cargo run --example window
Glutin is an OpenGL context creation library, and doesn't directly provide OpenGL bindings for you.
For examples, please look here.
Note that glutin aims at being a low-level brick in your rendering infrastructure. You are encouraged to write another layer of abstraction between glutin and your application.
Glutin follows winit's MSRV policy.
Be sure to handle Android's lifecycle correctly when using a winit
window
by only creating a GL surface after winit
raises Event::Resumed
, and
destroy it again upon receiving Event::Suspended
. See this in action in the
android.rs
example.
To compile and run the Android example on your device,
install cargo-apk
and start the app using:
$ cargo apk r -p glutin_examples --example android