Function Open-Window

Part of:

package glfw
( open-window &optional (width 0) (height 0) (redbits 0) (greenbits 0) (bluebits 0) (alphabits 0) (depthbits 0) (stencilbits 0) (mode +window+) )
width
The width of the window. If width is zero, it will be calculated as width = 4/3 height, if height is
not zero. If both width and height are zero, then width will be set to 640.
height
The height of the window. If height is zero, it will be calculated as height = 3/4 width, if width is
not zero. If both width and height are zero, then height will be set to 480.
redbits, greenbits, bluebits
The number of bits to use for each color component of the color buffer (0 means default color
depth). For instance, setting redbits=5, greenbits=6, and bluebits=5 will generate a 16-bit color
buffer, if possible.
alphabits
The number of bits to use for the alpha buffer (0 means no alpha buffer).
depthbits
The number of bits to use for the depth buffer (0 means no depth buffer).
stencilbits
The number of bits to use for the stencil buffer (0 means no stencil buffer).
mode
Selects which type of OpenGL™ window to use. mode can be either GLFW_WINDOW, which
will generate a normal desktop window, or GLFW_FULLSCREEN, which will generate a
window which covers the entire screen. When GLFW_FULLSCREEN is selected, the video
mode will be changed to the resolution that closest matches the width and height parameters.

Return values
If the function succeeds, t is returned.
If the function fails, nil is returned.

Description
The function opens a window that best matches the parameters given to the function. How well the
resulting window matches the desired window depends mostly on the available hardware and
OpenGL™ drivers. In general, selecting a fullscreen mode has better chances of generating a close
match than does a normal desktop window, since GLFW can freely select from all the available video
modes. A desktop window is normally restricted to the video mode of the desktop.

Notes
For additional control of window properties, see glfwOpenWindowHint.
In fullscreen mode the mouse cursor is hidden by default, and any system screensavers are prohibited
from starting. In windowed mode the mouse cursor is visible, and screensavers are allowed to start. To
change the visibility of the mouse cursor, use glfwEnable or glfwDisable with the argument
GLFW_MOUSE-CURSOR.
In order to determine the actual properties of an opened window, use glfwGetWindowParam and
glfwGetWindowSize (or glfwSetWindowSizeCallback).