Crate gl33[][src]

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 “gl_get_proc_address” function and then call its methods.

There’s also a “global” style loader if the global_loader feature is enabled.

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_core_types
gl_enumerations
gl_groups
global_loader

Structs

GlFns

A struct that holds all the functions to use OpenGL 3.3 Core.