134 releases

0.32.3 Apr 30, 2025
0.32.2 Jan 12, 2025
0.32.1 Sep 11, 2024
0.32.0 Jun 8, 2024
0.0.2 Dec 30, 2014

#5 in Graphics APIs

Download history 235016/week @ 2025-10-26 217514/week @ 2025-11-02 201843/week @ 2025-11-09 250953/week @ 2025-11-16 206386/week @ 2025-11-23 245471/week @ 2025-11-30 232316/week @ 2025-12-07 250919/week @ 2025-12-14 156563/week @ 2025-12-21 134504/week @ 2025-12-28 267420/week @ 2026-01-04 284617/week @ 2026-01-11 371967/week @ 2026-01-18 391750/week @ 2026-01-25 346694/week @ 2026-02-01 267451/week @ 2026-02-08

1,400,525 downloads per month
Used in 857 crates (236 directly)

Apache-2.0

345KB
7K SLoC

glutin - OpenGL, UTilities, and INput

A low-level library for OpenGL context creation.

Docs.rs

Documentation

Contact Us

Join us in any of these:

Matrix Libera.Chat

Usage Examples

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.

Try it!

git clone https://github.com/rust-windowing/glutin
cd glutin
cargo run --example window

Usage

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.

Platform-specific notes

Android

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

Dependencies

~0.1–15MB
~134K SLoC