Skip to content

Commit adc536b

Browse files
author
minggo
authored
Update glfw to 3.2.1 (#306)
* update glfw to 3.2.1 for macOS * update glfw to 3.2.1 for windows * add glfw 3.2.1 for linux
1 parent 0ce3b98 commit adc536b

10 files changed

Lines changed: 4757 additions & 27 deletions

File tree

glfw3/include/linux/glfw3.h

Lines changed: 4248 additions & 0 deletions
Large diffs are not rendered by default.

glfw3/include/linux/glfw3native.h

Lines changed: 456 additions & 0 deletions
Large diffs are not rendered by default.

glfw3/include/mac/glfw3.h

100755100644
Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,14 @@ extern "C" {
115115
#define GLFW_CALLBACK_DEFINED
116116
#endif /* CALLBACK */
117117

118-
/* Most Windows GLU headers need wchar_t.
119-
* The OS X OpenGL header blocks the definition of ptrdiff_t by glext.h.
118+
/* Include because most Windows GLU headers need wchar_t and
119+
* the OS X OpenGL header blocks the definition of ptrdiff_t by glext.h.
120120
* Include it unconditionally to avoid surprising side-effects.
121121
*/
122122
#include <stddef.h>
123+
124+
/* Include because it is needed by Vulkan and related functions.
125+
*/
123126
#include <stdint.h>
124127

125128
/* Include the chosen client API headers.
@@ -226,7 +229,7 @@ extern "C" {
226229
* API changes.
227230
* @ingroup init
228231
*/
229-
#define GLFW_VERSION_REVISION 0
232+
#define GLFW_VERSION_REVISION 1
230233
/*! @} */
231234

232235
/*! @name Boolean values
@@ -1182,6 +1185,7 @@ typedef struct GLFWgammaramp
11821185
/*! @brief Image data.
11831186
*
11841187
* @sa @ref cursor_custom
1188+
* @sa @ref window_icon
11851189
*
11861190
* @since Added in version 2.1.
11871191
* @glfw3 Removed format and bytes-per-pixel members.
@@ -1739,6 +1743,10 @@ GLFWAPI void glfwWindowHint(int hint, int value);
17391743
* screen windows, including the creation of so called _windowed full screen_
17401744
* or _borderless full screen_ windows, see @ref window_windowed_full_screen.
17411745
*
1746+
* Once you have created the window, you can switch it between windowed and
1747+
* full screen mode with @ref glfwSetWindowMonitor. If the window has an
1748+
* OpenGL or OpenGL ES context, it will be unaffected.
1749+
*
17421750
* By default, newly created windows use the placement recommended by the
17431751
* window system. To create the window at a specific position, make it
17441752
* initially invisible using the [GLFW_VISIBLE](@ref window_hints_wnd) window
@@ -2390,8 +2398,8 @@ GLFWAPI void glfwFocusWindow(GLFWwindow* window);
23902398
* in full screen on.
23912399
*
23922400
* @param[in] window The window to query.
2393-
* @return The monitor, or `NULL` if the window is in windowed mode or an error
2394-
* occurred.
2401+
* @return The monitor, or `NULL` if the window is in windowed mode or an
2402+
* [error](@ref error_handling) occurred.
23952403
*
23962404
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
23972405
*
@@ -2846,7 +2854,7 @@ GLFWAPI void glfwWaitEventsTimeout(double timeout);
28462854
/*! @brief Posts an empty event to the event queue.
28472855
*
28482856
* This function posts an empty event from the current thread to the event
2849-
* queue, causing @ref glfwWaitEvents to return.
2857+
* queue, causing @ref glfwWaitEvents or @ref glfwWaitEventsTimeout to return.
28502858
*
28512859
* If no windows exist, this function returns immediately. For synchronization
28522860
* of threads in applications that do not create windows, use your threading
@@ -2859,6 +2867,7 @@ GLFWAPI void glfwWaitEventsTimeout(double timeout);
28592867
*
28602868
* @sa @ref events
28612869
* @sa glfwWaitEvents
2870+
* @sa glfwWaitEventsTimeout
28622871
*
28632872
* @since Added in version 3.1.
28642873
*
@@ -3354,7 +3363,7 @@ GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun cbfun);
33543363
* @param[in] cbfun The new callback, or `NULL` to remove the currently set
33553364
* callback.
33563365
* @return The previously set callback, or `NULL` if no callback was set or an
3357-
* error occurred.
3366+
* [error](@ref error_handling) occurred.
33583367
*
33593368
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
33603369
*
@@ -3533,8 +3542,10 @@ GLFWAPI int glfwJoystickPresent(int joy);
35333542
*
35343543
* @param[in] joy The [joystick](@ref joysticks) to query.
35353544
* @param[out] count Where to store the number of axis values in the returned
3536-
* array. This is set to zero if an error occurred.
3537-
* @return An array of axis values, or `NULL` if the joystick is not present.
3545+
* array. This is set to zero if the joystick is not present or an error
3546+
* occurred.
3547+
* @return An array of axis values, or `NULL` if the joystick is not present or
3548+
* an [error](@ref error_handling) occurred.
35383549
*
35393550
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
35403551
* GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
@@ -3565,8 +3576,10 @@ GLFWAPI const float* glfwGetJoystickAxes(int joy, int* count);
35653576
*
35663577
* @param[in] joy The [joystick](@ref joysticks) to query.
35673578
* @param[out] count Where to store the number of button states in the returned
3568-
* array. This is set to zero if an error occurred.
3569-
* @return An array of button states, or `NULL` if the joystick is not present.
3579+
* array. This is set to zero if the joystick is not present or an error
3580+
* occurred.
3581+
* @return An array of button states, or `NULL` if the joystick is not present
3582+
* or an [error](@ref error_handling) occurred.
35703583
*
35713584
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
35723585
* GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
@@ -3599,7 +3612,7 @@ GLFWAPI const unsigned char* glfwGetJoystickButtons(int joy, int* count);
35993612
*
36003613
* @param[in] joy The [joystick](@ref joysticks) to query.
36013614
* @return The UTF-8 encoded name of the joystick, or `NULL` if the joystick
3602-
* is not present.
3615+
* is not present or an [error](@ref error_handling) occurred.
36033616
*
36043617
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
36053618
* GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.

glfw3/include/mac/glfw3native.h

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ extern "C" {
8787
#undef APIENTRY
8888
#include <windows.h>
8989
#elif defined(GLFW_EXPOSE_NATIVE_COCOA)
90-
// #include <ApplicationServices/ApplicationServices.h>
90+
//#include <ApplicationServices/ApplicationServices.h>
9191
#if defined(__OBJC__)
9292
#import <Cocoa/Cocoa.h>
9393
#else

glfw3/include/win32/glfw3.h

100755100644
Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,14 @@ extern "C" {
115115
#define GLFW_CALLBACK_DEFINED
116116
#endif /* CALLBACK */
117117

118-
/* Most Windows GLU headers need wchar_t.
119-
* The OS X OpenGL header blocks the definition of ptrdiff_t by glext.h.
118+
/* Include because most Windows GLU headers need wchar_t and
119+
* the OS X OpenGL header blocks the definition of ptrdiff_t by glext.h.
120120
* Include it unconditionally to avoid surprising side-effects.
121121
*/
122122
#include <stddef.h>
123+
124+
/* Include because it is needed by Vulkan and related functions.
125+
*/
123126
#include <stdint.h>
124127

125128
/* Include the chosen client API headers.
@@ -226,7 +229,7 @@ extern "C" {
226229
* API changes.
227230
* @ingroup init
228231
*/
229-
#define GLFW_VERSION_REVISION 0
232+
#define GLFW_VERSION_REVISION 1
230233
/*! @} */
231234

232235
/*! @name Boolean values
@@ -1182,6 +1185,7 @@ typedef struct GLFWgammaramp
11821185
/*! @brief Image data.
11831186
*
11841187
* @sa @ref cursor_custom
1188+
* @sa @ref window_icon
11851189
*
11861190
* @since Added in version 2.1.
11871191
* @glfw3 Removed format and bytes-per-pixel members.
@@ -1739,6 +1743,10 @@ GLFWAPI void glfwWindowHint(int hint, int value);
17391743
* screen windows, including the creation of so called _windowed full screen_
17401744
* or _borderless full screen_ windows, see @ref window_windowed_full_screen.
17411745
*
1746+
* Once you have created the window, you can switch it between windowed and
1747+
* full screen mode with @ref glfwSetWindowMonitor. If the window has an
1748+
* OpenGL or OpenGL ES context, it will be unaffected.
1749+
*
17421750
* By default, newly created windows use the placement recommended by the
17431751
* window system. To create the window at a specific position, make it
17441752
* initially invisible using the [GLFW_VISIBLE](@ref window_hints_wnd) window
@@ -2390,8 +2398,8 @@ GLFWAPI void glfwFocusWindow(GLFWwindow* window);
23902398
* in full screen on.
23912399
*
23922400
* @param[in] window The window to query.
2393-
* @return The monitor, or `NULL` if the window is in windowed mode or an error
2394-
* occurred.
2401+
* @return The monitor, or `NULL` if the window is in windowed mode or an
2402+
* [error](@ref error_handling) occurred.
23952403
*
23962404
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
23972405
*
@@ -2846,7 +2854,7 @@ GLFWAPI void glfwWaitEventsTimeout(double timeout);
28462854
/*! @brief Posts an empty event to the event queue.
28472855
*
28482856
* This function posts an empty event from the current thread to the event
2849-
* queue, causing @ref glfwWaitEvents to return.
2857+
* queue, causing @ref glfwWaitEvents or @ref glfwWaitEventsTimeout to return.
28502858
*
28512859
* If no windows exist, this function returns immediately. For synchronization
28522860
* of threads in applications that do not create windows, use your threading
@@ -2859,6 +2867,7 @@ GLFWAPI void glfwWaitEventsTimeout(double timeout);
28592867
*
28602868
* @sa @ref events
28612869
* @sa glfwWaitEvents
2870+
* @sa glfwWaitEventsTimeout
28622871
*
28632872
* @since Added in version 3.1.
28642873
*
@@ -3354,7 +3363,7 @@ GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun cbfun);
33543363
* @param[in] cbfun The new callback, or `NULL` to remove the currently set
33553364
* callback.
33563365
* @return The previously set callback, or `NULL` if no callback was set or an
3357-
* error occurred.
3366+
* [error](@ref error_handling) occurred.
33583367
*
33593368
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
33603369
*
@@ -3533,8 +3542,10 @@ GLFWAPI int glfwJoystickPresent(int joy);
35333542
*
35343543
* @param[in] joy The [joystick](@ref joysticks) to query.
35353544
* @param[out] count Where to store the number of axis values in the returned
3536-
* array. This is set to zero if an error occurred.
3537-
* @return An array of axis values, or `NULL` if the joystick is not present.
3545+
* array. This is set to zero if the joystick is not present or an error
3546+
* occurred.
3547+
* @return An array of axis values, or `NULL` if the joystick is not present or
3548+
* an [error](@ref error_handling) occurred.
35383549
*
35393550
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
35403551
* GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
@@ -3565,8 +3576,10 @@ GLFWAPI const float* glfwGetJoystickAxes(int joy, int* count);
35653576
*
35663577
* @param[in] joy The [joystick](@ref joysticks) to query.
35673578
* @param[out] count Where to store the number of button states in the returned
3568-
* array. This is set to zero if an error occurred.
3569-
* @return An array of button states, or `NULL` if the joystick is not present.
3579+
* array. This is set to zero if the joystick is not present or an error
3580+
* occurred.
3581+
* @return An array of button states, or `NULL` if the joystick is not present
3582+
* or an [error](@ref error_handling) occurred.
35703583
*
35713584
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
35723585
* GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
@@ -3599,7 +3612,7 @@ GLFWAPI const unsigned char* glfwGetJoystickButtons(int joy, int* count);
35993612
*
36003613
* @param[in] joy The [joystick](@ref joysticks) to query.
36013614
* @return The UTF-8 encoded name of the joystick, or `NULL` if the joystick
3602-
* is not present.
3615+
* is not present or an [error](@ref error_handling) occurred.
36033616
*
36043617
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
36053618
* GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.

glfw3/include/win32/glfw3native.h

100755100644
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ extern "C" {
8787
#undef APIENTRY
8888
#include <windows.h>
8989
#elif defined(GLFW_EXPOSE_NATIVE_COCOA)
90-
#include <ApplicationServices/ApplicationServices.h>
90+
//#include <ApplicationServices/ApplicationServices.h>
9191
#if defined(__OBJC__)
9292
#import <Cocoa/Cocoa.h>
9393
#else
@@ -195,7 +195,7 @@ GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
195195
*
196196
* @ingroup native
197197
*/
198-
GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
198+
//GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
199199

200200
/*! @brief Returns the `NSWindow` of the specified window.
201201
*

glfw3/prebuilt/linux/libglfw3.a

214 KB
Binary file not shown.

glfw3/prebuilt/mac/libglfw3.a

-104 Bytes
Binary file not shown.
4.82 KB
Binary file not shown.

glfw3/prebuilt/win32/glfw3.lib

-233 KB
Binary file not shown.

0 commit comments

Comments
 (0)