#opengl #gl #graphics #gamedev

no-std gl33

Bindings to OpenGL 3.3 + GL_KHR_debug

7 releases

0.2.1 Mar 8, 2021
0.2.0 Mar 4, 2021
0.1.1 Sep 17, 2020
0.1.0 Aug 9, 2020
0.0.0 Jul 18, 2020

#820 in Graphics APIs

Download history 19/week @ 2023-12-04 26/week @ 2023-12-11 56/week @ 2023-12-18 34/week @ 2023-12-25 25/week @ 2024-01-01 32/week @ 2024-01-08 31/week @ 2024-01-15 28/week @ 2024-01-22 21/week @ 2024-01-29 22/week @ 2024-02-05 36/week @ 2024-02-12 41/week @ 2024-02-19 61/week @ 2024-02-26 52/week @ 2024-03-04 62/week @ 2024-03-11 50/week @ 2024-03-18

228 downloads per month
Used in 6 crates

Zlib OR Apache-2.0 OR MIT

2.5MB
10K SLoC

Contains (Windows DLL, 1.5MB) SDL2.dll

License:Zlib min-rust-1.34 crates.io docs.rs

gl33

Bindings to OpenGL 3.3

Stability

The gl33 crate presents OpenGL 3.3 bindings for Rust, as described by gl.xml.

It's very unlikely that an update to GL 3.3 would ever be released that would cause a breaking change.


lib.rs:

Makes the OpenGL 3.3 Core API (+GL_KHR_debug) available for use.

The crate's interface is provided as a "struct" style loader. Construct a GlFns using an appropriate get_proc_address function, and then call methods on your GlFns.

There's also a "global" style loader if the global_loader feature is enabled. This lets you load up functions pointers that can be freely accessed from anywhere.

Inlining

This crate does not use the #[inline] attribute. If you want full inlining just turn on Link-Time Optimization in your cargo profile:

[profile.release]
lto = "thin"

trace_caller

If the trace_caller feature is enables then this attribute is placed on any function that can panic. A panic will only happen if you call a function that is not loaded.

Dependencies