From the ARB_create_context_profile standard:
On failure glXCreateContextAttribsARB returns NULL and generates an
X error with extended error information.
Some NVIDIA drivers on Linux won't return a core profile. When they don't,
they're supposed to return NULL as well as generate an X error, but they
only generate an X error and return a non-NULL, garbage context. This is
not only nonstandard behavior, but lame. It's a major pain to check for X
errors. But whatever, NVIDIA, you big old gorilla.
This may or may not fix segfaults some people are having with Pict3D. If
it does, they won't have to use (current-pict3d-legacy? #t) anymore.
Allocation rules:
* Use `as-gtk-allocation' when creating a Gtk widget that is the main
container for a given window<%> object. When the resulting
reference becomes unreachable, the widget will be released with
gtk_widget_destroy() through a finalizer.
* Use `atomically' to create and attach a sub-widget within the main
widget. Don't use gtk_widget_destroy(); the containing widget will
destroy the enclosing widget.
* For temporary objects, use `atomically' to wrap both the allocation
and release.
Every call to a function whose name contains "new" needs to be in one
of those cases.