mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Update default name from OS X to macOS
Note that earlier releases are still referred to by their proper names; OS X <version> or Mac OS X <version>.
This commit is contained in:
parent
bc8b0480e9
commit
8d6f265441
@ -36,7 +36,7 @@ does not need the headers for any context creation API (WGL, GLX, EGL, NSGL) or
|
|||||||
rendering API (OpenGL, OpenGL ES, Vulkan) to enable support for them.
|
rendering API (OpenGL, OpenGL ES, Vulkan) to enable support for them.
|
||||||
|
|
||||||
GLFW supports compilation on Windows with Visual C++ 2010 and later, MinGW and
|
GLFW supports compilation on Windows with Visual C++ 2010 and later, MinGW and
|
||||||
MinGW-w64, on OS X with Clang and on Linux and other Unix-like systems with GCC
|
MinGW-w64, on macOS with Clang and on Linux and other Unix-like systems with GCC
|
||||||
and Clang. It will likely compile in other environments as well, but this is
|
and Clang. It will likely compile in other environments as well, but this is
|
||||||
not regularly tested.
|
not regularly tested.
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ ALIASES = "thread_safety=@par Thread safety\n" \
|
|||||||
"x11=__X11:__" \
|
"x11=__X11:__" \
|
||||||
"wayland=__Wayland:__" \
|
"wayland=__Wayland:__" \
|
||||||
"win32=__Windows:__" \
|
"win32=__Windows:__" \
|
||||||
"osx=__OS X:__"
|
"macos=__macOS:__"
|
||||||
|
|
||||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||||
# A mapping has the form "name=value". For example adding
|
# A mapping has the form "name=value". For example adding
|
||||||
|
@ -65,7 +65,7 @@ The following macros control which OpenGL or OpenGL ES API header is included.
|
|||||||
Only one of these may be defined at a time.
|
Only one of these may be defined at a time.
|
||||||
|
|
||||||
`GLFW_INCLUDE_GLCOREARB` makes the GLFW header include the modern
|
`GLFW_INCLUDE_GLCOREARB` makes the GLFW header include the modern
|
||||||
`GL/glcorearb.h` header (`OpenGL/gl3.h` on OS X) instead of the regular OpenGL
|
`GL/glcorearb.h` header (`OpenGL/gl3.h` on macOS) instead of the regular OpenGL
|
||||||
header.
|
header.
|
||||||
|
|
||||||
`GLFW_INCLUDE_ES1` makes the GLFW header include the OpenGL ES 1.x `GLES/gl.h`
|
`GLFW_INCLUDE_ES1` makes the GLFW header include the OpenGL ES 1.x `GLES/gl.h`
|
||||||
@ -84,7 +84,7 @@ header instead of the regular OpenGL header.
|
|||||||
header. This is useful in combination with an extension loading library.
|
header. This is useful in combination with an extension loading library.
|
||||||
|
|
||||||
If none of the above inclusion macros are defined, the standard OpenGL `GL/gl.h`
|
If none of the above inclusion macros are defined, the standard OpenGL `GL/gl.h`
|
||||||
header (`OpenGL/gl.h` on OS X) is included.
|
header (`OpenGL/gl.h` on macOS) is included.
|
||||||
|
|
||||||
The following macros control the inclusion of additional API headers. Any
|
The following macros control the inclusion of additional API headers. Any
|
||||||
number of these may be defined simultaneously, and/or together with one of the
|
number of these may be defined simultaneously, and/or together with one of the
|
||||||
@ -119,7 +119,7 @@ a shared library / dynamic library / DLL then it takes care of these links.
|
|||||||
However, if you are using GLFW as a static library then your executable will
|
However, if you are using GLFW as a static library then your executable will
|
||||||
need to link against these libraries.
|
need to link against these libraries.
|
||||||
|
|
||||||
On Windows and OS X, the list of system libraries is static and can be
|
On Windows and macOS, the list of system libraries is static and can be
|
||||||
hard-coded into your build environment. See the section for your development
|
hard-coded into your build environment. See the section for your development
|
||||||
environment below. On Linux and other Unix-like operating systems, the list
|
environment below. On Linux and other Unix-like operating systems, the list
|
||||||
varies but can be retrieved in various ways as described below.
|
varies but can be retrieved in various ways as described below.
|
||||||
@ -289,7 +289,7 @@ env PKG_CONFIG_PATH=path/to/glfw/src cc `pkg-config --cflags glfw3` -o myprog my
|
|||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
The dependencies do not include OpenGL or GLU, as GLFW loads any OpenGL, OpenGL
|
The dependencies do not include OpenGL or GLU, as GLFW loads any OpenGL, OpenGL
|
||||||
ES or Vulkan libraries it needs at runtime and does not use GLU. On OS X, GLU
|
ES or Vulkan libraries it needs at runtime and does not use GLU. On macOS, GLU
|
||||||
is built into the OpenGL framework, so if you need GLU you don't need to do
|
is built into the OpenGL framework, so if you need GLU you don't need to do
|
||||||
anything extra. If you need GLU and are using Linux or BSD, you should add the
|
anything extra. If you need GLU and are using Linux or BSD, you should add the
|
||||||
`glu` pkg-config package.
|
`glu` pkg-config package.
|
||||||
@ -309,7 +309,7 @@ cc `pkg-config --cflags glfw3 glu` -o myprog myprog.c `pkg-config --static --lib
|
|||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
|
|
||||||
@subsection build_link_xcode With Xcode on OS X
|
@subsection build_link_xcode With Xcode on macOS
|
||||||
|
|
||||||
If you are using the dynamic library version of GLFW, simply add it to the
|
If you are using the dynamic library version of GLFW, simply add it to the
|
||||||
project dependencies.
|
project dependencies.
|
||||||
@ -319,10 +319,10 @@ OpenGL, IOKit and CoreVideo frameworks to the project as dependencies. They can
|
|||||||
all be found in `/System/Library/Frameworks`.
|
all be found in `/System/Library/Frameworks`.
|
||||||
|
|
||||||
|
|
||||||
@subsection build_link_osx With command-line on OS X
|
@subsection build_link_osx With command-line on macOS
|
||||||
|
|
||||||
It is recommended that you use [pkg-config](@ref build_link_pkgconfig) when
|
It is recommended that you use [pkg-config](@ref build_link_pkgconfig) when
|
||||||
building from the command line on OS X. That way you will get any new
|
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
|
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
|
to add the required frameworks and libraries to your command-line yourself using
|
||||||
the `-l` and `-framework` switches.
|
the `-l` and `-framework` switches.
|
||||||
@ -342,6 +342,6 @@ against it from the command-line.
|
|||||||
The OpenGL framework contains both the OpenGL and GLU APIs, so there is nothing
|
The OpenGL framework contains both the OpenGL and GLU APIs, so there is nothing
|
||||||
special to do when using GLU. Also note that even though your machine may have
|
special to do when using GLU. Also note that even though your machine may have
|
||||||
`libGL`-style OpenGL libraries, they are for use with the X Window System and
|
`libGL`-style OpenGL libraries, they are for use with the X Window System and
|
||||||
will _not_ work with the OS X native version of GLFW.
|
will _not_ work with the macOS native version of GLFW.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -160,7 +160,7 @@ extensions to provide support for sRGB framebuffers. Where both of these
|
|||||||
extension are unavailable, the `GLFW_SRGB_CAPABLE` hint will have no effect.
|
extension are unavailable, the `GLFW_SRGB_CAPABLE` hint will have no effect.
|
||||||
|
|
||||||
|
|
||||||
@section compat_osx OpenGL 3.2 and later on OS X
|
@section compat_osx OpenGL 3.2 and later on macOS
|
||||||
|
|
||||||
Support for OpenGL 3.2 and above was introduced with OS X 10.7 and even then
|
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
|
only forward-compatible, core profile contexts are supported. Support for
|
||||||
@ -217,7 +217,7 @@ surfaces on Mir. If any of these extensions are not available, @ref
|
|||||||
glfwGetRequiredInstanceExtensions will return an empty list and window surface
|
glfwGetRequiredInstanceExtensions will return an empty list and window surface
|
||||||
creation will fail.
|
creation will fail.
|
||||||
|
|
||||||
GLFW does not support any extensions for window surface creation on OS X,
|
GLFW does not support any extensions for window surface creation on macOS,
|
||||||
meaning@ref glfwGetRequiredInstanceExtensions will return an empty list and
|
meaning@ref glfwGetRequiredInstanceExtensions will return an empty list and
|
||||||
window surface creation will fail.
|
window surface creation will fail.
|
||||||
|
|
||||||
|
@ -14,7 +14,8 @@ GLFW uses [CMake](http://www.cmake.org/) to generate project files or makefiles
|
|||||||
for a particular development environment. If you are on a Unix-like system such
|
for a particular development environment. If you are on a Unix-like system such
|
||||||
as Linux or FreeBSD or have a package system like Fink, MacPorts, Cygwin or
|
as Linux or FreeBSD or have a package system like Fink, MacPorts, Cygwin or
|
||||||
Homebrew, you can simply install its CMake package. If not, you can download
|
Homebrew, you can simply install its CMake package. If not, you can download
|
||||||
installers for Windows and OS X from the [CMake website](http://www.cmake.org/).
|
installers for Windows and macOS from the
|
||||||
|
[CMake website](http://www.cmake.org/).
|
||||||
|
|
||||||
@note CMake only generates project files or makefiles. It does not compile the
|
@note CMake only generates project files or makefiles. It does not compile the
|
||||||
actual GLFW library. To compile GLFW, first generate these files for your
|
actual GLFW library. To compile GLFW, first generate these files for your
|
||||||
@ -76,11 +77,11 @@ the CMake wiki.
|
|||||||
Once you have this set up, move on to @ref compile_generate.
|
Once you have this set up, move on to @ref compile_generate.
|
||||||
|
|
||||||
|
|
||||||
@subsubsection compile_deps_xcode Dependencies for Xcode on OS X
|
@subsubsection compile_deps_xcode Dependencies for Xcode on macOS
|
||||||
|
|
||||||
Xcode comes with all necessary tools except for CMake. The required headers
|
Xcode comes with all necessary tools except for CMake. The required headers
|
||||||
and libraries are included in the core OS X frameworks. Xcode can be downloaded
|
and libraries are included in the core macOS frameworks. Xcode can be
|
||||||
from the Mac App Store or from the ADC Member Center.
|
downloaded from the Mac App Store or from the ADC Member Center.
|
||||||
|
|
||||||
Once you have Xcode installed, move on to @ref compile_generate.
|
Once you have Xcode installed, move on to @ref compile_generate.
|
||||||
|
|
||||||
@ -201,7 +202,7 @@ the library.
|
|||||||
statically into the application.
|
statically into the application.
|
||||||
|
|
||||||
|
|
||||||
@subsubsection compile_options_osx OS X specific CMake options
|
@subsubsection compile_options_osx macOS specific CMake options
|
||||||
|
|
||||||
`GLFW_USE_CHDIR` determines whether `glfwInit` changes the current
|
`GLFW_USE_CHDIR` determines whether `glfwInit` changes the current
|
||||||
directory of bundled applications to the `Contents/Resources` directory.
|
directory of bundled applications to the `Contents/Resources` directory.
|
||||||
|
@ -84,7 +84,7 @@ objects are recommended for rendering with such contexts.
|
|||||||
You should still [process events](@ref events) as long as you have at least one
|
You should still [process events](@ref events) as long as you have at least one
|
||||||
window, even if none of them are visible.
|
window, even if none of them are visible.
|
||||||
|
|
||||||
__OS X:__ The first time a window is created the menu bar is populated with
|
@macos The first time a window is created the menu bar is populated with
|
||||||
common commands like Hide, Quit and About. This is not desirable for example
|
common commands like Hide, Quit and About. This is not desirable for example
|
||||||
when writing a command-line only application. The menu bar setup can be
|
when writing a command-line only application. The menu bar setup can be
|
||||||
disabled with a [compile-time option](@ref compile_options_osx).
|
disabled with a [compile-time option](@ref compile_options_osx).
|
||||||
|
@ -293,11 +293,12 @@ through CMake options.
|
|||||||
|
|
||||||
@subsection news_30_hidpi High-DPI support
|
@subsection news_30_hidpi High-DPI support
|
||||||
|
|
||||||
GLFW now supports high-DPI monitors on both Windows and OS X, giving windows full
|
GLFW now supports high-DPI monitors on both Windows and macOS, giving windows
|
||||||
resolution framebuffers where other UI elements are scaled up. To achieve this,
|
full resolution framebuffers where other UI elements are scaled up. To achieve
|
||||||
@ref glfwGetFramebufferSize and @ref glfwSetFramebufferSizeCallback have been
|
this, @ref glfwGetFramebufferSize and @ref glfwSetFramebufferSizeCallback have
|
||||||
added. These work with pixels, while the rest of the GLFW API works with screen
|
been added. These work with pixels, while the rest of the GLFW API works with
|
||||||
coordinates. This is important as OpenGL uses pixels, not screen coordinates.
|
screen coordinates. This is important as OpenGL uses pixels, not screen
|
||||||
|
coordinates.
|
||||||
|
|
||||||
|
|
||||||
@subsection news_30_error Error callback
|
@subsection news_30_error Error callback
|
||||||
|
@ -340,7 +340,7 @@ The program above can be found in the
|
|||||||
[source package](http://www.glfw.org/download.html) as `examples/simple.c`
|
[source package](http://www.glfw.org/download.html) as `examples/simple.c`
|
||||||
and is compiled along with all other examples when you build GLFW. If you
|
and is compiled along with all other examples when you build GLFW. If you
|
||||||
built GLFW from the source package then already have this as `simple.exe` on
|
built GLFW from the source package then already have this as `simple.exe` on
|
||||||
Windows, `simple` on Linux or `simple.app` on OS X.
|
Windows, `simple` on Linux or `simple.app` on macOS.
|
||||||
|
|
||||||
This tutorial used only a few of the many functions GLFW provides. There are
|
This tutorial used only a few of the many functions GLFW provides. There are
|
||||||
guides for each of the areas covered by GLFW. Each guide will introduce all the
|
guides for each of the areas covered by GLFW. Each guide will introduce all the
|
||||||
|
@ -258,7 +258,7 @@ create the context. Possible values are `GLFW_NATIVE_CONTEXT_API` and
|
|||||||
requested, this hint is ignored.
|
requested, this hint is ignored.
|
||||||
|
|
||||||
@par
|
@par
|
||||||
__OS X:__ The EGL API is not available on this platform and requests to use it
|
@macos The EGL API is not available on this platform and requests to use it
|
||||||
will fail.
|
will fail.
|
||||||
|
|
||||||
@par
|
@par
|
||||||
|
@ -116,7 +116,7 @@ extern "C" {
|
|||||||
#endif /* CALLBACK */
|
#endif /* CALLBACK */
|
||||||
|
|
||||||
/* Include because most Windows GLU headers need wchar_t and
|
/* Include because most Windows GLU headers need wchar_t and
|
||||||
* the OS X OpenGL header blocks the definition of ptrdiff_t by glext.h.
|
* the macOS OpenGL header blocks the definition of ptrdiff_t by glext.h.
|
||||||
* Include it unconditionally to avoid surprising side-effects.
|
* Include it unconditionally to avoid surprising side-effects.
|
||||||
*/
|
*/
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
@ -561,7 +561,7 @@ extern "C" {
|
|||||||
* @par
|
* @par
|
||||||
* Some pre-installed Windows graphics drivers do not support OpenGL. AMD only
|
* Some pre-installed Windows graphics drivers do not support OpenGL. AMD only
|
||||||
* supports OpenGL ES via EGL, while Nvidia and Intel only support it via
|
* supports OpenGL ES via EGL, while Nvidia and Intel only support it via
|
||||||
* a WGL or GLX extension. OS X does not provide OpenGL ES at all. The Mesa
|
* a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa
|
||||||
* EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary
|
* EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary
|
||||||
* driver. Older graphics drivers do not support Vulkan.
|
* driver. Older graphics drivers do not support Vulkan.
|
||||||
*/
|
*/
|
||||||
@ -1247,7 +1247,7 @@ typedef struct GLFWimage
|
|||||||
*
|
*
|
||||||
* @errors Possible errors include @ref GLFW_PLATFORM_ERROR.
|
* @errors Possible errors include @ref GLFW_PLATFORM_ERROR.
|
||||||
*
|
*
|
||||||
* @remark @osx This function will change the current directory of the
|
* @remark @macos This function will change the current directory of the
|
||||||
* application to the `Contents/Resources` subdirectory of the application's
|
* application to the `Contents/Resources` subdirectory of the application's
|
||||||
* bundle, if present. This can be disabled with a
|
* bundle, if present. This can be disabled with a
|
||||||
* [compile-time option](@ref compile_options_osx).
|
* [compile-time option](@ref compile_options_osx).
|
||||||
@ -1821,19 +1821,19 @@ GLFWAPI void glfwWindowHint(int hint, int value);
|
|||||||
* @remark @win32 The context to share resources with must not be current on
|
* @remark @win32 The context to share resources with must not be current on
|
||||||
* any other thread.
|
* any other thread.
|
||||||
*
|
*
|
||||||
* @remark @osx The GLFW window has no icon, as it is not a document
|
* @remark @macos The GLFW window has no icon, as it is not a document
|
||||||
* window, but the dock icon will be the same as the application bundle's icon.
|
* window, but the dock icon will be the same as the application bundle's icon.
|
||||||
* For more information on bundles, see the
|
* For more information on bundles, see the
|
||||||
* [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/)
|
* [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/)
|
||||||
* in the Mac Developer Library.
|
* in the Mac Developer Library.
|
||||||
*
|
*
|
||||||
* @remark @osx The first time a window is created the menu bar is populated
|
* @remark @macos The first time a window is created the menu bar is populated
|
||||||
* with common commands like Hide, Quit and About. The About entry opens
|
* with common commands like Hide, Quit and About. The About entry opens
|
||||||
* a minimal about dialog with information from the application's bundle. The
|
* a minimal about dialog with information from the application's bundle. The
|
||||||
* menu bar can be disabled with a
|
* menu bar can be disabled with a
|
||||||
* [compile-time option](@ref compile_options_osx).
|
* [compile-time option](@ref compile_options_osx).
|
||||||
*
|
*
|
||||||
* @remark @osx On OS X 10.10 and later the window frame will not be rendered
|
* @remark @macos On OS X 10.10 and later the window frame will not be rendered
|
||||||
* at full resolution on Retina displays unless the `NSHighResolutionCapable`
|
* at full resolution on Retina displays unless the `NSHighResolutionCapable`
|
||||||
* key is enabled in the application bundle's `Info.plist`. For more
|
* key is enabled in the application bundle's `Info.plist`. For more
|
||||||
* information, see
|
* information, see
|
||||||
@ -1959,7 +1959,7 @@ GLFWAPI void glfwSetWindowShouldClose(GLFWwindow* window, int value);
|
|||||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||||
* GLFW_PLATFORM_ERROR.
|
* GLFW_PLATFORM_ERROR.
|
||||||
*
|
*
|
||||||
* @remark @osx The window title will not be updated until the next time you
|
* @remark @macos The window title will not be updated until the next time you
|
||||||
* process events.
|
* process events.
|
||||||
*
|
*
|
||||||
* @thread_safety This function must only be called from the main thread.
|
* @thread_safety This function must only be called from the main thread.
|
||||||
@ -1996,7 +1996,7 @@ GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);
|
|||||||
* @pointer_lifetime The specified image data is copied before this function
|
* @pointer_lifetime The specified image data is copied before this function
|
||||||
* returns.
|
* returns.
|
||||||
*
|
*
|
||||||
* @remark @osx The GLFW window has no icon, as it is not a document
|
* @remark @macos The GLFW window has no icon, as it is not a document
|
||||||
* window, so this function does nothing. The dock icon will be the same as
|
* window, so this function does nothing. The dock icon will be the same as
|
||||||
* the application bundle's icon. For more information on bundles, see the
|
* the application bundle's icon. For more information on bundles, see the
|
||||||
* [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/)
|
* [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/)
|
||||||
@ -2692,8 +2692,8 @@ GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwind
|
|||||||
*
|
*
|
||||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||||
*
|
*
|
||||||
* @remark @osx Selecting Quit from the application menu will trigger the close
|
* @remark @macos Selecting Quit from the application menu will trigger the
|
||||||
* callback for all windows.
|
* close callback for all windows.
|
||||||
*
|
*
|
||||||
* @thread_safety This function must only be called from the main thread.
|
* @thread_safety This function must only be called from the main thread.
|
||||||
*
|
*
|
||||||
@ -3458,7 +3458,7 @@ GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun cbfun);
|
|||||||
*
|
*
|
||||||
* The character callback behaves as system text input normally does and will
|
* The character callback behaves as system text input normally does and will
|
||||||
* not be called if modifier keys are held down that would prevent normal text
|
* not be called if modifier keys are held down that would prevent normal text
|
||||||
* input on that platform, for example a Super (Command) key on OS X or Alt key
|
* input on that platform, for example a Super (Command) key on macOS or Alt key
|
||||||
* on Windows. There is a
|
* on Windows. There is a
|
||||||
* [character with modifiers callback](@ref glfwSetCharModsCallback) that
|
* [character with modifiers callback](@ref glfwSetCharModsCallback) that
|
||||||
* receives these events.
|
* receives these events.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.3 OS X - www.glfw.org
|
// GLFW 3.3 macOS - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.3 OS X - www.glfw.org
|
// GLFW 3.3 macOS - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.3 OS X - www.glfw.org
|
// GLFW 3.3 macOS - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.3 OS X - www.glfw.org
|
// GLFW 3.3 macOS - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.3 OS X - www.glfw.org
|
// GLFW 3.3 macOS - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
@ -162,7 +162,7 @@ static void releaseMonitor(_GLFWwindow* window)
|
|||||||
_glfwRestoreVideoModeNS(window->monitor);
|
_glfwRestoreVideoModeNS(window->monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translates OS X key modifiers into GLFW ones
|
// Translates macOS key modifiers into GLFW ones
|
||||||
//
|
//
|
||||||
static int translateFlags(NSUInteger flags)
|
static int translateFlags(NSUInteger flags)
|
||||||
{
|
{
|
||||||
@ -180,7 +180,7 @@ static int translateFlags(NSUInteger flags)
|
|||||||
return mods;
|
return mods;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translates a OS X keycode to a GLFW keycode
|
// Translates a macOS keycode to a GLFW keycode
|
||||||
//
|
//
|
||||||
static int translateKey(unsigned int key)
|
static int translateKey(unsigned int key)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.3 OS X - www.glfw.org
|
// GLFW 3.3 macOS - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.3 OS X - www.glfw.org
|
// GLFW 3.3 macOS - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
@ -124,14 +124,14 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window,
|
|||||||
if (ctxconfig->client == GLFW_OPENGL_ES_API)
|
if (ctxconfig->client == GLFW_OPENGL_ES_API)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_API_UNAVAILABLE,
|
_glfwInputError(GLFW_API_UNAVAILABLE,
|
||||||
"NSGL: OpenGL ES is not available on OS X");
|
"NSGL: OpenGL ES is not available on macOS");
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctxconfig->major == 3 && ctxconfig->minor < 2)
|
if (ctxconfig->major == 3 && ctxconfig->minor < 2)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_VERSION_UNAVAILABLE,
|
_glfwInputError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"NSGL: The targeted version of OS X does not support OpenGL 3.0 or 3.1");
|
"NSGL: The targeted version of macOS does not support OpenGL 3.0 or 3.1");
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,23 +140,23 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window,
|
|||||||
if (!ctxconfig->forward)
|
if (!ctxconfig->forward)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_VERSION_UNAVAILABLE,
|
_glfwInputError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"NSGL: The targeted version of OS X only supports forward-compatible contexts for OpenGL 3.2 and above");
|
"NSGL: The targeted version of macOS only supports forward-compatible contexts for OpenGL 3.2 and above");
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctxconfig->profile != GLFW_OPENGL_CORE_PROFILE)
|
if (ctxconfig->profile != GLFW_OPENGL_CORE_PROFILE)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_VERSION_UNAVAILABLE,
|
_glfwInputError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"NSGL: The targeted version of OS X only supports core profile contexts for OpenGL 3.2 and above");
|
"NSGL: The targeted version of macOS only supports core profile contexts for OpenGL 3.2 and above");
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Context robustness modes (GL_KHR_robustness) are not yet supported on
|
// Context robustness modes (GL_KHR_robustness) are not yet supported on
|
||||||
// OS X but are not a hard constraint, so ignore and continue
|
// macOS but are not a hard constraint, so ignore and continue
|
||||||
|
|
||||||
// Context release behaviors (GL_KHR_context_flush_control) are not yet
|
// Context release behaviors (GL_KHR_context_flush_control) are not yet
|
||||||
// supported on OS X but are not a hard constraint, so ignore and continue
|
// supported on macOS but are not a hard constraint, so ignore and continue
|
||||||
|
|
||||||
#define ADD_ATTR(x) { attributes[attributeCount++] = x; }
|
#define ADD_ATTR(x) { attributes[attributeCount++] = x; }
|
||||||
#define ADD_ATTR2(x, y) { ADD_ATTR(x); ADD_ATTR(y); }
|
#define ADD_ATTR2(x, y) { ADD_ATTR(x); ADD_ATTR(y); }
|
||||||
@ -206,7 +206,7 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window,
|
|||||||
fbconfig->greenBits +
|
fbconfig->greenBits +
|
||||||
fbconfig->blueBits;
|
fbconfig->blueBits;
|
||||||
|
|
||||||
// OS X needs non-zero color size, so set reasonable values
|
// macOS needs non-zero color size, so set reasonable values
|
||||||
if (colorBits == 0)
|
if (colorBits == 0)
|
||||||
colorBits = 24;
|
colorBits = 24;
|
||||||
else if (colorBits < 15)
|
else if (colorBits < 15)
|
||||||
|
@ -668,7 +668,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
|||||||
case WM_MOUSEHWHEEL:
|
case WM_MOUSEHWHEEL:
|
||||||
{
|
{
|
||||||
// This message is only sent on Windows Vista and later
|
// This message is only sent on Windows Vista and later
|
||||||
// NOTE: The X-axis is inverted for consistency with OS X and X11.
|
// NOTE: The X-axis is inverted for consistency with macOS and X11
|
||||||
_glfwInputScroll(window, -((SHORT) HIWORD(wParam) / (double) WHEEL_DELTA), 0.0);
|
_glfwInputScroll(window, -((SHORT) HIWORD(wParam) / (double) WHEEL_DELTA), 0.0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user