2013-02-25 13:09:57 +00:00
|
|
|
/*!
|
|
|
|
|
|
|
|
@page compat Standards conformance
|
|
|
|
|
2013-03-12 17:57:38 +00:00
|
|
|
@tableofcontents
|
|
|
|
|
2013-02-25 13:09:57 +00:00
|
|
|
This chapter describes the various API extensions used by this version of GLFW.
|
|
|
|
It lists what are essentially implementation details, but which are nonetheless
|
|
|
|
vital knowledge for developers wishing to deploy their applications on machines
|
|
|
|
with varied specifications.
|
|
|
|
|
|
|
|
Note that the information in this appendix is not a part of the API
|
|
|
|
specification but merely list some of the preconditions for certain parts of the
|
|
|
|
API to function on a given machine. As such, any part of it may change in
|
|
|
|
future versions without this being considered a breaking API change.
|
|
|
|
|
|
|
|
@section compat_wm ICCCM and EWMH conformance
|
|
|
|
|
|
|
|
As GLFW uses Xlib, directly, without any intervening toolkit
|
|
|
|
library, it has sole responsibility for interacting well with the many and
|
|
|
|
varied window managers in use on Unix-like systems. In order for applications
|
|
|
|
and window managers to work well together, a number of standards and
|
|
|
|
conventions have been developed that regulate behavior outside the scope of the
|
|
|
|
X11 API; most importantly the
|
2013-03-12 14:33:05 +00:00
|
|
|
[Inter-Client Communication Conventions Manual](http://www.tronche.com/gui/x/icccm/)
|
2013-02-25 13:09:57 +00:00
|
|
|
(ICCCM) and
|
2013-03-12 14:33:05 +00:00
|
|
|
[Extended Window Manager Hints](http://standards.freedesktop.org/wm-spec/wm-spec-latest.html)
|
2013-02-25 13:09:57 +00:00
|
|
|
(EWMH) standards.
|
|
|
|
|
2013-03-12 14:33:05 +00:00
|
|
|
GLFW uses the ICCCM `WM_DELETE_WINDOW` protocol to intercept the user
|
2013-02-25 13:09:57 +00:00
|
|
|
attempting to close the GLFW window. If the running window manager does not
|
|
|
|
support this protocol, the close callback will never be called.
|
|
|
|
|
2013-03-12 14:33:05 +00:00
|
|
|
GLFW uses the EWMH `_NET_WM_PING` protocol, allowing the window manager notify
|
2013-02-25 13:09:57 +00:00
|
|
|
the user when the application has stopped responding, i.e. when it has ceased to
|
|
|
|
process events. If the running window manager does not support this protocol,
|
|
|
|
the user will not be notified if the application locks up.
|
|
|
|
|
2013-03-12 14:33:05 +00:00
|
|
|
GLFW uses the EWMH `_NET_WM_STATE` protocol to tell the window manager to make
|
2013-04-10 21:01:12 +00:00
|
|
|
the GLFW window full screen. If the running window manager does not support this
|
|
|
|
protocol, full screen windows may not work properly. GLFW has a fallback code
|
2013-02-25 13:09:57 +00:00
|
|
|
path in case this protocol is unavailable, but every window manager behaves
|
|
|
|
slightly differently in this regard.
|
|
|
|
|
2013-05-20 12:22:19 +00:00
|
|
|
GLFW uses the
|
|
|
|
[clipboard manager protocol](http://www.freedesktop.org/wiki/ClipboardManager/)
|
|
|
|
to push a clipboard string (i.e. selection) owned by a GLFW window about to be
|
|
|
|
destroyed to the clipboard manager. If there is no running clipboard manager,
|
|
|
|
the clipboard string will be unavailable once the window has been destroyed.
|
|
|
|
|
2013-02-25 13:09:57 +00:00
|
|
|
@section compat_glx GLX extensions
|
|
|
|
|
|
|
|
The GLX API is the default API used to create OpenGL contexts on Unix-like
|
|
|
|
systems using the X Window System.
|
|
|
|
|
2013-03-12 14:33:05 +00:00
|
|
|
GLFW uses the `GLXFBConfig` API to enumerate and select framebuffer pixel
|
|
|
|
formats. This requires either GLX 1.3 or greater, or the `GLX_SGIX_fbconfig`
|
2013-02-25 13:09:57 +00:00
|
|
|
extension. Where both are available, the SGIX extension is preferred. If
|
|
|
|
neither is available, GLFW will be unable to create windows.
|
|
|
|
|
2013-03-12 14:33:05 +00:00
|
|
|
GLFW uses the `GLX_MESA_swap_control,` `GLX_EXT_swap_control` and
|
|
|
|
`GLX_SGI_swap_control` extensions to provide vertical retrace synchronization
|
|
|
|
(or "vsync"), in that order of preference. Where none of these extension are
|
2013-02-25 13:09:57 +00:00
|
|
|
available, calling @ref glfwSwapInterval will have no effect.
|
|
|
|
|
2013-03-12 14:33:05 +00:00
|
|
|
GLFW uses the `GLX_ARB_multisample` extension to create contexts with
|
|
|
|
multisampling anti-aliasing. Where this extension is unavailable, the
|
|
|
|
`GLFW_SAMPLES` hint will have no effect.
|
2013-02-25 13:09:57 +00:00
|
|
|
|
2013-03-12 14:33:05 +00:00
|
|
|
GLFW uses the `GLX_ARB_create_context` extension when available, even when
|
2013-02-25 13:09:57 +00:00
|
|
|
creating OpenGL contexts of version 2.1 and below. Where this extension is
|
2013-03-12 14:33:05 +00:00
|
|
|
unavailable, the `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR`
|
|
|
|
hints will only be partially supported, the `GLFW_OPENGL_DEBUG_CONTEXT` hint
|
|
|
|
will have no effect, and setting the `GLFW_OPENGL_PROFILE` or
|
|
|
|
`GLFW_OPENGL_FORWARD_COMPAT` hints to a non-zero value will cause @ref
|
2013-02-25 13:09:57 +00:00
|
|
|
glfwCreateWindow to fail.
|
|
|
|
|
2013-03-12 14:33:05 +00:00
|
|
|
GLFW uses the `GLX_ARB_create_context_profile` extension to provide support for
|
|
|
|
context profiles. Where this extension is unavailable, setting the
|
|
|
|
`GLFW_OPENGL_PROFILE` hint to anything but zero, or setting `GLFW_CLIENT_API` to
|
|
|
|
anything but `GLFW_OPENGL_API` will cause @ref glfwCreateWindow to fail.
|
2013-02-25 13:09:57 +00:00
|
|
|
|
|
|
|
@section compat_wgl WGL extensions
|
|
|
|
|
|
|
|
The WGL API is used to create OpenGL contexts on Microsoft Windows and other
|
|
|
|
implementations of the Win32 API, such as Wine.
|
|
|
|
|
2013-03-12 14:33:05 +00:00
|
|
|
GLFW uses either the `WGL_EXT_extension_string` or the
|
|
|
|
`WGL_ARB_extension_string` extension to check for the presence of all other WGL
|
2013-02-25 13:09:57 +00:00
|
|
|
extensions listed below. If both are available, the EXT one is preferred. If
|
|
|
|
neither is available, no other extensions are used and many GLFW features
|
|
|
|
related to context creation will have no effect or cause errors when used.
|
|
|
|
|
2013-03-12 14:33:05 +00:00
|
|
|
GLFW uses the `WGL_EXT_swap_control` extension to provide vertical retrace
|
2013-04-10 21:01:12 +00:00
|
|
|
synchronization (or 'vsync'). Where this extension is unavailable, calling @ref
|
2013-02-25 13:09:57 +00:00
|
|
|
glfwSwapInterval will have no effect.
|
|
|
|
|
2013-03-12 14:33:05 +00:00
|
|
|
GLFW uses the `WGL_ARB_pixel_format` and `WGL_ARB_multisample` extensions to
|
2013-02-25 13:09:57 +00:00
|
|
|
create contexts with multisampling anti-aliasing. Where these extensions are
|
2013-03-12 14:33:05 +00:00
|
|
|
unavailable, the `GLFW_SAMPLES` hint will have no effect.
|
2013-02-25 13:09:57 +00:00
|
|
|
|
2013-03-12 14:33:05 +00:00
|
|
|
GLFW uses the `WGL_ARB_create_context` extension when available, even when
|
2013-02-25 13:09:57 +00:00
|
|
|
creating OpenGL contexts of version 2.1 and below. Where this extension is
|
2013-03-12 14:33:05 +00:00
|
|
|
unavailable, the `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR`
|
|
|
|
hints will only be partially supported, the `GLFW_OPENGL_DEBUG_CONTEXT` hint
|
|
|
|
will have no effect, and setting the `GLFW_OPENGL_PROFILE` or
|
|
|
|
`GLFW_OPENGL_FORWARD_COMPAT` hints to a non-zero value will cause @ref
|
2013-02-25 13:09:57 +00:00
|
|
|
glfwCreateWindow to fail.
|
|
|
|
|
2013-03-12 14:33:05 +00:00
|
|
|
GLFW uses the `WGL_ARB_create_context_profile` extension to provide support for
|
|
|
|
context profiles. Where this extension is unavailable, setting the
|
|
|
|
`GLFW_OPENGL_PROFILE` hint to anything but zero will cause @ref glfwCreateWindow
|
2013-02-25 13:09:57 +00:00
|
|
|
to fail.
|
|
|
|
|
2013-07-10 13:39:08 +00:00
|
|
|
@section compat_osx OpenGL 3.2 on OS X
|
2013-02-25 13:09:57 +00:00
|
|
|
|
2013-07-10 13:26:16 +00:00
|
|
|
Support for OpenGL 3.0 and above was introduced with OS X 10.7, and even then
|
|
|
|
only forward-compatible OpenGL 3.2 core profile contexts are supported. There
|
|
|
|
is also still no mechanism for requesting debug contexts. Versions of OS
|
|
|
|
X earlier than 10.7 support at most OpenGL version 2.1.
|
2013-02-25 13:09:57 +00:00
|
|
|
|
2013-07-10 13:26:16 +00:00
|
|
|
Because of this, on OS X 10.7, the `GLFW_CONTEXT_VERSION_MAJOR` and
|
2013-03-12 14:33:05 +00:00
|
|
|
`GLFW_CONTEXT_VERSION_MINOR` hints will fail if given a version above 3.2, the
|
|
|
|
`GLFW_OPENGL_FORWARD_COMPAT` is required for creating OpenGL 3.2 contexts, the
|
|
|
|
`GLFW_OPENGL_DEBUG_CONTEXT` hint is ignored and setting the
|
|
|
|
`GLFW_OPENGL_PROFILE` hint to anything except `GLFW_OPENGL_CORE_PROFILE` will
|
2013-02-25 13:09:57 +00:00
|
|
|
cause @ref glfwCreateWindow to fail.
|
|
|
|
|
2013-03-12 14:33:05 +00:00
|
|
|
Also, on Mac OS X 10.6 and below, the `GLFW_CONTEXT_VERSION_MAJOR` and
|
|
|
|
`GLFW_CONTEXT_VERSION_MINOR` hints will fail if given a version above 2.1, the
|
|
|
|
`GLFW_OPENGL_DEBUG_CONTEXT` hint will have no effect, and setting the
|
|
|
|
`GLFW_OPENGL_PROFILE` or `GLFW_OPENGL_FORWARD_COMPAT` hints to a non-zero value
|
2013-02-25 13:09:57 +00:00
|
|
|
will cause @ref glfwCreateWindow to fail.
|
|
|
|
|
|
|
|
*/
|