diff options
author | Boyuan Yang <byang@debian.org> | 2024-02-26 20:05:22 -0500 |
---|---|---|
committer | Boyuan Yang <byang@debian.org> | 2024-02-26 20:05:22 -0500 |
commit | bd71b1fe83f86d5f2725050cde7e9c6569999628 (patch) | |
tree | 184781b00bdca4f750e90d57058679ec80ed6b38 /docs | |
parent | e57e87566f742b7d25d2b5ea28a5481c8ca1fe77 (diff) |
New upstream version 3.3.10
Diffstat (limited to 'docs')
-rw-r--r-- | docs/CONTRIBUTING.md | 7 | ||||
-rw-r--r-- | docs/SUPPORT.md | 3 | ||||
-rw-r--r-- | docs/build.dox | 111 | ||||
-rw-r--r-- | docs/compile.dox | 6 | ||||
-rw-r--r-- | docs/news.dox | 2 |
5 files changed, 102 insertions, 27 deletions
diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 050c1be..5eaf752 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -23,13 +23,12 @@ Questions about how to use GLFW should be asked either in the [support section](https://discourse.glfw.org/c/support) of the forum, under the [Stack Overflow tag](https://stackoverflow.com/questions/tagged/glfw) or [Game Development tag](https://gamedev.stackexchange.com/questions/tagged/glfw) on -Stack Exchange or in the IRC channel `#glfw` on -[Libera.Chat](https://libera.chat/). +Stack Exchange. Questions about the design or implementation of GLFW or about future plans should be asked in the [dev section](https://discourse.glfw.org/c/dev) of the -forum or in the IRC channel. Please don't open a GitHub issue to discuss design -questions without first checking with a maintainer. +forum. Please don't open a GitHub issue to discuss design questions without +first checking with a maintainer. ## Reporting a bug diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md index 79a45a8..d9be56f 100644 --- a/docs/SUPPORT.md +++ b/docs/SUPPORT.md @@ -4,8 +4,7 @@ See the [latest documentation](https://www.glfw.org/docs/latest/) for tutorials, guides and the API reference. If you have questions about using GLFW, we have a -[forum](https://discourse.glfw.org/), and the `#glfw` IRC channel on -[Libera.Chat](https://libera.chat/). +[forum](https://discourse.glfw.org/). Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues). Please check the [contribution diff --git a/docs/build.dox b/docs/build.dox index faa36b2..1b9c1e1 100644 --- a/docs/build.dox +++ b/docs/build.dox @@ -160,20 +160,94 @@ A good general introduction to linking is David Drysdale. -@subsection build_link_win32 With MinGW or Visual C++ on Windows +@subsection build_link_win32 With Visual C++ and GLFW binaries + +If you are using a downloaded +[binary archive](https://www.glfw.org/download.html), first make sure you have +the archive matching the architecture you are building for (32-bit or 64-bit), +or you will get link errors. Also make sure you are using the binaries for your +version of Visual C++ or you may get other link errors. + +There are two version of the static GLFW library in the binary archive, because +it needs to use the same base run-time library variant as the rest of your +executable. + +One is named `glfw3.lib` and is for projects with the _Runtime Library_ project +option set to _Multi-threaded DLL_ or _Multi-threaded Debug DLL_. The other is +named `glfw3_mt.lib` and is for projects with _Runtime Library_ set to +_Multi-threaded_ or _Multi-threaded Debug_. To use the static GLFW library you +will need to add `path/to/glfw3.lib` or `path/to/glfw3_mt.lib` to the +_Additional Dependencies_ project option. + +If you compiled a GLFW static library yourself then there will only be one, +named `glfw3.lib`, and you have to make sure the run-time library variant +matches. + +The DLL version of the GLFW library is named `glfw3.dll`, but you will be +linking against the `glfw3dll.lib` link library. To use the DLL you will need +to add `path/to/glfw3dll.lib` to the _Additional Dependencies_ project option. +All of its dependencies are already listed there by default, but when building +with the DLL version of GLFW, you also need to define the @ref GLFW_DLL. This +can be done either in the _Preprocessor Definitions_ project option or by +defining it in your source code before including the GLFW header. -The static version of the GLFW library is named `glfw3`. When using this -version, it is also necessary to link with some libraries that GLFW uses. +@code +#define GLFW_DLL +#include <GLFW/glfw3.h> +@endcode + +All link-time dependencies for GLFW are already listed in the _Additional +Dependencies_ option by default. + + +@subsection build_link_mingw With MinGW-w64 and GLFW binaries + +This is intended for building a program from the command-line or by writing +a makefile, on Windows with [MinGW-w64](https://www.mingw-w64.org/) and GLFW +binaries. These can be from a downloaded and extracted +[binary archive](https://www.glfw.org/download.html) or by compiling GLFW +yourself. The paths below assume a binary archive is used. + +If you are using a downloaded binary archive, first make sure you have the +archive matching the architecture you are building for (32-bit or 64-bit) or you +will get link errors. + +Note that the order of source files and libraries matter for GCC. Dependencies +must be listed after the files that depend on them. Any source files that +depend on GLFW must be listed before the GLFW library. GLFW in turn depends on +`gdi32` and must be listed before it. + +If you are using the static version of the GLFW library, which is named +`libglfw3.a`, do: + +@code{.sh} +gcc -o myprog myprog.c -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3.a -lgdi32 +@endcode -When using MinGW to link an application with the static version of GLFW, you -must also explicitly link with `gdi32`. Other toolchains including MinGW-w64 -include it in the set of default libraries along with other dependencies like -`user32` and `kernel32`. +If you are using the DLL version of the GLFW library, which is named +`glfw3.dll`, you will need to use the `libglfw3dll.a` link library. -The link library for the GLFW DLL is named `glfw3dll`. When compiling an -application that uses the DLL version of GLFW, you need to define the @ref -GLFW_DLL macro _before_ any inclusion of the GLFW header. This can be done -either with a compiler switch or by defining it in your source code. +@code{.sh} +gcc -o myprog myprog.c -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3dll.a -lgdi32 +@endcode + +The resulting executable will need to find `glfw3.dll` to run, typically by +keeping both files in the same directory. + +When you are building with the DLL version of GLFW, you will also need to define +the @ref GLFW_DLL macro. This can be done in your source files, as long as it +done before including the GLFW header: + +@code +#define GLFW_DLL +#include <GLFW/glfw3.h> +@endcode + +It can also be done on the command-line: + +@code{.sh} +gcc -o myprog myprog.c -D GLFW_DLL -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3dll.a -lgdi32 +@endcode @subsection build_link_cmake_source With CMake and GLFW source @@ -271,7 +345,10 @@ target_link_libraries(myapp OpenGL::GL) @endcode -@subsection build_link_pkgconfig With makefiles and pkg-config on Unix +@subsection build_link_pkgconfig With pkg-config and GLFW binaries on Unix + +This is intended for building a program from the command-line or by writing +a makefile, on macOS or any Unix-like system like Linux, FreeBSD and Cygwin. GLFW supports [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/), and the `glfw3.pc` pkg-config file is generated when the GLFW library is built @@ -322,13 +399,13 @@ OpenGL and IOKit frameworks to the project as dependencies. They can all be found in `/System/Library/Frameworks`. -@subsection build_link_osx With command-line on macOS +@subsection build_link_osx With command-line or makefile on macOS It is recommended that you use [pkg-config](@ref build_link_pkgconfig) when -building from the command line on macOS. That way you will get any new -dependencies added automatically. If you still wish to build manually, you need -to add the required frameworks and libraries to your command-line yourself using -the `-l` and `-framework` switches. +using installed GLFW binaries from the command line on macOS. That way you will +get any new dependencies added automatically. If you still wish to build +manually, you need to add the required frameworks and libraries to your +command-line yourself using the `-l` and `-framework` switches. If you are using the dynamic GLFW library, which is named `libglfw.3.dylib`, do: diff --git a/docs/compile.dox b/docs/compile.dox index 99d5a68..9bcf14c 100644 --- a/docs/compile.dox +++ b/docs/compile.dox @@ -97,11 +97,11 @@ On Fedora and derivatives like Red Hat you will need the `wayland-devel`, sudo dnf install wayland-devel libxkbcommon-devel wayland-protocols-devel extra-cmake-modules @endcode -On FreeBSD you will need the `wayland`, `libxkbcommon`, `wayland-protocols` and -`kf5-extra-cmake-modules` packages. +On FreeBSD you will need the `wayland`, `libxkbcommon`, `wayland-protocols`, +`evdev-proto` and `kf5-extra-cmake-modules` packages. @code{.sh} -pkg install wayland libxkbcommon wayland-protocols kf5-extra-cmake-modules +pkg install wayland libxkbcommon wayland-protocols evdev-proto kf5-extra-cmake-modules @endcode Once you have the required depdendencies, move on to @ref compile_generate. diff --git a/docs/news.dox b/docs/news.dox index 103224f..1db3a06 100644 --- a/docs/news.dox +++ b/docs/news.dox @@ -322,7 +322,7 @@ Starting with GLFW 3.3.7, events posted with @ref glfwPostEmptyEvent now use a s unnamed pipe instead of sending an X11 client event to the helper window. -@subsubsection wayland_alpha_34 Frambuffer may lack alpha channel on older Wayland systems +@subsubsection wayland_alpha_33 Framebuffer may lack alpha channel on older Wayland systems On Wayland, when creating an EGL context on a machine lacking the new `EGL_EXT_present_opaque` extension, the @ref GLFW_ALPHA_BITS window hint will be |