1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00
glfw/docs/compat.dox

190 lines
9.3 KiB
Plaintext
Raw Normal View History

/*!
@page compat Standards conformance
2013-03-12 13:57:38 -04:00
@tableofcontents
2014-09-18 09:03:29 -04:00
This guide describes the various API extensions used by this version of GLFW.
It lists what are essentially implementation details, but which are nonetheless
2014-09-18 09:03:29 -04:00
vital knowledge for developers intending to deploy their applications on a wide
range of machines.
2014-10-02 11:35:10 -04:00
The information in this guide is not a part of GLFW API, but merely
2014-09-18 09:03:29 -04:00
preconditions for some parts of the library to function on a given machine. Any
part of this information may change in future versions of GLFW and that will not
be considered a breaking API change.
@section compat_x11 X11 extensions, protocols and IPC standards
2014-09-18 09:03:29 -04:00
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 10:33:05 -04:00
[Inter-Client Communication Conventions Manual](http://www.tronche.com/gui/x/icccm/)
(ICCCM) and
2013-03-12 10:33:05 -04:00
[Extended Window Manager Hints](http://standards.freedesktop.org/wm-spec/wm-spec-latest.html)
(EWMH) standards.
2014-01-21 15:15:53 -05:00
GLFW uses the `_MOTIF_WM_HINTS` window property to support borderless windows.
If the running window manager does not support this property, the
`GLFW_DECORATED` hint will have no effect.
2013-03-12 10:33:05 -04:00
GLFW uses the ICCCM `WM_DELETE_WINDOW` protocol to intercept the user
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 10:33:05 -04:00
GLFW uses the EWMH `_NET_WM_PING` protocol, allowing the window manager notify
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.
2014-01-21 15:15:53 -05:00
GLFW uses the EWMH `_NET_WM_STATE_FULLSCREEN` window state to tell the window
manager to make the GLFW window full screen. If the running window manager does
not support this state, full screen windows may not work properly. GLFW has
a fallback code path in case this state is unavailable, but every window manager
behaves slightly differently in this regard.
GLFW uses the EWMH `_NET_WM_BYPASS_COMPOSITOR` window property to tell a
compositing window manager to un-redirect full screen GLFW windows. If the
running window manager uses compositing but does not support this property then
additional copying may be performed for each buffer swap of full screen windows.
2013-05-20 08:22:19 -04: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.
2014-01-21 14:54:42 -05:00
GLFW uses the
[X drag-and-drop protocol](http://www.freedesktop.org/wiki/Specifications/XDND/)
to provide file drop events. If the application originating the drag does not
support this protocol, drag and drop will not work.
GLFW uses the XInput 2 extension to provide sub-pixel cursor motion events. If
the running X server does not support this version of this extension, cursor
motion will be snapped to the pixel grid.
GLFW uses the XRandR 1.3 extension to provide multi-monitor support. If the
running X server does not support this version of this extension, multi-monitor
support will not function and only a single, desktop-spanning monitor will be
reported.
GLFW uses the XRandR 1.3 and Xf86vidmode extensions to provide gamma ramp
support. If the running X server does not support either or both of these
extensions, gamma ramp support will not function.
2014-12-11 07:54:03 -05:00
GLFW uses the Xkb extension and detectable auto-repeat to provide keyboard
2014-04-23 07:30:11 -04:00
input. If the running X server does not support this extension, a non-Xkb
fallback path is used.
2014-09-18 09:03:29 -04: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.
2014-09-18 09:03:29 -04:00
GLFW uses the GLX 1.3 `GLXFBConfig` functions to enumerate and select framebuffer pixel
formats. If GLX 1.3 is not supported, @ref glfwInit will fail.
2013-03-12 10:33:05 -04:00
GLFW uses the `GLX_MESA_swap_control,` `GLX_EXT_swap_control` and
`GLX_SGI_swap_control` extensions to provide vertical retrace synchronization
2015-01-11 12:25:54 -05:00
(or _vsync_), in that order of preference. Where none of these extension are
available, calling @ref glfwSwapInterval will have no effect.
2013-03-12 10:33:05 -04: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-03-12 10:33:05 -04:00
GLFW uses the `GLX_ARB_create_context` extension when available, even when
creating OpenGL contexts of version 2.1 and below. Where this extension is
2013-03-12 10:33:05 -04: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
2015-08-23 13:30:04 -04:00
`GLFW_OPENGL_FORWARD_COMPAT` hints to `GLFW_TRUE` will cause @ref
glfwCreateWindow to fail.
2013-03-12 10:33:05 -04:00
GLFW uses the `GLX_ARB_create_context_profile` extension to provide support for
context profiles. Where this extension is unavailable, setting the
2015-01-17 19:55:25 -05:00
`GLFW_OPENGL_PROFILE` hint to anything but `GLFW_OPENGL_ANY_PROFILE`, or setting
`GLFW_CLIENT_API` to anything but `GLFW_OPENGL_API` will cause @ref
glfwCreateWindow to fail.
GLFW uses the `GLX_ARB_context_flush_control` extension to provide control over
whether a context is flushed when it is released (made non-current). Where this
extension is unavailable, the `GLFW_CONTEXT_RELEASE_BEHAVIOR` hint will have no
effect and the context will always be flushed when released.
GLFW uses the `GLX_ARB_framebuffer_sRGB` and `GLX_EXT_framebuffer_sRGB`
extensions to provide support for sRGB framebuffers. Where both of these
extensions are unavailable, the `GLFW_SRGB_CAPABLE` hint will have no effect.
@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 10:33:05 -04: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
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 10:33:05 -04:00
GLFW uses the `WGL_EXT_swap_control` extension to provide vertical retrace
2015-01-11 12:25:54 -05:00
synchronization (or _vsync_). Where this extension is unavailable, calling @ref
glfwSwapInterval will have no effect.
2013-03-12 10:33:05 -04:00
GLFW uses the `WGL_ARB_pixel_format` and `WGL_ARB_multisample` extensions to
create contexts with multisampling anti-aliasing. Where these extensions are
2013-03-12 10:33:05 -04:00
unavailable, the `GLFW_SAMPLES` hint will have no effect.
2013-03-12 10:33:05 -04:00
GLFW uses the `WGL_ARB_create_context` extension when available, even when
creating OpenGL contexts of version 2.1 and below. Where this extension is
2013-03-12 10:33:05 -04: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
2015-08-23 13:30:04 -04:00
`GLFW_OPENGL_FORWARD_COMPAT` hints to `GLFW_TRUE` will cause @ref
glfwCreateWindow to fail.
2013-03-12 10:33:05 -04:00
GLFW uses the `WGL_ARB_create_context_profile` extension to provide support for
context profiles. Where this extension is unavailable, setting the
2015-01-17 19:55:25 -05:00
`GLFW_OPENGL_PROFILE` hint to anything but `GLFW_OPENGL_ANY_PROFILE` will cause
@ref glfwCreateWindow to fail.
GLFW uses the `WGL_ARB_context_flush_control` extension to provide control over
whether a context is flushed when it is released (made non-current). Where this
extension is unavailable, the `GLFW_CONTEXT_RELEASE_BEHAVIOR` hint will have no
effect and the context will always be flushed when released.
GLFW uses the `WGL_ARB_framebuffer_sRGB` and `WGL_EXT_framebuffer_sRGB`
extensions to provide support for sRGB framebuffers. Where both of these
extension are unavailable, the `GLFW_SRGB_CAPABLE` hint will have no effect.
@section compat_osx OpenGL 3.2 and later on OS X
Support for OpenGL 3.2 and above was introduced with OS X 10.7 and even then
only forward-compatible, core profile contexts are supported. Support for
OpenGL 4.1 was introduced with OS X 10.9, also limited to forward-compatible,
core profile contexts. There is also still no mechanism for requesting debug
contexts. Versions of Mac OS X earlier than 10.7 support at most OpenGL
version 2.1.
Because of this, on OS X 10.7 and later, the `GLFW_CONTEXT_VERSION_MAJOR` and
`GLFW_CONTEXT_VERSION_MINOR` hints will cause @ref glfwCreateWindow to fail if
given version 3.0 or 3.1, the `GLFW_OPENGL_FORWARD_COMPAT` hint must be set to
2015-08-23 13:30:04 -04:00
`GLFW_TRUE` and the `GLFW_OPENGL_PROFILE` hint must be set to
`GLFW_OPENGL_CORE_PROFILE` when creating OpenGL 3.2 and later contexts and the
`GLFW_OPENGL_DEBUG_CONTEXT` hint is ignored.
2013-03-12 10:33:05 -04: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,
setting the `GLFW_OPENGL_PROFILE` or `GLFW_OPENGL_FORWARD_COMPAT` hints to
a non-default value will cause @ref glfwCreateWindow to fail and the
`GLFW_OPENGL_DEBUG_CONTEXT` hint is ignored.
*/