6 Initialization
(require sgl/init) | package: sgl |
Requiring the sgl/init library initializes platform-specific OpenGL state to help avoid crashes when OpenGL commands are incorrectly used without a current context. This library is required by sgl and sgl/gl, so it normally does not need to be required explicitly.
On Mac OS X, sgl/init checks whether any GL context is current, and if not, it creates a dummy context and sets it as the current context.