Commit 422bf79e authored by Camilla Löwy's avatar Camilla Löwy
Browse files

Documentation work

parent 5644b66b
......@@ -17,8 +17,6 @@ yet officially supported.
GLFW is licensed under the [zlib/libpng
license](http://www.glfw.org/license.html).
The latest stable release is version 3.2.1.
See the [downloads](http://www.glfw.org/download.html) page for details and
files, or fetch the `latest` branch, which always points to the latest stable
release. Each release starting with 3.0 also has a corresponding [annotated
......@@ -26,8 +24,9 @@ tag](https://github.com/glfw/glfw/releases) with source and binary archives.
The [version history](http://www.glfw.org/changelog.html) lists all user-visible
changes for every release.
This is a development branch for version 3.3, which is _not yet described_.
Pre-release documentation is available [here](http://www.glfw.org/docs/3.3/).
Documentation is available [here](http://www.glfw.org/docs/latest/). See the
[release notes](https://www.glfw.org/docs/latest/news.html) for new features,
caveats and deprecations in the latest release.
The `master` branch is the stable integration branch and _should_ always compile
and run on all supported platforms, although details of newly added features may
......@@ -221,7 +220,7 @@ information on what to include when reporting a bug.
- [Win32] Bugfix: Vulkan libraries have a new path as of SDK 1.0.42.0 (#956)
- [Win32] Bugfix: Monitors with no display devices were not enumerated (#960)
- [Win32] Bugfix: Monitor events were not emitted (#784)
- [Win32] Bugfix: The Cygwin DLL was installed to the wrong directory (#1035)
- [Win32] Bugfix: The DLL was installed to the wrong directory on Cygwin (#1035)
- [Win32] Bugfix: Normalization of axis data via XInput was incorrect (#1045)
- [Win32] Bugfix: `glfw3native.h` would undefine a foreign `APIENTRY` (#1062)
- [Win32] Bugfix: Disabled cursor mode prevented use of caption buttons
......@@ -290,13 +289,13 @@ information on what to include when reporting a bug.
- [Cocoa] Bugfix: Window was resized twice when entering full screen (#1085)
- [Cocoa] Bugfix: Duplicate size events were not filtered (#1085)
- [Cocoa] Bugfix: Event polling did not initialize AppKit if necessary (#1218)
- [Cocoa] Bugfix: OpenGL rendering was not initially visible on 10.14
(#1334,#1346)
- [Cocoa] Bugfix: OpenGL rendering was not visible before resize on early macOS
10.14 (#1334,#1346)
- [Cocoa] Bugfix: Caps Lock did not generate any key events (#1368,#1373)
- [Cocoa] Bugfix: Some buttons for some joysticks were ignored (#1385)
- [Cocoa] Bugfix: Analog joystick buttons were not translated correctly (#1385)
- [Cocoa] Bugfix: OpenGL swap interval was ignored for occluded windows (#680)
- [Cocoa] Bugfix: OpenGL swap interval was ignored on macOS 10.14
- [Cocoa] Bugfix: OpenGL swap interval was ignored on early macOS 10.14
(#1337,#1417,#1435)
- [WGL] Added support for `WGL_EXT_colorspace` for OpenGL ES contexts
- [WGL] Added support for `WGL_ARB_create_context_no_error`
......
......@@ -4,8 +4,8 @@ set(glfw_DOCS_SOURCES
"${GLFW_SOURCE_DIR}/include/GLFW/glfw3native.h"
"${GLFW_SOURCE_DIR}/docs/main.dox"
"${GLFW_SOURCE_DIR}/docs/news.dox"
"${GLFW_SOURCE_DIR}/docs/moving.dox"
"${GLFW_SOURCE_DIR}/docs/quick.dox"
"${GLFW_SOURCE_DIR}/docs/moving.dox"
"${GLFW_SOURCE_DIR}/docs/compile.dox"
"${GLFW_SOURCE_DIR}/docs/build.dox"
"${GLFW_SOURCE_DIR}/docs/intro.dox"
......
......@@ -786,7 +786,7 @@ time of release. Newer ones can be added at runtime with @ref
glfwUpdateGamepadMappings.
@code
const char* mappings = load_file_contents("gamecontrollerdb.txt");
const char* mappings = load_file_contents("game/data/gamecontrollerdb.txt");
glfwUpdateGamepadMappings(mappings);
@endcode
......
......@@ -91,12 +91,12 @@ glfwGetJoystickHats. Set this with @ref glfwInitHint.
@subsubsection init_hints_osx macOS specific init hints
@anchor GLFW_COCOA_CHDIR_RESOURCES
@anchor GLFW_COCOA_CHDIR_RESOURCES_hint
__GLFW_COCOA_CHDIR_RESOURCES__ specifies whether to set the current directory to
the application to the `Contents/Resources` subdirectory of the application's
bundle, if present. Set this with @ref glfwInitHint.
@anchor GLFW_COCOA_MENUBAR
@anchor GLFW_COCOA_MENUBAR_hint
__GLFW_COCOA_MENUBAR__ specifies whether to create a basic menu bar, either from
a nib or manually, when the first window is created, which is when AppKit is
initialized. Set this with @ref glfwInitHint.
......
......@@ -8,8 +8,7 @@ GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and
Vulkan application development. It provides a simple, platform-independent API
for creating windows, contexts and surfaces, reading input, handling events, etc.
See @ref news_33 for highlights or the
[version history](https://www.glfw.org/changelog.html) for details.
@ref news_33 list new features, caveats and deprecations.
@ref quick_guide is a guide for users new to GLFW. It takes you through how to
write a small but complete program.
......
......@@ -153,9 +153,11 @@ glfwGetMonitorContentScale(monitor, &xscale, &yscale);
@endcode
The content scale is the ratio between the current DPI and the platform's
default DPI. If you scale all pixel dimensions by this scale then your content
should appear at an appropriate size. This is especially important for text and
any UI elements.
default DPI. This is especially important for text and any UI elements. If the
pixel dimensions of your UI scaled by this look appropriate on your machine then
it should appear at a reasonable size on other machines regardless of their DPI
and scaling settings. This relies on the system DPI and scaling settings being
somewhat correct.
The content scale may depend on both the monitor resolution and pixel density
and on user settings. It may be very different from the raw DPI calculated from
......
This diff is collapsed.
......@@ -483,8 +483,8 @@ should also declare this in its `Info.plist` by setting the
@subsubsection window_hints_x11 X11 specific window hints
@anchor GLFW_X11_CLASS_NAME
@anchor GLFW_X11_INSTANCE_NAME
@anchor GLFW_X11_CLASS_NAME_hint
@anchor GLFW_X11_INSTANCE_NAME_hint
__GLFW_X11_CLASS_NAME__ and __GLFW_X11_INSTANCE_NAME__ specifies the desired
ASCII encoded class and instance parts of the ICCCM `WM_CLASS` window property.
These are set with @ref glfwWindowHintString.
......@@ -702,10 +702,12 @@ float xscale, yscale;
glfwGetWindowContentScale(window, &xscale, &yscale);
@endcode
The content scale of a window is the ratio between the current DPI and the
platform's default DPI. If you scale all pixel dimensions by this scale then
your content should appear at an appropriate size. This is especially important
for text and any UI elements.
The content scale is the ratio between the current DPI and the platform's
default DPI. This is especially important for text and any UI elements. If the
pixel dimensions of your UI scaled by this look appropriate on your machine then
it should appear at a reasonable size on other machines regardless of their DPI
and scaling settings. This relies on the system DPI and scaling settings being
somewhat correct.
On systems where each monitors can have its own content scale, the window
content scale will depend on which monitor the system considers the window to be
......
......@@ -272,7 +272,8 @@ extern "C" {
/*! @brief One.
*
* This is only semantic sugar for the number 1. You can instead use `1` or
* `true` or `_True` or `GL_TRUE` or anything else that is equal to one.
* `true` or `_True` or `GL_TRUE` or `VK_TRUE` or anything else that is equal
* to one.
*
* @ingroup init
*/
......@@ -280,7 +281,8 @@ extern "C" {
/*! @brief Zero.
*
* This is only semantic sugar for the number 0. You can instead use `0` or
* `false` or `_False` or `GL_FALSE` or anything else that is equal to zero.
* `false` or `_False` or `GL_FALSE` or `VK_FALSE` or anything else that is
* equal to zero.
*
* @ingroup init
*/
......@@ -977,12 +979,25 @@ extern "C" {
* [window hint](@ref GLFW_SCALE_TO_MONITOR).
*/
#define GLFW_SCALE_TO_MONITOR 0x0002200C
/*! @brief macOS specific
* [window hint](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint).
*/
#define GLFW_COCOA_RETINA_FRAMEBUFFER 0x00023001
/*! @brief macOS specific
* [window hint](@ref GLFW_COCOA_FRAME_NAME_hint).
*/
#define GLFW_COCOA_FRAME_NAME 0x00023002
/*! @brief macOS specific
* [window hint](@ref GLFW_COCOA_GRAPHICS_SWITCHING_hint).
*/
#define GLFW_COCOA_GRAPHICS_SWITCHING 0x00023003
/*! @brief X11 specific
* [window hint](@ref GLFW_X11_CLASS_NAME_hint).
*/
#define GLFW_X11_CLASS_NAME 0x00024001
/*! @brief X11 specific
* [window hint](@ref GLFW_X11_CLASS_NAME_hint).
*/
#define GLFW_X11_INSTANCE_NAME 0x00024002
/*! @} */
......@@ -1063,17 +1078,17 @@ extern "C" {
* @{ */
/*! @brief Joystick hat buttons init hint.
*
* Joystick hat buttons [init hint](@ref GLFW_JOYSTICK_HAT_BUTTONS)
* Joystick hat buttons [init hint](@ref GLFW_JOYSTICK_HAT_BUTTONS).
*/
#define GLFW_JOYSTICK_HAT_BUTTONS 0x00050001
/*! @brief macOS specific init hint.
*
* macOS specific [init hint](@ref GLFW_COCOA_CHDIR_RESOURCES)
* macOS specific [init hint](@ref GLFW_COCOA_CHDIR_RESOURCES_hint).
*/
#define GLFW_COCOA_CHDIR_RESOURCES 0x00051001
/*! @brief macOS specific init hint.
*
* macOS specific [init hint](@ref GLFW_COCOA_MENUBAR)
* macOS specific [init hint](@ref GLFW_COCOA_MENUBAR_hint).
*/
#define GLFW_COCOA_MENUBAR 0x00051002
/*! @} */
......@@ -2000,9 +2015,11 @@ GLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* monitor, int* widthMM, int*
*
* This function retrieves the content scale for the specified monitor. The
* content scale is the ratio between the current DPI and the platform's
* default DPI. If you scale all pixel dimensions by this scale then your
* content should appear at an appropriate size. This is especially important
* for text and any UI elements.
* default DPI. This is especially important for text and any UI elements. If
* the pixel dimensions of your UI scaled by this look appropriate on your
* machine then it should appear at a reasonable size on other machines
* regardless of their DPI and scaling settings. This relies on the system DPI
* and scaling settings being somewhat correct.
*
* The content scale may depend on both the monitor resolution and pixel
* density and on user settings. It may be very different from the raw DPI
......@@ -2506,9 +2523,10 @@ GLFWAPI void glfwWindowHintString(int hint, const char* value);
* @remark @x11 The class part of the `WM_CLASS` window property will by
* default be set to the window title passed to this function. The instance
* part will use the contents of the `RESOURCE_NAME` environment variable, if
* present and not empty, or fall back to the window title. Set the @ref
* GLFW_X11_CLASS_NAME and @ref GLFW_X11_INSTANCE_NAME window hints to override
* this.
* present and not empty, or fall back to the window title. Set the
* [GLFW_X11_CLASS_NAME](@ref GLFW_X11_CLASS_NAME_hint) and
* [GLFW_X11_INSTANCE_NAME](@ref GLFW_X11_INSTANCE_NAME_hint) window hints to
* override this.
*
* @remark @wayland Compositors should implement the xdg-decoration protocol
* for GLFW to decorate the window properly. If this protocol isn't
......@@ -2972,9 +2990,11 @@ GLFWAPI void glfwGetWindowFrameSize(GLFWwindow* window, int* left, int* top, int
*
* This function retrieves the content scale for the specified window. The
* content scale is the ratio between the current DPI and the platform's
* default DPI. If you scale all pixel dimensions by this scale then your
* content should appear at an appropriate size. This is especially important
* for text and any UI elements.
* default DPI. This is especially important for text and any UI elements. If
* the pixel dimensions of your UI scaled by this look appropriate on your
* machine then it should appear at a reasonable size on other machines
* regardless of their DPI and scaling settings. This relies on the system DPI
* and scaling settings being somewhat correct.
*
* On systems where each monitors can have its own content scale, the window
* content scale will depend on which monitor the system considers the window
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment