▼ |  | GL: 3-D Graphics

1 | Using Open GL
2 | C-Style Open GL
3 | Racket-Style Open GL
4 | Open GL Vectors
5 | Bitmaps
6 | Initialization
| Index

top ← prev up next →

### 6`` Initialization

( require sgl/init )

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.

top ← prev up next →