chickadee » glfw3 » make-window

make-window WIDTH HEIGHT NAME #!key (fullscreen? #f) (swap-interval 1) resizable visible decorated red-bits green-bits blue-bits alpha-bits depth-bits stencil-bits accum-red-bits accum-green-bits accum-blue-bits accum-alpha-bits aux-buffers samples refresh-rate sterio srgb-capable client-api context-version-major context-version-minor context-robustness opengl-forward-compat opengl-debug-context opengl-profileprocedure

Create a window with title string NAME and dimensions WIDTH by HEIGHT. The keys correspond to the available GLFW window hints. resizable, visible, decorated, stereo, srgb-capable, opengl-forward-compat, opengl-debug-context accept boolean arguments, while all other accept either an integer or an appropriate GLFW constant as per the documentation.

Sets the current context to the window that was created. The swap interval of the window is set to the value of theswap-interval key. Finally, this initializes all of the window-specific callbacks.

When using with OS X, make sure you ask for the right context. Only OS X 10.7+ support core contexts, and only limited contexts are supported. See the GLFW FAQ. For instance:

(make-window WIDTH HEIGHT NAME
             context-version-major: 3
             context-version-minor: 2
             opengl-forward-compat: #t
             opengl-profile: +opengl-core-profile+)