parent
98063d2957
commit
e248fb6056
8 changed files with 501 additions and 220 deletions
@ -1,40 +0,0 @@ |
||||
/*! |
||||
|
||||
@page hints Window hints |
||||
|
||||
These are all window hints. Some relate to the window itself, others to its |
||||
framebuffer or context. They are set to their default values each time the |
||||
library is initialized with @ref glfwInit, can be individually set with @ref |
||||
glfwWindowHint and reset all at once to their defaults with @ref |
||||
glfwDefaultWindowHints. |
||||
|
||||
Note that hints need to be set *before* the creation of the window you wish to |
||||
have the specified properties. |
||||
|
||||
| Name | Default values | Supported values | |
||||
| ---------------------------- | ------------------------ | ----------------------- | |
||||
| `GLFW_RESIZABLE` | `GL_TRUE` | `GL_TRUE` or `GL_FALSE` | |
||||
| `GLFW_VISIBLE` | `GL_TRUE` | `GL_TRUE` or `GL_FALSE` | |
||||
| `GLFW_RED_BITS` | 8 | 0 to `INT_MAX` | |
||||
| `GLFW_GREEN_BITS` | 8 | 0 to `INT_MAX` | |
||||
| `GLFW_BLUE_BITS` | 8 | 0 to `INT_MAX` | |
||||
| `GLFW_ALPHA_BITS` | 8 | 0 to `INT_MAX` | |
||||
| `GLFW_DEPTH_BITS` | 24 | 0 to `INT_MAX` | |
||||
| `GLFW_STENCIL_BITS` | 8 | 0 to `INT_MAX` | |
||||
| `GLFW_ACCUM_RED_BITS` | 0 | 0 to `INT_MAX` | |
||||
| `GLFW_ACCUM_GREEN_BITS` | 0 | 0 to `INT_MAX` | |
||||
| `GLFW_ACCUM_BLUE_BITS` | 0 | 0 to `INT_MAX` | |
||||
| `GLFW_ACCUM_ALPHA_BITS` | 0 | 0 to `INT_MAX` | |
||||
| `GLFW_AUX_BUFFERS` | 0 | 0 to `INT_MAX` | |
||||
| `GLFW_SAMPLES` | 0 | 0 to `INT_MAX` | |
||||
| `GLFW_STEREO` | `GL_FALSE` | `GL_TRUE` or `GL_FALSE` | |
||||
| `GLFW_SRGB_CAPABLE` | `GL_FALSE` | `GL_TRUE` or `GL_FALSE` | |
||||
| `GLFW_CLIENT_API` | `GLFW_OPENGL_API` | `GLFW_OPENGL_API` or `GLFW_OPENGL_ES_API` | |
||||
| `GLFW_CONTEXT_VERSION_MAJOR` | 1 | Any valid major version number of the chosen client API | |
||||
| `GLFW_CONTEXT_VERSION_MINOR` | 0 | Any valid minor version number of the chosen client API | |
||||
| `GLFW_CONTEXT_ROBUSTNESS` | `GLFW_NO_ROBUSTNESS` | `GLFW_NO_ROBUSTNESS`, `GLFW_NO_RESET_NOTIFICATION` or `GLFW_LOSE_CONTEXT_ON_RESET` | |
||||
| `GLFW_OPENGL_FORWARD_COMPAT` | `GL_FALSE` | `GL_TRUE` or `GL_FALSE` | |
||||
| `GLFW_OPENGL_DEBUG_CONTEXT` | `GL_FALSE` | `GL_TRUE` or `GL_FALSE` | |
||||
| `GLFW_OPENGL_PROFILE` | `GLFW_OPENGL_NO_PROFILE` | `GLFW_OPENGL_NO_PROFILE`, `GLFW_OPENGL_COMPAT_PROFILE` or `GLFW_OPENGL_CORE_PROFILE` | |
||||
|
||||
*/ |
@ -0,0 +1,124 @@ |
||||
/*! |
||||
|
||||
@page news New features |
||||
|
||||
@tableofcontents |
||||
|
||||
|
||||
@section news_30 New features in version 3.0 |
||||
|
||||
@subsection news_30_cmake CMake build system |
||||
|
||||
GLFW now uses the CMake build system instead of the various makefiles and |
||||
project files used by earlier versions. CMake is available for all platforms |
||||
supported by GLFW, is present in most package systems and can generate |
||||
makefiles and/or project files for most popular development environments. |
||||
|
||||
For more information on how to use CMake, see the |
||||
[CMake manual](http://cmake.org/cmake/help/documentation.html). |
||||
|
||||
|
||||
@subsection new_30_multiwnd Multi-window support |
||||
|
||||
GLFW now supports the creation of multiple windows, each with their own OpenGL |
||||
or OpenGL ES context, and all window functions now take a window handle. Event |
||||
callbacks are now per-window and are provided with the handle of the window that |
||||
received the event. The @ref glfwMakeContextCurrent function has been added to |
||||
select which context is current on a given thread. |
||||
|
||||
|
||||
@subsection news_30_multimon Multi-monitor support |
||||
|
||||
GLFW now explicitly supports multiple monitors. They can be enumerated with |
||||
@ref glfwGetMonitors, queried with @ref glfwGetVideoModes, @ref |
||||
glfwGetMonitorPos, @ref glfwGetMonitorName and @ref glfwGetMonitorPhysicalSize, |
||||
and specified at window creation to make the newly created window fullscren on |
||||
that specific monitor. |
||||
|
||||
|
||||
@subsection news_30_unicode Unicode support |
||||
|
||||
All string arguments to GLFW functions and all strings returned by GLFW use the |
||||
UTF-8 encoding. This includes the window title, error string, clipboard text, |
||||
monitor and joystick names as well as the extension function arguments (as ASCII |
||||
is a subset of UTF-8). |
||||
|
||||
|
||||
@subsection news_30_clipboard Clipboard text I/O |
||||
|
||||
GLFW now supports reading and writing plain text to and from the system |
||||
clipboard, with the @ref glfwGetClipboardString and @ref glfwSetClipboardString |
||||
functions. |
||||
|
||||
|
||||
@subsection news_30_gamma Gamma ramp support |
||||
|
||||
GLFW now supports setting and reading back the gamma ramp of monitors, with the |
||||
@ref glfwGetGammaRamp and @ref glfwSetGammaRamp functions. There is also @ref |
||||
glfwSetGamma, which generates a ramp from a gamma value and then sets it. |
||||
|
||||
|
||||
@subsection news_30_gles OpenGL ES and EGL support |
||||
|
||||
GLFW now supports the creation of OpenGL ES contexts, by setting the |
||||
`GLFW_CLIENT_API` window hint to `GLFW_OPENGL_ES_API`, where creation of such |
||||
contexts are supported. Note that GLFW *does not implement* OpenGL ES, so your |
||||
driver must provide support in a way usable by GLFW. Modern nVidia and Intel |
||||
drivers support creation of OpenGL ES context using the GLX and WGL APIs, while |
||||
AMD currently only provides an EGL implementation. |
||||
|
||||
GLFW now has an (experimental) EGL context creation backend, which can be |
||||
selected through CMake options. |
||||
|
||||
|
||||
@subsection news_30_error Error callback |
||||
|
||||
GLFW now has an error callback, which can provide your application with much |
||||
more detailed diagnostics than was previously possible. The callback is passed |
||||
an error code and a description string. |
||||
|
||||
|
||||
@subsection news_30_wndptr Per-window user pointer |
||||
|
||||
Each window object has a user-defined pointer, retrieved with @ref |
||||
glfwGetWindowUserPointer and set with @ref glfwSetWindowUserPointer, to make it |
||||
easier to integrate GLFW into C++ code. |
||||
|
||||
|
||||
@subsection news_30_iconifyfun Window iconification callback |
||||
|
||||
Each window object has a callback for iconification and restoration events, which is |
||||
set with @ref glfwSetWindowIconifyCallback. |
||||
|
||||
|
||||
@subsection news_30_wndposfun Window position callback |
||||
|
||||
Each window object has a callback for position events, which is set with @ref |
||||
glfwSetWindowPosCallback. |
||||
|
||||
|
||||
@subsection news_30_wndpos Window position query |
||||
|
||||
The position of a window can now be retrieved using @ref glfwGetWindowPos. |
||||
|
||||
|
||||
@subsection news_30_focusfun Window focus callback |
||||
|
||||
Windows now have a callback for focus events, which is set with @ref |
||||
glfwSetWindowFocusCallback. |
||||
|
||||
|
||||
@subsection news_30_wndtitle Initial window title |
||||
|
||||
The title of a window is now specified at creation time, as one of the arguments |
||||
to @ref glfwCreateWindow. |
||||
|
||||
|
||||
@subsection news_30_hidden Hidden windows |
||||
|
||||
Windows can now be hidden with @ref glfwHideWindow, shown using @ref |
||||
glfwShowWindow and created initially hidden with the `GLFW_VISIBLE` window hint. |
||||
This allows for offscreen rendering in a way compatible with most drivers, as |
||||
well as moving a window to a specific position before showing it. |
||||
|
||||
*/ |
@ -0,0 +1,160 @@ |
||||
/*! @page window Window handling |
||||
|
||||
@tableofcontents |
||||
|
||||
The primary purpose of GLFW is to provide a simple interface to window |
||||
management and OpenGL and OpenGL ES context creation. GLFW supports |
||||
multiple windows, which can be either a normal desktop window or |
||||
a fullscreen window. |
||||
|
||||
@section window_object Window objects |
||||
|
||||
Text here. |
||||
|
||||
|
||||
@section window_hints Window hints |
||||
|
||||
There are a number of hints that can be set before the creation of a window. |
||||
Some affect the window itself, others its framebuffer or context. These hints |
||||
are set to their default values each time the library is initialized with @ref |
||||
glfwInit, can be individually set with @ref glfwWindowHint and reset all at once |
||||
to their defaults with @ref glfwDefaultWindowHints. |
||||
|
||||
Note again that they need to be set *before* the creation of the window you wish |
||||
to have the specified properties. |
||||
|
||||
|
||||
@subsection window_hints_hard Hard and soft constraints |
||||
|
||||
Some window hints are hard constraints. These must match the available |
||||
capabilities *exactly* for window and context creation to succeed. Hints |
||||
that are not hard constraints are matched as closely as possible, but the |
||||
resulting window and context may differ from what these hints requested. To |
||||
find out the actual parameters of the created window and context, use the |
||||
@ref glfwGetWindowParam function. |
||||
|
||||
The following hints are hard constraints: |
||||
- `GLFW_STEREO` |
||||
- `GLFW_CLIENT_API` |
||||
|
||||
The following additional hints are hard constraints if requesting an OpenGL |
||||
context: |
||||
- `GLFW_OPENGL_FORWARD_COMPAT` |
||||
- `GLFW_OPENGL_PROFILE` |
||||
|
||||
Hints that do not apply to a given type of window or context are ignored. |
||||
|
||||
|
||||
@subsection window_hints_fb Framebuffer related hints |
||||
|
||||
The `GLFW_RED_BITS`, `GLFW_GREEN_BITS`, `GLFW_BLUE_BITS`, `GLFW_ALPHA_BITS`, |
||||
`GLFW_DEPTH_BITS` and `GLFW_STENCIL_BITS` hints specify the desired bit |
||||
depths of the various components of the default framebuffer. |
||||
|
||||
The `GLFW_ACCUM_RED_BITS`, `GLFW_ACCUM_GREEN_BITS`, `GLFW_ACCUM_BLUE_BITS` |
||||
and `GLFW_ACCUM_ALPHA_BITS` hints specify the desired bit depths of the |
||||
various components of the accumulation buffer. |
||||
|
||||
The `GLFW_AUX_BUFFERS` hint specifies the desired number of auxiliary |
||||
buffers. |
||||
|
||||
The `GLFW_STEREO` hint specifies whether to use stereoscopic rendering. |
||||
|
||||
The `GLFW_SAMPLES` hint specifies the desired number of samples to use for |
||||
multisampling. |
||||
|
||||
The `GLFW_SRGB_CAPABLE` hint specifies whether the framebuffer should be |
||||
sRGB capable. |
||||
|
||||
|
||||
@subsection window_hints_ctx Context related hints |
||||
|
||||
The `GLFW_CLIENT_API` hint specifies which client API to create the context |
||||
for. Possible values are `GLFW_OPENGL_API` and `GLFW_OPENGL_ES_API`. |
||||
|
||||
The `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR` hints |
||||
specify the client API version that the created context must be compatible |
||||
with. |
||||
|
||||
For OpenGL, these hints are *not* hard constraints, as they don't have to |
||||
match exactly, but @ref glfwCreateWindow will still fail if the resulting |
||||
OpenGL version is less than the one requested. It is therefore perfectly |
||||
safe to use the default of version 1.0 for legacy code and you will still |
||||
get backwards-compatible contexts of version 3.0 and above when available. |
||||
|
||||
For OpenGL ES, these hints are hard constraints, as there is no backward |
||||
compatibility between OpenGL ES versions. |
||||
|
||||
If an OpenGL context is requested, the `GLFW_OPENGL_FORWARD_COMPAT` hint |
||||
specifies whether the OpenGL context should be forward-compatible, i.e. one |
||||
where all functionality deprecated in the requested version of OpenGL is |
||||
removed. This may only be used if the requested OpenGL version is 3.0 or |
||||
above. If another client API is requested, this hint is ignored. |
||||
|
||||
If an OpenGL context is requested, the `GLFW_OPENGL_DEBUG_CONTEXT` hint |
||||
specifies whether to create a debug OpenGL context, which may have |
||||
additional error and performance issue reporting functionality. If another |
||||
client API is requested, this hint is ignored. |
||||
|
||||
If an OpenGL context is requested, the `GLFW_OPENGL_PROFILE` hint specifies |
||||
which OpenGL profile to create the context for. Possible values are one of |
||||
`GLFW_OPENGL_CORE_PROFILE` or `GLFW_OPENGL_COMPAT_PROFILE`, or |
||||
`GLFW_OPENGL_NO_PROFILE` to not request a specific profile. If requesting |
||||
an OpenGL version below 3.2, `GLFW_OPENGL_NO_PROFILE` must be used. If |
||||
another client API is requested, this hint is ignored. |
||||
|
||||
The `GLFW_CONTEXT_ROBUSTNESS` hint specifies the robustness strategy to be |
||||
used by the context. This can be one of `GLFW_NO_RESET_NOTIFICATION` or |
||||
`GLFW_LOSE_CONTEXT_ON_RESET`, or `GLFW_NO_ROBUSTNESS` to not request |
||||
a robustness strategy. |
||||
|
||||
|
||||
@subsection window_hints_wnd Window related hints |
||||
|
||||
The `GLFW_RESIZABLE` hint specifies whether the window will be resizable by |
||||
the user. The window will still be resizable using the @ref |
||||
glfwSetWindowSize function. This hint is ignored for fullscreen windows. |
||||
|
||||
The `GLFW_VISIBLE` hint specifies whether the window will be initially |
||||
visible. This hint is ignored for fullscreen windows. |
||||
|
||||
|
||||
@subsection window_hints_values Supported and default values |
||||
|
||||
| Name | Default value | Supported values | |
||||
| ---------------------------- | ------------------------ | ----------------------- | |
||||
| `GLFW_RESIZABLE` | `GL_TRUE` | `GL_TRUE` or `GL_FALSE` | |
||||
| `GLFW_VISIBLE` | `GL_TRUE` | `GL_TRUE` or `GL_FALSE` | |
||||
| `GLFW_RED_BITS` | 8 | 0 to `INT_MAX` | |
||||
| `GLFW_GREEN_BITS` | 8 | 0 to `INT_MAX` | |
||||
| `GLFW_BLUE_BITS` | 8 | 0 to `INT_MAX` | |
||||
| `GLFW_ALPHA_BITS` | 8 | 0 to `INT_MAX` | |
||||
| `GLFW_DEPTH_BITS` | 24 | 0 to `INT_MAX` | |
||||
| `GLFW_STENCIL_BITS` | 8 | 0 to `INT_MAX` | |
||||
| `GLFW_ACCUM_RED_BITS` | 0 | 0 to `INT_MAX` | |
||||
| `GLFW_ACCUM_GREEN_BITS` | 0 | 0 to `INT_MAX` | |
||||
| `GLFW_ACCUM_BLUE_BITS` | 0 | 0 to `INT_MAX` | |
||||
| `GLFW_ACCUM_ALPHA_BITS` | 0 | 0 to `INT_MAX` | |
||||
| `GLFW_AUX_BUFFERS` | 0 | 0 to `INT_MAX` | |
||||
| `GLFW_SAMPLES` | 0 | 0 to `INT_MAX` | |
||||
| `GLFW_STEREO` | `GL_FALSE` | `GL_TRUE` or `GL_FALSE` | |
||||
| `GLFW_SRGB_CAPABLE` | `GL_FALSE` | `GL_TRUE` or `GL_FALSE` | |
||||
| `GLFW_CLIENT_API` | `GLFW_OPENGL_API` | `GLFW_OPENGL_API` or `GLFW_OPENGL_ES_API` | |
||||
| `GLFW_CONTEXT_VERSION_MAJOR` | 1 | Any valid major version number of the chosen client API | |
||||
| `GLFW_CONTEXT_VERSION_MINOR` | 0 | Any valid minor version number of the chosen client API | |
||||
| `GLFW_CONTEXT_ROBUSTNESS` | `GLFW_NO_ROBUSTNESS` | `GLFW_NO_ROBUSTNESS`, `GLFW_NO_RESET_NOTIFICATION` or `GLFW_LOSE_CONTEXT_ON_RESET` | |
||||
| `GLFW_OPENGL_FORWARD_COMPAT` | `GL_FALSE` | `GL_TRUE` or `GL_FALSE` | |
||||
| `GLFW_OPENGL_DEBUG_CONTEXT` | `GL_FALSE` | `GL_TRUE` or `GL_FALSE` | |
||||
| `GLFW_OPENGL_PROFILE` | `GLFW_OPENGL_NO_PROFILE` | `GLFW_OPENGL_NO_PROFILE`, `GLFW_OPENGL_COMPAT_PROFILE` or `GLFW_OPENGL_CORE_PROFILE` | |
||||
|
||||
|
||||
@section window_closing Window closing |
||||
|
||||
Text here. |
||||
|
||||
|
||||
@section window_dims Window dimensions |
||||
|
||||
Text here. |
||||
|
||||
*/ |
Loading…
Reference in New Issue