最終更新日16 Nov 2015 06:48


void glfwOpenWindowHint( int target, int hint )
Name Default Description
GLFW_REFRESH_RATE 0 Vertical monitor refresh rate in Hz (only usedfor fullscreen windows). Zero means systemdefault.
GLFW_ACCUM_RED_BITS 0 Number of bits for the red channel of the accumulation buffer.
GLFW_ACCUM_GREEN_BITS 0 Number of bits for the green channel of theaccumulation buffer.
GLFW_ACCUM_BLUE_BITS 0 Number of bits for the blue channel of the accumulation buffer.
GLFW_ACCUM_ALPHA_BITS 0 Number of bits for the alpha channel of theaccumulation buffer.
GLFW_AUX_BUFFERS 0 Number of auxiliary buffers.
GLFW_STEREO GL_FALSE Specify if stereo rendering should be supported (can be GL_TRUE or GL_FALSE).
GLFW_WINDOW_NO_RESIZE GL_FALSE Specify whether the window can be resizedby the user (not used for fullscreen windows).
GLFW_FSAA_SAMPLES 0 マルチサンプリングバッファに使うサンプルの数。 デフォルトは0つまり、マルチサンプル無効になっている
GLFW_OPENGL_VERSION_MAJOR 1 Major number of the desired minimumOpenGL
GLFW_OPENGL_VERSION_MINOR 1 Minor number of the desired minimum
GLFW_OPENGL_FORWARD_COMPAT GL_FALSE Specify whether the OpenGLcontextshould be forward-compatible (i.e. disallowlegacy functionality). This should only beused when requesting OpenGLRversion 3.0or above.
GLFW_OPENGL_DEBUG_CONTEXT GL_FALSE Specify whether a debug context should becreated.
GLFW_OPENGL_PROFILE 0 The OpenGLRprofile the contextshould implement, or zero to let thesystem choose. Available profiles areGLFW_OPENGL_CORE_PROFILE andGLFW_OPENGL_COMPAT_PROFILE.

Table 3.1: Targets for glfwOpenWindowHintGLFW Reference Manual API version 2.7 Page 11/64
Can be any of the tokens in the table 3.1.
An integer giving the value of the corresponding token (see table 3.1).
Return values
This function sets additional properties for a window that is to be opened. For a hint to take effect, it
must be set before calling glfwOpenWindow. When glfwOpenWindow is called, regardless of
whether it succeeds, all window hints are reset to their default values.
All window hints are reset to their default values by each successful call to glfwInit and by each call to
glfwOpenWindow, whether successful or not.
In order to determine the actual properties of an opened window, use glfwGetWindowParam (after the
window has been opened).
GLFW_STEREO is a hard constraint. If stereo rendering is requested, but no stereo rendering capable
pixel formats / framebuffer configs are available, glfwOpenWindow will fail.
The GLFW_REFRESH_RATE hint should be used with caution. Most systems have default values for
monitor refresh rates that are optimal for the specific system. Specifying the refresh rate can override
these settings, which can result in suboptimal operation. The monitor may be unable to display the
resulting video signal, or in the worst case it may even be damaged!
The GLFW_WINDOW_NO_RESIZE hint applies only to manual resizing by the user. A window
created with this hint enabled can still be resized by the application by calling glfwSetWindowSize.
the OpenGL
version that the created context must be compatible with, not the exact version to use. It
is therefore perfectly safe to use the default of version 1.1 for legacy code and you will still get
backwards-compatible contexts of version 3.0 and above when available.
To make the behavior of the above version hints consistent across both modern and legacy drivers,
glfwOpenWindow will fail if the modern creation mechanism (as specified in
WGL_ARB_create_context and GLX_ARB_create_context) is unavailable and the created context
is of a version lower than the one that was requested.
At the time of release, the exact meaning of what a "debug context" is (as created using the
GLFW_OPENGL_DEBUG_CONTEXT hint) has yet to be defined by the Khronos ARB WG.GLFW Reference Manual API version 2.7 Page 12/64
For information on how the availability of different extensions affect the behavior of this function, see
appendix A.
For full details on the workings of the OpenGL
version, forward-compatibility and debug hints, see
the specifications for WGL_ARB_create_context and GLX_ARB_create_context, respectively. The
relevant GLFW hints map very closely to their platform-specific counterparts.