Crate gl46[][src]

Makes the OpenGL 4.6 Core API (plus some extensions) available for use.

The crate's interface is provided a "struct" style loader.

Construct a GlFns using an appropriate "gl_get_proc_address" function and then call its methods.

Extensions

Cargo Features

  • track_caller: Enables the track_caller attribute on any function that can panic. Specifically, the extension functions of the struct loader might not be loaded, and if you call them when they're not loaded you'll get a panic.

gl_get_proc_address

GL must generally be dynamically loaded at runtime. This is done via a function which we'll call "gl_get_proc_address". The expected operation of this function is very simple: The caller passes in the pointer to a null-terminated string with the name of a GL function, and gl_get_proc_address returns the pointer to that function.

The way that you get an appropriate gl_get_proc_address function is platform dependent.

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"

Re-exports

pub use gl_core_types::*;
pub use gl_enumerations::*;
pub use gl_groups::*;

Modules

gl_command_types
gl_core_types
gl_enumerations
gl_groups

Structs

GlFns