mirror of
https://github.com/glfw/glfw.git
synced 2024-11-11 04:53:50 +00:00
Fix typos and other issues in docs
This fixes spelling, grammar and punctuation issues, missing words and
stray words across the documentation. A confusing sentence was removed
from the tutorial.
Closes #2085
(cherry picked from commit 2e12ef00bb
)
This commit is contained in:
parent
3670cd0561
commit
34bfb52641
@ -26,7 +26,7 @@ GLFW.
|
||||
@endcode
|
||||
|
||||
This header defines all the constants and declares all the types and function
|
||||
prototypes of the GLFW API. By default it also includes the OpenGL header from
|
||||
prototypes of the GLFW API. By default, it also includes the OpenGL header from
|
||||
your development environment. See [option macros](@ref build_macros) below for
|
||||
how to select OpenGL ES headers and more.
|
||||
|
||||
|
@ -146,7 +146,7 @@ formats. If GLX 1.3 is not supported, @ref glfwInit will fail.
|
||||
|
||||
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
|
||||
(or _vsync_), in that order of preference. When none of these extensions are
|
||||
available, calling @ref glfwSwapInterval will have no effect.
|
||||
|
||||
GLFW uses the `GLX_ARB_multisample` extension to create contexts with
|
||||
@ -215,8 +215,8 @@ 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.
|
||||
extensions to provide support for sRGB framebuffers. When both of these
|
||||
extensions are unavailable, the `GLFW_SRGB_CAPABLE` hint will have no effect.
|
||||
|
||||
|
||||
@section compat_osx OpenGL on macOS
|
||||
|
@ -45,7 +45,7 @@ Linux and FreeBSD you will need a few extra packages.
|
||||
To compile GLFW for X11, you need to have the X11 development packages
|
||||
installed. They are not needed to build or run programs that use GLFW.
|
||||
|
||||
On Debian and derivates like Ubuntu and Linux Mint the `xorg-dev` meta-package
|
||||
On Debian and derivatives like Ubuntu and Linux Mint the `xorg-dev` meta-package
|
||||
pulls in the development packages for all of X11.
|
||||
|
||||
@code{.sh}
|
||||
@ -82,8 +82,9 @@ To compile GLFW for Wayland, you need to have the Wayland and xkbcommon
|
||||
development packages installed. They are not needed to build or run programs
|
||||
that use GLFW.
|
||||
|
||||
On Debian and derivates like Ubuntu and Linux Mint you will need the `libwayland-dev`,
|
||||
On Debian and derivatives like Ubuntu and Linux Mint you will need the `libwayland-dev`,
|
||||
`libxkbcommon-dev`, `wayland-protocols` and `extra-cmake-modules` packages.
|
||||
These will pull in all other dependencies.
|
||||
|
||||
@code{.sh}
|
||||
sudo apt install libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules
|
||||
@ -137,7 +138,7 @@ If you wish change any CMake variables in the list, press _Configure_ and then
|
||||
_Generate_ to have the new values take effect. The variable list will be
|
||||
populated after the first configure step.
|
||||
|
||||
By default GLFW will use X11 on Linux and other Unix-like systems other
|
||||
By default, GLFW will use X11 on Linux and other Unix-like systems other
|
||||
than macOS. To use Wayland instead, set the `GLFW_USE_WAYLAND` option in the
|
||||
GLFW section of the variable list, then apply the new value as described above.
|
||||
|
||||
@ -171,7 +172,7 @@ flag.
|
||||
cmake -S path/to/glfw -B path/to/build -G Xcode
|
||||
@endcode
|
||||
|
||||
By default GLFW will use X11 on Linux and other Unix-like systems other
|
||||
By default, GLFW will use X11 on Linux and other Unix-like systems other
|
||||
than macOS. To use Wayland instead, set the `GLFW_USE_WAYLAND` CMake option.
|
||||
|
||||
@code{.sh}
|
||||
@ -327,7 +328,7 @@ For more details see the
|
||||
@section compile_manual Compiling GLFW manually
|
||||
|
||||
If you wish to compile GLFW without its CMake build environment then you will
|
||||
have to do at least some of the platform detection yourself. GLFW needs
|
||||
have to do at least some of the platform-detection yourself. GLFW needs
|
||||
a configuration macro to be defined in order to know what window system it is
|
||||
being compiled for and also has optional, platform-specific ones for various
|
||||
features.
|
||||
|
@ -61,7 +61,7 @@ information. The name and number of this chapter unfortunately varies between
|
||||
versions and APIs, but has at times been named _Shared Objects and Multiple
|
||||
Contexts_.
|
||||
|
||||
GLFW comes with a barebones object sharing example program called `sharing`.
|
||||
GLFW comes with a bare-bones object sharing example program called `sharing`.
|
||||
|
||||
|
||||
@subsection context_offscreen Offscreen contexts
|
||||
@ -193,7 +193,7 @@ it suppresses the development environment's OpenGL or OpenGL ES header.
|
||||
#include <GLFW/glfw3.h>
|
||||
@endcode
|
||||
|
||||
Finally you need to initialize glad once you have a suitable current context.
|
||||
Finally, you need to initialize glad once you have a suitable current context.
|
||||
|
||||
@code
|
||||
window = glfwCreateWindow(640, 480, "My Window", NULL, NULL);
|
||||
@ -209,7 +209,7 @@ gladLoadGLLoader((GLADloadproc) glfwGetProcAddress);
|
||||
|
||||
Once glad has been loaded, you have access to all OpenGL core and extension
|
||||
functions supported by both the context you created and the glad loader you
|
||||
generated and you are ready to start rendering.
|
||||
generated. After that, you are ready to start rendering.
|
||||
|
||||
You can specify a minimum required OpenGL or OpenGL ES version with
|
||||
[context hints](@ref window_hints_ctx). If your needs are more complex, you can
|
||||
|
@ -24,7 +24,7 @@ All input callbacks receive a window handle. By using the
|
||||
or objects from your callbacks.
|
||||
|
||||
To get a better feel for how the various events callbacks behave, run the
|
||||
`events` test program. It register every callback supported by GLFW and prints
|
||||
`events` test program. It registers every callback supported by GLFW and prints
|
||||
out all arguments provided for every event, along with time and sequence
|
||||
information.
|
||||
|
||||
@ -382,7 +382,7 @@ sequential rows, starting from the top-left corner.
|
||||
@subsubsection cursor_standard Standard cursor creation
|
||||
|
||||
A cursor with a [standard shape](@ref shapes) from the current system cursor
|
||||
theme can be can be created with @ref glfwCreateStandardCursor.
|
||||
theme can be created with @ref glfwCreateStandardCursor.
|
||||
|
||||
@code
|
||||
GLFWcursor* cursor = glfwCreateStandardCursor(GLFW_HRESIZE_CURSOR);
|
||||
|
@ -124,9 +124,9 @@ This will destroy any remaining window, monitor and cursor objects, restore any
|
||||
modified gamma ramps, re-enable the screensaver if it had been disabled and free
|
||||
any other resources allocated by GLFW.
|
||||
|
||||
Once the library is terminated, it is as if it had never been initialized and
|
||||
Once the library is terminated, it is as if it had never been initialized, therefore
|
||||
you will need to initialize it again before being able to use GLFW. If the
|
||||
library was not initialized or had already been terminated, it return
|
||||
library was not initialized or had already been terminated, it returns
|
||||
immediately.
|
||||
|
||||
|
||||
@ -246,14 +246,14 @@ which monitor the window is currently considered to be on.
|
||||
|
||||
This section describes the conditions under which GLFW can be expected to
|
||||
function, barring bugs in the operating system or drivers. Use of GLFW outside
|
||||
of these limits may work on some platforms, or on some machines, or some of the
|
||||
these limits may work on some platforms, or on some machines, or some of the
|
||||
time, or on some versions of GLFW, but it may break at any time and this will
|
||||
not be considered a bug.
|
||||
|
||||
|
||||
@subsection lifetime Pointer lifetimes
|
||||
|
||||
GLFW will never free any pointer you provide to it and you must never free any
|
||||
GLFW will never free any pointer you provide to it, and you must never free any
|
||||
pointer it provides to you.
|
||||
|
||||
Many GLFW functions return pointers to dynamically allocated structures, strings
|
||||
@ -444,11 +444,11 @@ The format of the string is as follows:
|
||||
- The name of the context creation API
|
||||
- Any additional options or APIs
|
||||
|
||||
For example, when compiling GLFW 3.0 with MinGW using the Win32 and WGL
|
||||
back ends, the version string may look something like this:
|
||||
For example, when compiling GLFW 3.3.9 with MinGW for Windows, may result in
|
||||
a version string like this:
|
||||
|
||||
@code
|
||||
3.0.0 Win32 WGL MinGW
|
||||
3.3.9 Win32 WGL EGL OSMesa MinGW
|
||||
@endcode
|
||||
|
||||
*/
|
||||
|
@ -138,7 +138,7 @@ glfwGetMonitorPhysicalSize(monitor, &width_mm, &height_mm);
|
||||
@endcode
|
||||
|
||||
While this can be used to calculate the raw DPI of a monitor, this is often not
|
||||
useful. Instead use the [monitor content scale](@ref monitor_scale) and
|
||||
useful. Instead, use the [monitor content scale](@ref monitor_scale) and
|
||||
[window content scale](@ref window_scale) to scale your content.
|
||||
|
||||
|
||||
@ -261,7 +261,7 @@ To experiment with gamma correction via the @ref glfwSetGamma function, run the
|
||||
`gamma` test program.
|
||||
|
||||
@note The software controlled gamma ramp is applied _in addition_ to the
|
||||
hardware gamma correction, which today is usually an approximation of sRGB
|
||||
hardware gamma correction, which today is typically an approximation of sRGB
|
||||
gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will
|
||||
produce the default (usually sRGB-like) behavior.
|
||||
|
||||
|
@ -243,7 +243,7 @@ while (!glfwWindowShouldClose(window))
|
||||
@endcode
|
||||
|
||||
The close callback no longer returns a value. Instead, it is called after the
|
||||
close flag has been set so it can override its value, if it chooses to, before
|
||||
close flag has been set, so it can optionally override its value, before
|
||||
event processing completes. You may however not call @ref glfwDestroyWindow
|
||||
from the close callback (or any other window related callback).
|
||||
|
||||
@ -350,11 +350,11 @@ from a repeat. Note that @ref glfwGetKey still returns only `GLFW_PRESS` or
|
||||
|
||||
GLFW 3 key tokens map to physical keys, unlike in GLFW 2 where they mapped to
|
||||
the values generated by the current keyboard layout. The tokens are named
|
||||
according to the values they would have using the standard US layout, but this
|
||||
according to the values they would have in the standard US layout, but this
|
||||
is only a convenience, as most programmers are assumed to know that layout.
|
||||
This means that (for example) `GLFW_KEY_LEFT_BRACKET` is always a single key and
|
||||
is the same key in the same place regardless of what keyboard layouts the users
|
||||
of your program has.
|
||||
of your program have.
|
||||
|
||||
The key input facility was never meant for text input, although using it that
|
||||
way worked slightly better in GLFW 2. If you were using it to input text, you
|
||||
|
@ -144,10 +144,6 @@ if (!window)
|
||||
}
|
||||
@endcode
|
||||
|
||||
The window handle is passed to all window related functions and is provided to
|
||||
along to all window related callbacks, so they can tell which window received
|
||||
the event.
|
||||
|
||||
When a window and context is no longer needed, destroy it.
|
||||
|
||||
@code
|
||||
@ -233,7 +229,7 @@ events as described below.
|
||||
@subsection quick_render Rendering with OpenGL
|
||||
|
||||
Once you have a current OpenGL context, you can use OpenGL normally. In this
|
||||
tutorial, a multi-colored rotating triangle will be rendered. The framebuffer
|
||||
tutorial, a multicolored rotating triangle will be rendered. The framebuffer
|
||||
size needs to be retrieved for `glViewport`.
|
||||
|
||||
@code
|
||||
|
@ -131,7 +131,7 @@ PFN_vkGetDeviceProcAddr pfnGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr)
|
||||
glfwGetInstanceProcAddress(instance, "vkGetDeviceProcAddr");
|
||||
@endcode
|
||||
|
||||
Device-specific functions may execute a little bit faster, due to not having to
|
||||
Device-specific functions may execute a little faster, due to not having to
|
||||
dispatch internally based on the device passed to them. For more information
|
||||
about `vkGetDeviceProcAddr`, see the Vulkan documentation.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user