bjz/glfw-rs — pull request #221 by cmr (2014-09-10 04:54:49+00:00)
Title: Make get_proc_address less error-prone

This solves the (fairly common) error of forgetting to make a context current
before trying to load GL function pointers. It accomplishes this by using
moving get_proc_address to Window and using glfwGetCurrentContext to check if
that Window is current before actually loading the function. It adds a
Glfw::get_proc_address_raw that is as today but with a debug assertion that
there is a currently bound context.

The method on Window should be used, generally, though it will incur a slight
performance penalty (adds a branch, and glfwGetCurrentContext will do a TLS
fetch).