From f637722fa1c12759b981a4c8bc6b8c3493cde9fa Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 27 Aug 2012 02:40:26 +0200 Subject: [PATCH 01/16] Removed MinGW-w64 hack. --- include/GL/glfw3.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h index 050f0c30..5172da21 100644 --- a/include/GL/glfw3.h +++ b/include/GL/glfw3.h @@ -67,12 +67,6 @@ extern "C" { #endif #endif /* APIENTRY */ -/* TEMPORARY MinGW-w64 hacks. - */ -#if __MINGW64__ - #define WINAPI -#endif - /* The following three defines are here solely to make some Windows-based * files happy. Theoretically we could include , but * it has the major drawback of severely polluting our namespace. From 2a8b2ccef4b8f15600a8a36c344c6078a84f31ae Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 27 Aug 2012 03:25:58 +0200 Subject: [PATCH 02/16] Split internal prototypes into APIs. --- src/internal.h | 54 +++++++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/src/internal.h b/src/internal.h index 9129b50c..8fe3b241 100644 --- a/src/internal.h +++ b/src/internal.h @@ -242,38 +242,41 @@ extern _GLFWlibrary _glfwLibrary; //======================================================================== -// Prototypes for platform specific implementation functions +// Prototypes for the platform API +// This is the interface exposed by the platform-specific code for each +// platform and is called by the shared code of the public API +// It mirrors the public API except it uses objects instead of handles //======================================================================== -// Init/terminate +// Platform init and version int _glfwPlatformInit(void); int _glfwPlatformTerminate(void); const char* _glfwPlatformGetVersionString(void); -// Input +// Input mode support void _glfwPlatformEnableSystemKeys(_GLFWwindow* window); void _glfwPlatformDisableSystemKeys(_GLFWwindow* window); void _glfwPlatformSetCursorPos(_GLFWwindow* window, int x, int y); void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode); -// Fullscreen +// Video mode support GLFWvidmode* _glfwPlatformGetVideoModes(int* count); void _glfwPlatformGetDesktopMode(GLFWvidmode* mode); -// Gamma ramp +// Gamma ramp support void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp); void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp); -// Clipboard +// Clipboard support void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string); const char* _glfwPlatformGetClipboardString(_GLFWwindow* window); -// Joystick +// Joystick input int _glfwPlatformGetJoystickParam(int joy, int param); int _glfwPlatformGetJoystickPos(int joy, float* pos, int numaxes); int _glfwPlatformGetJoystickButtons(int joy, unsigned char* buttons, int numbuttons); -// Time +// Time input double _glfwPlatformGetTime(void); void _glfwPlatformSetTime(double time); @@ -286,7 +289,7 @@ void _glfwPlatformSetWindowPos(_GLFWwindow* window, int x, int y); void _glfwPlatformIconifyWindow(_GLFWwindow* window); void _glfwPlatformRestoreWindow(_GLFWwindow* window); -// Event management +// Event processing void _glfwPlatformPollEvents(void); void _glfwPlatformWaitEvents(void); @@ -301,19 +304,12 @@ void _glfwPlatformCopyContext(_GLFWwindow* src, _GLFWwindow* dst, unsigned long //======================================================================== -// Prototypes for platform independent internal functions +// Prototypes for the event API +// This is used by the platform-specific code to notify the shared code of +// events that can be translated into state changes and/or callback calls, +// instead of directly calling callbacks or modifying shared state //======================================================================== -// Fullscren management (fullscreen.c) -int _glfwCompareVideoModes(const GLFWvidmode* first, const GLFWvidmode* second); -void _glfwSplitBPP(int bpp, int* red, int* green, int* blue); - -// Error handling (init.c) -void _glfwSetError(int error, const char* format, ...); - -// Window management (window.c) -void _glfwSetDefaultWindowHints(void); - // Window event notification (window.c) void _glfwInputWindowFocus(_GLFWwindow* window, GLboolean activated); void _glfwInputWindowPos(_GLFWwindow* window, int x, int y); @@ -330,6 +326,24 @@ void _glfwInputMouseClick(_GLFWwindow* window, int button, int action); void _glfwInputCursorMotion(_GLFWwindow* window, int x, int y); void _glfwInputCursorEnter(_GLFWwindow* window, int entered); + +//======================================================================== +// Prototypes for internal utility functions +// These functions are shared code and may be used by any part of GLFW +// Each platform may add its own utility functions, but those may only be +// called by the platform-specific code +//======================================================================== + +// Fullscren management (fullscreen.c) +int _glfwCompareVideoModes(const GLFWvidmode* first, const GLFWvidmode* second); +void _glfwSplitBPP(int bpp, int* red, int* green, int* blue); + +// Error handling (init.c) +void _glfwSetError(int error, const char* format, ...); + +// Window management (window.c) +void _glfwSetDefaultWindowHints(void); + // OpenGL context helpers (opengl.c) int _glfwStringInExtensionString(const char* string, const GLubyte* extensions); const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired, From 96963213343971959c94dc94d03b8b93e22730ac Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 27 Aug 2012 13:52:10 +0200 Subject: [PATCH 03/16] Fixed return value of glfwGetCurrentContext. --- src/opengl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opengl.c b/src/opengl.c index 67c6f414..a23a5f34 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -509,7 +509,7 @@ GLFWAPI GLFWwindow glfwGetCurrentContext(void) if (!_glfwInitialized) { _glfwSetError(GLFW_NOT_INITIALIZED, NULL); - return GL_FALSE; + return NULL; } return _glfwLibrary.currentWindow; From e10d935efe8f3da472c1db98f977378020a74a8b Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 28 Aug 2012 15:03:57 +0200 Subject: [PATCH 04/16] API tag and error message cleanup. --- src/cocoa_clipboard.m | 4 ++-- src/cocoa_fullscreen.m | 2 +- src/cocoa_gamma.c | 2 +- src/cocoa_input.m | 2 +- src/cocoa_joystick.m | 2 +- src/cocoa_time.c | 2 +- src/cocoa_window.m | 32 +++++++++++++++----------------- src/win32_clipboard.c | 14 +++++++------- src/win32_dllmain.c | 2 +- src/win32_fullscreen.c | 2 +- src/win32_gamma.c | 2 +- src/win32_input.c | 2 +- src/win32_joystick.c | 2 +- src/win32_opengl.c | 40 +++++++++++++++++++--------------------- src/win32_time.c | 2 +- src/win32_window.c | 14 +++++++------- src/window.c | 5 ++--- src/x11_clipboard.c | 4 ++-- src/x11_fullscreen.c | 4 ++-- src/x11_gamma.c | 6 +++--- src/x11_init.c | 4 ++-- src/x11_input.c | 2 +- src/x11_joystick.c | 2 +- src/x11_keysym2unicode.c | 2 +- src/x11_opengl.c | 33 ++++++++++++++------------------- src/x11_time.c | 2 +- src/x11_window.c | 7 +++---- 27 files changed, 93 insertions(+), 104 deletions(-) diff --git a/src/cocoa_clipboard.m b/src/cocoa_clipboard.m index 56b98437..99918f77 100644 --- a/src/cocoa_clipboard.m +++ b/src/cocoa_clipboard.m @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: Cocoa/NSOpenGL +// Platform: Cocoa // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ @@ -70,7 +70,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window) if (!object) { _glfwSetError(GLFW_PLATFORM_ERROR, - "Cocoa/NSGL: Failed to retrieve object from pasteboard"); + "Cocoa: Failed to retrieve object from pasteboard"); return NULL; } diff --git a/src/cocoa_fullscreen.m b/src/cocoa_fullscreen.m index 9382993b..47f86739 100644 --- a/src/cocoa_fullscreen.m +++ b/src/cocoa_fullscreen.m @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: Cocoa/NSOpenGL +// Platform: Cocoa // API Version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/cocoa_gamma.c b/src/cocoa_gamma.c index 06904516..85d1e489 100644 --- a/src/cocoa_gamma.c +++ b/src/cocoa_gamma.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: Cocoa/NSOpenGL +// Platform: Cocoa // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/cocoa_input.m b/src/cocoa_input.m index c2bb503c..11e1083b 100644 --- a/src/cocoa_input.m +++ b/src/cocoa_input.m @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: Cocoa/NSOpenGL +// Platform: Cocoa // API Version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/cocoa_joystick.m b/src/cocoa_joystick.m index f3e113b4..ff4ba958 100644 --- a/src/cocoa_joystick.m +++ b/src/cocoa_joystick.m @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: Cocoa/NSOpenGL +// Platform: Cocoa // API Version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/cocoa_time.c b/src/cocoa_time.c index 745b4239..d80dd147 100644 --- a/src/cocoa_time.c +++ b/src/cocoa_time.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: Cocoa/NSOpenGL +// Platform: Cocoa // API Version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/cocoa_window.m b/src/cocoa_window.m index aaaff289..5129a21f 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -674,8 +674,7 @@ static GLboolean createWindow(_GLFWwindow* window, if (window->NS.object == nil) { - _glfwSetError(GLFW_PLATFORM_ERROR, - "Cocoa/NSOpenGL: Failed to create window"); + _glfwSetError(GLFW_PLATFORM_ERROR, "Cocoa: Failed to create window"); return GL_FALSE; } @@ -717,8 +716,8 @@ static GLboolean createContext(_GLFWwindow* window, (wndconfig->glMajor == 3 && wndconfig->glMinor != 2)) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "Cocoa/NSOpenGL: The targeted version of Mac OS X does " - "not support any OpenGL version above 2.1 except 3.2"); + "NSOpenGL: The targeted version of Mac OS X does not " + "support any OpenGL version above 2.1 except 3.2"); return GL_FALSE; } @@ -727,8 +726,8 @@ static GLboolean createContext(_GLFWwindow* window, if (!wndconfig->glForward) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "Cocoa/NSOpenGL: The targeted version of Mac OS X " - "only supports OpenGL 3.2 contexts if they are " + "NSOpenGL: The targeted version of Mac OS X only " + "supports OpenGL 3.2 contexts if they are " "forward-compatible"); return GL_FALSE; } @@ -736,8 +735,8 @@ static GLboolean createContext(_GLFWwindow* window, if (wndconfig->glProfile != GLFW_OPENGL_CORE_PROFILE) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "Cocoa/NSOpenGL: The targeted version of Mac OS X " - "only supports OpenGL 3.2 contexts if they use the " + "NSOpenGL: The targeted version of Mac OS X only " + "supports OpenGL 3.2 contexts if they use the " "core profile"); return GL_FALSE; } @@ -747,8 +746,8 @@ static GLboolean createContext(_GLFWwindow* window, if (wndconfig->glMajor > 2) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "Cocoa/NSOpenGL: The targeted version of Mac OS X does " - "not support OpenGL version 3.0 or above"); + "NSOpenGL: The targeted version of Mac OS X does not " + "support OpenGL version 3.0 or above"); return GL_FALSE; } #endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ @@ -757,8 +756,8 @@ static GLboolean createContext(_GLFWwindow* window, if (wndconfig->glRobustness) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "Cocoa/NSOpenGL: Mac OS X does not support OpenGL " - "robustness strategies"); + "NSOpenGL: Mac OS X does not support OpenGL robustness " + "strategies"); return GL_FALSE; } @@ -821,7 +820,7 @@ static GLboolean createContext(_GLFWwindow* window, if (window->NSGL.pixelFormat == nil) { _glfwSetError(GLFW_PLATFORM_ERROR, - "Cocoa/NSOpenGL: Failed to create OpenGL pixel format"); + "NSOpenGL: Failed to create OpenGL pixel format"); return GL_FALSE; } @@ -836,7 +835,7 @@ static GLboolean createContext(_GLFWwindow* window, if (window->NSGL.context == nil) { _glfwSetError(GLFW_PLATFORM_ERROR, - "Cocoa/NSOpenGL: Failed to create OpenGL context"); + "NSOpenGL: Failed to create OpenGL context"); return GL_FALSE; } @@ -868,8 +867,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window, if (_glfwLibrary.NS.delegate == nil) { _glfwSetError(GLFW_PLATFORM_ERROR, - "Cocoa/NSOpenGL: Failed to create application " - "delegate"); + "Cocoa: Failed to create application delegate"); return GL_FALSE; } @@ -880,7 +878,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window, if (window->NS.delegate == nil) { _glfwSetError(GLFW_PLATFORM_ERROR, - "Cocoa/NSOpenGL: Failed to create window delegate"); + "Cocoa: Failed to create window delegate"); return GL_FALSE; } diff --git a/src/win32_clipboard.c b/src/win32_clipboard.c index ca31964d..22cdb8f6 100644 --- a/src/win32_clipboard.c +++ b/src/win32_clipboard.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: Win32/WGL +// Platform: Win32 // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ @@ -53,7 +53,7 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string) if (!wideString) { _glfwSetError(GLFW_PLATFORM_ERROR, - "Win32/WGL: Failed to convert clipboard string to " + "Win32: Failed to convert clipboard string to " "wide string"); return; } @@ -66,7 +66,7 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string) free(wideString); _glfwSetError(GLFW_PLATFORM_ERROR, - "Win32/WGL: Failed to allocate global handle for clipboard"); + "Win32: Failed to allocate global handle for clipboard"); return; } @@ -79,7 +79,7 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string) free(wideString); _glfwSetError(GLFW_PLATFORM_ERROR, - "Win32/WGL: Failed to open clipboard"); + "Win32: Failed to open clipboard"); return; } @@ -108,7 +108,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window) if (!OpenClipboard(window->Win32.handle)) { _glfwSetError(GLFW_PLATFORM_ERROR, - "Win32/WGL: Failed to open clipboard"); + "Win32: Failed to open clipboard"); return NULL; } @@ -118,7 +118,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window) CloseClipboard(); _glfwSetError(GLFW_PLATFORM_ERROR, - "Win32/WGL: Failed to retrieve clipboard data"); + "Win32: Failed to retrieve clipboard data"); return NULL; } @@ -132,7 +132,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window) if (!_glfwLibrary.Win32.clipboardString) { _glfwSetError(GLFW_PLATFORM_ERROR, - "Win32/WGL: Failed to convert wide string to UTF-8"); + "Win32: Failed to convert wide string to UTF-8"); return NULL; } diff --git a/src/win32_dllmain.c b/src/win32_dllmain.c index 95258ccc..98f9ab2a 100644 --- a/src/win32_dllmain.c +++ b/src/win32_dllmain.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: Win32/WGL +// Platform: Win32 // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/win32_fullscreen.c b/src/win32_fullscreen.c index 3e28e30e..35d75054 100644 --- a/src/win32_fullscreen.c +++ b/src/win32_fullscreen.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: Win32/WGL +// Platform: Win32 // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/win32_gamma.c b/src/win32_gamma.c index 36fbd3a4..74958191 100644 --- a/src/win32_gamma.c +++ b/src/win32_gamma.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: Win32/WGL +// Platform: Win32 // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/win32_input.c b/src/win32_input.c index d3785aa3..a9195838 100644 --- a/src/win32_input.c +++ b/src/win32_input.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: Win32/WGL +// Platform: Win32 // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/win32_joystick.c b/src/win32_joystick.c index c27218db..fcc6b599 100644 --- a/src/win32_joystick.c +++ b/src/win32_joystick.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: Win32/WGL +// Platform: Win32 // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/win32_opengl.c b/src/win32_opengl.c index 2c676c91..bf684094 100644 --- a/src/win32_opengl.c +++ b/src/win32_opengl.c @@ -171,15 +171,14 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found) if (!available) { - _glfwSetError(GLFW_OPENGL_UNAVAILABLE, "Win32/WGL: No pixel formats found"); + _glfwSetError(GLFW_OPENGL_UNAVAILABLE, "WGL: No pixel formats found"); return NULL; } fbconfigs = (_GLFWfbconfig*) malloc(sizeof(_GLFWfbconfig) * available); if (!fbconfigs) { - _glfwSetError(GLFW_OUT_OF_MEMORY, - "Win32/WGL: Failed to allocate _GLFWfbconfig array"); + _glfwSetError(GLFW_OUT_OF_MEMORY, NULL); return NULL; } @@ -285,6 +284,9 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found) if (*found == 0) { + _glfwSetError(GLFW_PLATFORM_ERROR, + "Win32/WGL: No usable pixel formats found"); + free(fbconfigs); return NULL; } @@ -310,15 +312,15 @@ static GLboolean createContext(_GLFWwindow* window, if (!DescribePixelFormat(window->WGL.DC, pixelFormat, sizeof(pfd), &pfd)) { - _glfwSetError(GLFW_OPENGL_UNAVAILABLE, - "Win32/WGL: Failed to retrieve PFD for selected pixel format"); + _glfwSetError(GLFW_PLATFORM_ERROR, + "Win32: Failed to retrieve PFD for selected pixel format"); return GL_FALSE; } if (!SetPixelFormat(window->WGL.DC, pixelFormat, &pfd)) { - _glfwSetError(GLFW_OPENGL_UNAVAILABLE, - "Win32/WGL: Failed to set selected pixel format"); + _glfwSetError(GLFW_PLATFORM_ERROR, + "Win32: Failed to set selected pixel format"); return GL_FALSE; } @@ -360,7 +362,7 @@ static GLboolean createContext(_GLFWwindow* window, if (!window->WGL.ARB_create_context_profile) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "Win32/WGL: OpenGL profile requested but " + "WGL: OpenGL profile requested but " "WGL_ARB_create_context_profile is unavailable"); return GL_FALSE; } @@ -369,7 +371,7 @@ static GLboolean createContext(_GLFWwindow* window, !window->WGL.EXT_create_context_es2_profile) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "Win32/WGL: OpenGL ES 2.x profile requested but " + "WGL: OpenGL ES 2.x profile requested but " "WGL_EXT_create_context_es2_profile is unavailable"); return GL_FALSE; } @@ -392,7 +394,7 @@ static GLboolean createContext(_GLFWwindow* window, if (!window->WGL.ARB_create_context_robustness) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "Win32/WGL: An OpenGL robustness strategy was " + "WGL: An OpenGL robustness strategy was " "requested but WGL_ARB_create_context_robustness " "is unavailable"); return GL_FALSE; @@ -415,7 +417,7 @@ static GLboolean createContext(_GLFWwindow* window, if (!window->WGL.context) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "Win32/WGL: Failed to create OpenGL context"); + "WGL: Failed to create OpenGL context"); return GL_FALSE; } } @@ -425,7 +427,7 @@ static GLboolean createContext(_GLFWwindow* window, if (!window->WGL.context) { _glfwSetError(GLFW_PLATFORM_ERROR, - "Win32/WGL: Failed to create OpenGL context"); + "WGL: Failed to create OpenGL context"); return GL_FALSE; } @@ -434,8 +436,8 @@ static GLboolean createContext(_GLFWwindow* window, if (!wglShareLists(share, window->WGL.context)) { _glfwSetError(GLFW_PLATFORM_ERROR, - "Win32/WGL: Failed to enable sharing with " - "specified OpenGL context"); + "WGL: Failed to enable sharing with specified " + "OpenGL context"); return GL_FALSE; } } @@ -466,7 +468,7 @@ int _glfwCreateContext(_GLFWwindow* window, if (!window->WGL.DC) { _glfwSetError(GLFW_PLATFORM_ERROR, - "Win32/WGL: Failed to retrieve DC for window"); + "Win32: Failed to retrieve DC for window"); return GL_FALSE; } @@ -478,16 +480,12 @@ int _glfwCreateContext(_GLFWwindow* window, fbconfigs = getFBConfigs(window, &fbcount); if (!fbconfigs) - { - _glfwSetError(GLFW_PLATFORM_ERROR, - "Win32/WGL: No usable pixel formats found"); return GL_FALSE; - } result = _glfwChooseFBConfig(fbconfig, fbconfigs, fbcount); if (!result) { - _glfwSetError(GLFW_PLATFORM_ERROR, + _glfwSetError(GLFW_FORMAT_UNAVAILABLE, "Win32/WGL: No pixel format matched the criteria"); free(fbconfigs); @@ -620,7 +618,7 @@ void _glfwPlatformCopyContext(_GLFWwindow* src, _GLFWwindow* dst, unsigned long if (!wglCopyContext(src->WGL.context, dst->WGL.context, mask)) { _glfwSetError(GLFW_PLATFORM_ERROR, - "Win32/WGL: Failed to copy OpenGL context attributes"); + "WGL: Failed to copy OpenGL context attributes"); } } diff --git a/src/win32_time.c b/src/win32_time.c index f3bd173a..1e1d57f4 100644 --- a/src/win32_time.c +++ b/src/win32_time.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: Win32/WGL +// Platform: Win32 // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/win32_window.c b/src/win32_window.c index 77b99026..feccb833 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -813,7 +813,7 @@ static ATOM registerWindowClass(void) if (!classAtom) { _glfwSetError(GLFW_PLATFORM_ERROR, - "Win32/WGL: Failed to register window class"); + "Win32: Failed to register window class"); return 0; } @@ -886,7 +886,7 @@ static int createWindow(_GLFWwindow* window, if (!wideTitle) { _glfwSetError(GLFW_PLATFORM_ERROR, - "glfwCreateWindow: Failed to convert title to wide string"); + "Win32: Failed to convert title to wide string"); return GL_FALSE; } @@ -904,7 +904,7 @@ static int createWindow(_GLFWwindow* window, if (!window->Win32.handle) { - _glfwSetError(GLFW_PLATFORM_ERROR, "Win32/WGL: Failed to create window"); + _glfwSetError(GLFW_PLATFORM_ERROR, "Win32: Failed to create window"); return GL_FALSE; } @@ -1008,8 +1008,8 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window, if (!window->WGL.ARB_create_context) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "Win32/WGL: A forward compatible OpenGL context " - "requested but WGL_ARB_create_context is unavailable"); + "WGL: A forward compatible OpenGL context requested " + "but WGL_ARB_create_context is unavailable"); return GL_FALSE; } @@ -1021,7 +1021,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window, if (!window->WGL.ARB_create_context_profile) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "Win32/WGL: OpenGL profile requested but " + "WGL: OpenGL profile requested but " "WGL_ARB_create_context_profile is unavailable"); return GL_FALSE; } @@ -1107,7 +1107,7 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title) if (!wideTitle) { _glfwSetError(GLFW_PLATFORM_ERROR, - "glfwSetWindowTitle: Failed to convert title to wide string"); + "Win32: Failed to convert title to wide string"); return; } diff --git a/src/window.c b/src/window.c index 4e95129a..acd48195 100644 --- a/src/window.c +++ b/src/window.c @@ -267,7 +267,7 @@ GLFWAPI GLFWwindow glfwCreateWindow(int width, int height, if (mode != GLFW_WINDOWED && mode != GLFW_FULLSCREEN) { _glfwSetError(GLFW_INVALID_ENUM, - "glfwCreateWindow: Invalid enum for 'mode' parameter"); + "glfwCreateWindow: Invalid window mode"); return GL_FALSE; } @@ -292,8 +292,7 @@ GLFWAPI GLFWwindow glfwCreateWindow(int width, int height, window = (_GLFWwindow*) malloc(sizeof(_GLFWwindow)); if (!window) { - _glfwSetError(GLFW_OUT_OF_MEMORY, - "glfwCreateWindow: Failed to allocate window structure"); + _glfwSetError(GLFW_OUT_OF_MEMORY, NULL); return NULL; } diff --git a/src/x11_clipboard.c b/src/x11_clipboard.c index a833ed1f..5bc92d44 100644 --- a/src/x11_clipboard.c +++ b/src/x11_clipboard.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: X11/GLX +// Platform: X11 // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ @@ -182,7 +182,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window) if (_glfwLibrary.X11.selection.status == _GLFW_CONVERSION_FAILED) { _glfwSetError(GLFW_FORMAT_UNAVAILABLE, - "X11/GLX: Failed to convert selection to string"); + "X11: Failed to convert selection to string"); return NULL; } diff --git a/src/x11_fullscreen.c b/src/x11_fullscreen.c index 8c4138d3..346aefb7 100644 --- a/src/x11_fullscreen.c +++ b/src/x11_fullscreen.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: X11/GLX +// Platform: X11 // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ @@ -442,7 +442,7 @@ GLFWvidmode* _glfwPlatformGetVideoModes(int* found) if (visuals == NULL) { _glfwSetError(GLFW_PLATFORM_ERROR, - "X11/GLX: Failed to retrieve the available visuals"); + "X11: Failed to retrieve the available visuals"); return 0; } diff --git a/src/x11_gamma.c b/src/x11_gamma.c index 44cd1139..148ae740 100644 --- a/src/x11_gamma.c +++ b/src/x11_gamma.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: X11/GLX +// Platform: X11 // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ @@ -115,7 +115,7 @@ void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp) if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE) { _glfwSetError(GLFW_PLATFORM_ERROR, - "X11/GLX: Failed to get gamma ramp due to size " + "X11: Failed to get gamma ramp due to size " "incompatibility"); return; } @@ -166,7 +166,7 @@ void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp) if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE) { _glfwSetError(GLFW_PLATFORM_ERROR, - "X11/GLX: Failed to set gamma ramp due to size " + "X11: Failed to set gamma ramp due to size " "incompatibility"); return; } diff --git a/src/x11_init.c b/src/x11_init.c index 372fc2dd..35f66c0f 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -491,7 +491,7 @@ static GLboolean initDisplay(void) _glfwLibrary.X11.display = XOpenDisplay(NULL); if (!_glfwLibrary.X11.display) { - _glfwSetError(GLFW_OPENGL_UNAVAILABLE, "X11/GLX: Failed to open X display"); + _glfwSetError(GLFW_OPENGL_UNAVAILABLE, "X11: Failed to open X display"); return GL_FALSE; } @@ -525,7 +525,7 @@ static GLboolean initDisplay(void) &_glfwLibrary.X11.RandR.minorVersion)) { _glfwSetError(GLFW_PLATFORM_ERROR, - "X11/GLX: Failed to query RandR version"); + "X11: Failed to query RandR version"); return GL_FALSE; } } diff --git a/src/x11_input.c b/src/x11_input.c index 49961395..2ea8b8c4 100644 --- a/src/x11_input.c +++ b/src/x11_input.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: X11 (Unix) +// Platform: X11 // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/x11_joystick.c b/src/x11_joystick.c index 523a4b3d..8492850b 100644 --- a/src/x11_joystick.c +++ b/src/x11_joystick.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: X11/GLX +// Platform: X11 // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/x11_keysym2unicode.c b/src/x11_keysym2unicode.c index 1f610fdd..c0d10c6e 100644 --- a/src/x11_keysym2unicode.c +++ b/src/x11_keysym2unicode.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: X11/GLX +// Platform: X11 // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/x11_opengl.c b/src/x11_opengl.c index 2a5cc451..a7c3f61b 100644 --- a/src/x11_opengl.c +++ b/src/x11_opengl.c @@ -78,7 +78,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found) if (!_glfwLibrary.GLX.SGIX_fbconfig) { _glfwSetError(GLFW_OPENGL_UNAVAILABLE, - "X11/GLX: GLXFBConfig support not found"); + "GLX: GLXFBConfig support not found"); return NULL; } } @@ -101,7 +101,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found) if (!count) { _glfwSetError(GLFW_OPENGL_UNAVAILABLE, - "X11/GLX: No GLXFBConfigs returned"); + "GLX: No GLXFBConfigs returned"); return NULL; } } @@ -113,7 +113,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found) if (!count) { _glfwSetError(GLFW_OPENGL_UNAVAILABLE, - "X11/GLX: No GLXFBConfigs returned"); + "GLX: No GLXFBConfigs returned"); return NULL; } } @@ -121,8 +121,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found) result = (_GLFWfbconfig*) malloc(sizeof(_GLFWfbconfig) * count); if (!result) { - _glfwSetError(GLFW_OUT_OF_MEMORY, - "X11/GLX: Failed to allocate _GLFWfbconfig array"); + _glfwSetError(GLFW_OUT_OF_MEMORY, NULL); return NULL; } @@ -242,7 +241,7 @@ static int createContext(_GLFWwindow* window, if (fbconfig == NULL) { _glfwSetError(GLFW_PLATFORM_ERROR, - "X11/GLX: Failed to retrieve the selected GLXFBConfig"); + "GLX: Failed to retrieve the selected GLXFBConfig"); return GL_FALSE; } } @@ -264,7 +263,7 @@ static int createContext(_GLFWwindow* window, XFree(fbconfig); _glfwSetError(GLFW_PLATFORM_ERROR, - "X11/GLX: Failed to retrieve visual for GLXFBConfig"); + "GLX: Failed to retrieve visual for GLXFBConfig"); return GL_FALSE; } @@ -303,7 +302,7 @@ static int createContext(_GLFWwindow* window, if (!_glfwLibrary.GLX.ARB_create_context_profile) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "X11/GLX: An OpenGL profile requested but " + "GLX: An OpenGL profile requested but " "GLX_ARB_create_context_profile is unavailable"); return GL_FALSE; } @@ -312,7 +311,7 @@ static int createContext(_GLFWwindow* window, !_glfwLibrary.GLX.EXT_create_context_es2_profile) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "X11/GLX: OpenGL ES 2.x profile requested but " + "GLX: OpenGL ES 2.x profile requested but " "GLX_EXT_create_context_es2_profile is unavailable"); return GL_FALSE; } @@ -334,7 +333,7 @@ static int createContext(_GLFWwindow* window, if (!_glfwLibrary.GLX.ARB_create_context_robustness) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "X11/GLX: An OpenGL robustness strategy was " + "GLX: An OpenGL robustness strategy was " "requested but GLX_ARB_create_context_robustness " "is unavailable"); return GL_FALSE; @@ -397,7 +396,7 @@ static int createContext(_GLFWwindow* window, // TODO: Handle all the various error codes here _glfwSetError(GLFW_PLATFORM_ERROR, - "X11/GLX: Failed to create OpenGL context"); + "GLX: Failed to create OpenGL context"); return GL_FALSE; } @@ -437,7 +436,7 @@ int _glfwInitOpenGL(void) if (!_glfwLibrary.GLX.libGL) { - _glfwSetError(GLFW_PLATFORM_ERROR, "X11/GLX: Failed to find libGL"); + _glfwSetError(GLFW_PLATFORM_ERROR, "GLX: Failed to find libGL"); return GL_FALSE; } #endif @@ -445,7 +444,7 @@ int _glfwInitOpenGL(void) // Check if GLX is supported on this display if (!glXQueryExtension(_glfwLibrary.X11.display, NULL, NULL)) { - _glfwSetError(GLFW_OPENGL_UNAVAILABLE, "X11/GLX: GLX support not found"); + _glfwSetError(GLFW_OPENGL_UNAVAILABLE, "GLX: GLX support not found"); return GL_FALSE; } @@ -454,7 +453,7 @@ int _glfwInitOpenGL(void) &_glfwLibrary.GLX.minorVersion)) { _glfwSetError(GLFW_OPENGL_UNAVAILABLE, - "X11/GLX: Failed to query GLX version"); + "GLX: Failed to query GLX version"); return GL_FALSE; } @@ -565,17 +564,13 @@ int _glfwCreateContext(_GLFWwindow* window, fbconfigs = getFBConfigs(window, &fbcount); if (!fbconfigs) - { - _glfwSetError(GLFW_PLATFORM_ERROR, - "X11/GLX: No usable GLXFBConfigs found"); return GL_FALSE; - } result = _glfwChooseFBConfig(fbconfig, fbconfigs, fbcount); if (!result) { _glfwSetError(GLFW_PLATFORM_ERROR, - "X11/GLX: No GLXFBConfig matched the criteria"); + "GLX: No GLXFBConfig matched the criteria"); free(fbconfigs); return GL_FALSE; diff --git a/src/x11_time.c b/src/x11_time.c index f1445233..bf3335d3 100644 --- a/src/x11_time.c +++ b/src/x11_time.c @@ -1,6 +1,6 @@ //======================================================================== // GLFW - An OpenGL library -// Platform: X11/GLX +// Platform: X11 // API version: 3.0 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ diff --git a/src/x11_window.c b/src/x11_window.c index 6d7021a0..a34449d8 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -131,8 +131,7 @@ static GLboolean createWindow(_GLFWwindow* window, // TODO: Handle all the various error codes here and translate them // to GLFW errors - _glfwSetError(GLFW_PLATFORM_ERROR, - "X11/GLX: Failed to create window"); + _glfwSetError(GLFW_PLATFORM_ERROR, "X11: Failed to create window"); return GL_FALSE; } } @@ -191,7 +190,7 @@ static GLboolean createWindow(_GLFWwindow* window, if (!hints) { _glfwSetError(GLFW_OUT_OF_MEMORY, - "X11/GLX: Failed to allocate WM hints"); + "X11: Failed to allocate WM hints"); return GL_FALSE; } @@ -208,7 +207,7 @@ static GLboolean createWindow(_GLFWwindow* window, if (!hints) { _glfwSetError(GLFW_OUT_OF_MEMORY, - "X11/GLX: Failed to allocate size hints"); + "X11: Failed to allocate size hints"); return GL_FALSE; } From 53245d754e350fc96370e6d28b7678c439a857c2 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 28 Aug 2012 20:16:43 +0200 Subject: [PATCH 05/16] Added detection of joystick disconnect on X11. --- src/x11_joystick.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/x11_joystick.c b/src/x11_joystick.c index 8492850b..7f4fdbc1 100644 --- a/src/x11_joystick.c +++ b/src/x11_joystick.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -109,6 +110,7 @@ static void pollJoystickEvents(void) { #ifdef _GLFW_USE_LINUX_JOYSTICKS int i; + ssize_t result; struct js_event e; for (i = 0; i <= GLFW_JOYSTICK_LAST; i++) @@ -117,8 +119,17 @@ static void pollJoystickEvents(void) continue; // Read all queued events (non-blocking) - while (read(_glfwLibrary.X11.joystick[i].fd, &e, sizeof(e)) > 0) + for (;;) { + errno = 0; + result = read(_glfwLibrary.X11.joystick[i].fd, &e, sizeof(e)); + + if (errno == ENODEV) + _glfwLibrary.X11.joystick[i].present = GL_FALSE; + + if (result <= 0) + break; + // We don't care if it's an init event or not e.type &= ~JS_EVENT_INIT; @@ -221,6 +232,8 @@ void _glfwTerminateJoysticks(void) int _glfwPlatformGetJoystickParam(int joy, int param) { + pollJoystickEvents(); + if (!_glfwLibrary.X11.joystick[joy].present) return 0; @@ -251,11 +264,11 @@ int _glfwPlatformGetJoystickPos(int joy, float* pos, int numAxes) { int i; + pollJoystickEvents(); + if (!_glfwLibrary.X11.joystick[joy].present) return 0; - pollJoystickEvents(); - if (_glfwLibrary.X11.joystick[joy].numAxes < numAxes) numAxes = _glfwLibrary.X11.joystick[joy].numAxes; @@ -275,11 +288,11 @@ int _glfwPlatformGetJoystickButtons(int joy, unsigned char* buttons, { int i; + pollJoystickEvents(); + if (!_glfwLibrary.X11.joystick[joy].present) return 0; - pollJoystickEvents(); - if (_glfwLibrary.X11.joystick[joy].numButtons < numButtons) numButtons = _glfwLibrary.X11.joystick[joy].numButtons; From 54fceaaf64a7d5205953a472e774d1ac748ee31a Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 28 Aug 2012 20:24:37 +0200 Subject: [PATCH 06/16] Clarified result comparison. --- src/x11_joystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x11_joystick.c b/src/x11_joystick.c index 7f4fdbc1..09885373 100644 --- a/src/x11_joystick.c +++ b/src/x11_joystick.c @@ -127,7 +127,7 @@ static void pollJoystickEvents(void) if (errno == ENODEV) _glfwLibrary.X11.joystick[i].present = GL_FALSE; - if (result <= 0) + if (result < sizeof(e)) break; // We don't care if it's an init event or not From f50d38f14815979b3a9f21febbf4a96433778b45 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 28 Aug 2012 22:56:35 +0200 Subject: [PATCH 07/16] Moved glfwinfo version check to before glfwInit. --- tests/glfwinfo.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/tests/glfwinfo.c b/tests/glfwinfo.c index 90fd329f..11a84612 100644 --- a/tests/glfwinfo.c +++ b/tests/glfwinfo.c @@ -181,6 +181,28 @@ int main(int argc, char** argv) argc -= optind; argv += optind; + // Report GLFW version + + glfwGetVersion(&major, &minor, &revision); + + printf("GLFW header version: %u.%u.%u\n", + GLFW_VERSION_MAJOR, + GLFW_VERSION_MINOR, + GLFW_VERSION_REVISION); + + printf("GLFW library version: %u.%u.%u\n", major, minor, revision); + + if (major != GLFW_VERSION_MAJOR || + minor != GLFW_VERSION_MINOR || + revision != GLFW_VERSION_REVISION) + { + printf("*** WARNING: GLFW version mismatch! ***\n"); + } + + printf("GLFW library version string: \"%s\"\n", glfwGetVersionString()); + + // Initialize GLFW and create window + glfwSetErrorCallback(error_callback); if (!glfwInit()) @@ -216,26 +238,6 @@ int main(int argc, char** argv) glfwMakeContextCurrent(window); - // Report GLFW version - - glfwGetVersion(&major, &minor, &revision); - - printf("GLFW header version: %u.%u.%u\n", - GLFW_VERSION_MAJOR, - GLFW_VERSION_MINOR, - GLFW_VERSION_REVISION); - - printf("GLFW library version: %u.%u.%u\n", major, minor, revision); - - if (major != GLFW_VERSION_MAJOR || - minor != GLFW_VERSION_MINOR || - revision != GLFW_VERSION_REVISION) - { - printf("*** WARNING: GLFW version mismatch! ***\n"); - } - - printf("GLFW library version string: \"%s\"\n", glfwGetVersionString()); - // Report OpenGL version printf("OpenGL context version string: \"%s\"\n", glGetString(GL_VERSION)); From 3ef7c554585ce80621d5710c7ce052739d82fad4 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 29 Aug 2012 01:24:53 +0200 Subject: [PATCH 08/16] Added credit. --- readme.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.html b/readme.html index 39d0739b..23c9113f 100644 --- a/readme.html +++ b/readme.html @@ -950,6 +950,8 @@ their skills. Special thanks go out to:

  • Samuli Tuomola, for support, bug reports and testing
  • +
  • Torsten Walluhn, for fixing various compilation issues on OS X
  • +
  • Frank Wille, for helping with the AmigaOS port and making GLFW compile under IRIX 5.3
  • From 54f1a57f8d33faaa2f569a74cebdff557b5a851b Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 29 Aug 2012 16:00:54 +0200 Subject: [PATCH 09/16] Added channel bit depth hint defaults. --- src/window.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/window.c b/src/window.c index acd48195..e59a1d25 100644 --- a/src/window.c +++ b/src/window.c @@ -84,6 +84,12 @@ void _glfwSetDefaultWindowHints(void) // The default is to allow window resizing _glfwLibrary.hints.resizable = GL_TRUE; + + // The default is 24 bits of depth, 8 bits of color + _glfwLibrary.hints.depthBits = 24; + _glfwLibrary.hints.redBits = 8; + _glfwLibrary.hints.greenBits = 8; + _glfwLibrary.hints.blueBits = 8; } From 74f5cd6fa7f00cd1a8b838371dc15458620c9e0a Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 29 Aug 2012 16:12:44 +0200 Subject: [PATCH 10/16] Removed unused example files. --- examples/particles.c | 1152 ----------------------------------- examples/pong3d.c | 854 -------------------------- examples/pong3d_field.tga | Bin 17816 -> 0 bytes examples/pong3d_instr.tga | Bin 21279 -> 0 bytes examples/pong3d_menu.tga | Bin 1835 -> 0 bytes examples/pong3d_title.tga | Bin 106516 -> 0 bytes examples/pong3d_winner1.tga | Bin 861 -> 0 bytes examples/pong3d_winner2.tga | Bin 891 -> 0 bytes 8 files changed, 2006 deletions(-) delete mode 100644 examples/particles.c delete mode 100644 examples/pong3d.c delete mode 100644 examples/pong3d_field.tga delete mode 100644 examples/pong3d_instr.tga delete mode 100644 examples/pong3d_menu.tga delete mode 100644 examples/pong3d_title.tga delete mode 100644 examples/pong3d_winner1.tga delete mode 100644 examples/pong3d_winner2.tga diff --git a/examples/particles.c b/examples/particles.c deleted file mode 100644 index c7904e11..00000000 --- a/examples/particles.c +++ /dev/null @@ -1,1152 +0,0 @@ -//======================================================================== -// This is a simple, but cool particle engine (buzz-word meaning many -// small objects that are treated as points and drawn as textures -// projected on simple geometry). -// -// This demonstration generates a colorful fountain-like animation. It -// uses several advanced OpenGL teqhniques: -// -// 1) Lighting (per vertex) -// 2) Alpha blending -// 3) Fog -// 4) Texturing -// 5) Display lists (for drawing the static environment geometry) -// 6) Vertex arrays (for drawing the particles) -// 7) GL_EXT_separate_specular_color is used (if available) -// -// Even more so, this program uses multi threading. The program is -// essentialy divided into a main rendering thread and a particle physics -// calculation thread. My benchmarks under Windows 2000 on a single -// processor system show that running this program as two threads instead -// of a single thread means no difference (there may be a very marginal -// advantage for the multi threaded case). On dual processor systems I -// have had reports of 5-25% of speed increase when running this program -// as two threads instead of one thread. -// -// The default behaviour of this program is to use two threads. To force -// a single thread to be used, use the command line switch -s. -// -// To run a fixed length benchmark (60 s), use the command line switch -b. -// -// Benchmark results (640x480x16, best of three tests): -// -// CPU GFX 1 thread 2 threads -// Athlon XP 2700+ GeForce Ti4200 (oc) 757 FPS 759 FPS -// P4 2.8 GHz (SMT) GeForce FX5600 548 FPS 550 FPS -// -// One more thing: Press 'w' during the demo to toggle wireframe mode. -//======================================================================== - -#include -#include -#include -#include -#include - -// Define tokens for GL_EXT_separate_specular_color if not already defined -#ifndef GL_EXT_separate_specular_color -#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 -#define GL_SINGLE_COLOR_EXT 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA -#endif // GL_EXT_separate_specular_color - -// Some 's do not define M_PI -#ifndef M_PI -#define M_PI 3.141592654 -#endif - -// Desired fullscreen resolution -#define WIDTH 640 -#define HEIGHT 480 - - -//======================================================================== -// Type definitions -//======================================================================== - -typedef struct { float x,y,z; } VEC; - -// This structure is used for interleaved vertex arrays (see the -// DrawParticles function) - Note: This structure SHOULD be packed on most -// systems. It uses 32-bit fields on 32-bit boundaries, and is a multiple -// of 64 bits in total (6x32=3x64). If it does not work, try using pragmas -// or whatever to force the structure to be packed. -typedef struct { - GLfloat s, t; // Texture coordinates - GLuint rgba; // Color (four ubytes packed into an uint) - GLfloat x, y, z; // Vertex coordinates -} VERTEX; - - -//======================================================================== -// Program control global variables -//======================================================================== - -// "Running" flag (true if program shall continue to run) -int running; - -// Window dimensions -int width, height; - -// "wireframe" flag (true if we use wireframe view) -int wireframe; - -// "multithreading" flag (true if we use multithreading) -int multithreading; - -// Thread synchronization -struct { - double t; // Time (s) - float dt; // Time since last frame (s) - int p_frame; // Particle physics frame number - int d_frame; // Particle draw frame number - GLFWcond p_done; // Condition: particle physics done - GLFWcond d_done; // Condition: particle draw done - GLFWmutex particles_lock; // Particles data sharing mutex -} thread_sync; - - -//======================================================================== -// Texture declarations (we hard-code them into the source code, since -// they are so simple) -//======================================================================== - -#define P_TEX_WIDTH 8 // Particle texture dimensions -#define P_TEX_HEIGHT 8 -#define F_TEX_WIDTH 16 // Floor texture dimensions -#define F_TEX_HEIGHT 16 - -// Texture object IDs -GLuint particle_tex_id, floor_tex_id; - -// Particle texture (a simple spot) -const unsigned char particle_texture[ P_TEX_WIDTH * P_TEX_HEIGHT ] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x11, 0x22, 0x22, 0x11, 0x00, 0x00, - 0x00, 0x11, 0x33, 0x88, 0x77, 0x33, 0x11, 0x00, - 0x00, 0x22, 0x88, 0xff, 0xee, 0x77, 0x22, 0x00, - 0x00, 0x22, 0x77, 0xee, 0xff, 0x88, 0x22, 0x00, - 0x00, 0x11, 0x33, 0x77, 0x88, 0x33, 0x11, 0x00, - 0x00, 0x00, 0x11, 0x33, 0x22, 0x11, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - -// Floor texture (your basic checkered floor) -const unsigned char floor_texture[ F_TEX_WIDTH * F_TEX_HEIGHT ] = { - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0xff, 0xf0, 0xcc, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0xf0, 0xcc, 0xee, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0x66, 0x30, 0x30, 0x30, 0x20, 0x30, 0x30, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xee, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0xf0, 0xf0, 0xf0, 0xf0, 0xcc, 0xf0, 0xf0, 0xf0, 0x30, 0x30, 0x55, 0x30, 0x30, 0x44, 0x30, 0x30, - 0xf0, 0xdd, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x33, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x60, 0x30, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x33, 0x33, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x33, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x20, 0x30, 0x30, 0xf0, 0xff, 0xf0, 0xf0, 0xdd, 0xf0, 0xf0, 0xff, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x55, 0x33, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0xf0, - 0x30, 0x44, 0x66, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xaa, 0xf0, 0xf0, 0xcc, 0xf0, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xff, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0xdd, 0xf0, - 0x30, 0x30, 0x30, 0x77, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, -}; - - -//======================================================================== -// These are fixed constants that control the particle engine. In a -// modular world, these values should be variables... -//======================================================================== - -// Maximum number of particles -#define MAX_PARTICLES 3000 - -// Life span of a particle (in seconds) -#define LIFE_SPAN 8.0f - -// A new particle is born every [BIRTH_INTERVAL] second -#define BIRTH_INTERVAL (LIFE_SPAN/(float)MAX_PARTICLES) - -// Particle size (meters) -#define PARTICLE_SIZE 0.7f - -// Gravitational constant (m/s^2) -#define GRAVITY 9.8f - -// Base initial velocity (m/s) -#define VELOCITY 8.0f - -// Bounce friction (1.0 = no friction, 0.0 = maximum friction) -#define FRICTION 0.75f - -// "Fountain" height (m) -#define FOUNTAIN_HEIGHT 3.0f - -// Fountain radius (m) -#define FOUNTAIN_RADIUS 1.6f - -// Minimum delta-time for particle phisics (s) -#define MIN_DELTA_T (BIRTH_INTERVAL * 0.5f) - - -//======================================================================== -// Particle system global variables -//======================================================================== - -// This structure holds all state for a single particle -typedef struct { - float x,y,z; // Position in space - float vx,vy,vz; // Velocity vector - float r,g,b; // Color of particle - float life; // Life of particle (1.0 = newborn, < 0.0 = dead) - int active; // Tells if this particle is active -} PARTICLE; - -// Global vectors holding all particles. We use two vectors for double -// buffering. -static PARTICLE particles[ MAX_PARTICLES ]; - -// Global variable holding the age of the youngest particle -static float min_age; - -// Color of latest born particle (used for fountain lighting) -static float glow_color[4]; - -// Position of latest born particle (used for fountain lighting) -static float glow_pos[4]; - - -//======================================================================== -// Object material and fog configuration constants -//======================================================================== - -const GLfloat fountain_diffuse[4] = {0.7f,1.0f,1.0f,1.0f}; -const GLfloat fountain_specular[4] = {1.0f,1.0f,1.0f,1.0f}; -const GLfloat fountain_shininess = 12.0f; -const GLfloat floor_diffuse[4] = {1.0f,0.6f,0.6f,1.0f}; -const GLfloat floor_specular[4] = {0.6f,0.6f,0.6f,1.0f}; -const GLfloat floor_shininess = 18.0f; -const GLfloat fog_color[4] = {0.1f, 0.1f, 0.1f, 1.0f}; - - -//======================================================================== -// InitParticle() - Initialize a new particle -//======================================================================== - -void InitParticle( PARTICLE *p, double t ) -{ - float xy_angle, velocity; - - // Start position of particle is at the fountain blow-out - p->x = 0.0f; - p->y = 0.0f; - p->z = FOUNTAIN_HEIGHT; - - // Start velocity is up (Z)... - p->vz = 0.7f + (0.3f/4096.f) * (float) (rand() & 4095); - - // ...and a randomly chosen X/Y direction - xy_angle = (2.f * (float)M_PI / 4096.f) * (float) (rand() & 4095); - p->vx = 0.4f * (float) cos( xy_angle ); - p->vy = 0.4f * (float) sin( xy_angle ); - - // Scale velocity vector according to a time-varying velocity - velocity = VELOCITY*(0.8f + 0.1f*(float)(sin( 0.5*t )+sin( 1.31*t ))); - p->vx *= velocity; - p->vy *= velocity; - p->vz *= velocity; - - // Color is time-varying - p->r = 0.7f + 0.3f * (float) sin( 0.34*t + 0.1 ); - p->g = 0.6f + 0.4f * (float) sin( 0.63*t + 1.1 ); - p->b = 0.6f + 0.4f * (float) sin( 0.91*t + 2.1 ); - - // Store settings for fountain glow lighting - glow_pos[0] = 0.4f * (float) sin( 1.34*t ); - glow_pos[1] = 0.4f * (float) sin( 3.11*t ); - glow_pos[2] = FOUNTAIN_HEIGHT + 1.0f; - glow_pos[3] = 1.0f; - glow_color[0] = p->r; - glow_color[1] = p->g; - glow_color[2] = p->b; - glow_color[3] = 1.0f; - - // The particle is new-born and active - p->life = 1.0f; - p->active = 1; -} - - -//======================================================================== -// UpdateParticle() - Update a particle -//======================================================================== - -#define FOUNTAIN_R2 (FOUNTAIN_RADIUS+PARTICLE_SIZE/2)*(FOUNTAIN_RADIUS+PARTICLE_SIZE/2) - -void UpdateParticle( PARTICLE *p, float dt ) -{ - // If the particle is not active, we need not do anything - if( !p->active ) - { - return; - } - - // The particle is getting older... - p->life = p->life - dt * (1.0f / LIFE_SPAN); - - // Did the particle die? - if( p->life <= 0.0f ) - { - p->active = 0; - return; - } - - // Update particle velocity (apply gravity) - p->vz = p->vz - GRAVITY * dt; - - // Update particle position - p->x = p->x + p->vx * dt; - p->y = p->y + p->vy * dt; - p->z = p->z + p->vz * dt; - - // Simple collision detection + response - if( p->vz < 0.0f ) - { - // Particles should bounce on the fountain (with friction) - if( (p->x*p->x + p->y*p->y) < FOUNTAIN_R2 && - p->z < (FOUNTAIN_HEIGHT + PARTICLE_SIZE/2) ) - { - p->vz = -FRICTION * p->vz; - p->z = FOUNTAIN_HEIGHT + PARTICLE_SIZE/2 + - FRICTION * (FOUNTAIN_HEIGHT + - PARTICLE_SIZE/2 - p->z); - } - - // Particles should bounce on the floor (with friction) - else if( p->z < PARTICLE_SIZE/2 ) - { - p->vz = -FRICTION * p->vz; - p->z = PARTICLE_SIZE/2 + - FRICTION * (PARTICLE_SIZE/2 - p->z); - } - - } -} - - -//======================================================================== -// ParticleEngine() - The main frame for the particle engine. Called once -// per frame. -//======================================================================== - -void ParticleEngine( double t, float dt ) -{ - int i; - float dt2; - - // Update particles (iterated several times per frame if dt is too - // large) - while( dt > 0.0f ) - { - // Calculate delta time for this iteration - dt2 = dt < MIN_DELTA_T ? dt : MIN_DELTA_T; - - // Update particles - for( i = 0; i < MAX_PARTICLES; i ++ ) - { - UpdateParticle( &particles[ i ], dt2 ); - } - - // Increase minimum age - min_age += dt2; - - // Should we create any new particle(s)? - while( min_age >= BIRTH_INTERVAL ) - { - min_age -= BIRTH_INTERVAL; - - // Find a dead particle to replace with a new one - for( i = 0; i < MAX_PARTICLES; i ++ ) - { - if( !particles[ i ].active ) - { - InitParticle( &particles[ i ], t + min_age ); - UpdateParticle( &particles[ i ], min_age ); - break; - } - } - } - - // Decrease frame delta time - dt -= dt2; - } -} - - -//======================================================================== -// DrawParticles() - Draw all active particles. We use OpenGL 1.1 vertex -// arrays for this in order to accelerate the drawing. -//======================================================================== - -#define BATCH_PARTICLES 70 // Number of particles to draw in each batch - // (70 corresponds to 7.5 KB = will not blow - // the L1 data cache on most CPUs) -#define PARTICLE_VERTS 4 // Number of vertices per particle - -void DrawParticles( double t, float dt ) -{ - int i, particle_count; - VERTEX vertex_array[ BATCH_PARTICLES * PARTICLE_VERTS ], *vptr; - float alpha; - GLuint rgba; - VEC quad_lower_left, quad_lower_right; - GLfloat mat[ 16 ]; - PARTICLE *pptr; - - // Here comes the real trick with flat single primitive objects (s.c. - // "billboards"): We must rotate the textured primitive so that it - // always faces the viewer (is coplanar with the view-plane). - // We: - // 1) Create the primitive around origo (0,0,0) - // 2) Rotate it so that it is coplanar with the view plane - // 3) Translate it according to the particle position - // Note that 1) and 2) is the same for all particles (done only once). - - // Get modelview matrix. We will only use the upper left 3x3 part of - // the matrix, which represents the rotation. - glGetFloatv( GL_MODELVIEW_MATRIX, mat ); - - // 1) & 2) We do it in one swift step: - // Although not obvious, the following six lines represent two matrix/ - // vector multiplications. The matrix is the inverse 3x3 rotation - // matrix (i.e. the transpose of the same matrix), and the two vectors - // represent the lower left corner of the quad, PARTICLE_SIZE/2 * - // (-1,-1,0), and the lower right corner, PARTICLE_SIZE/2 * (1,-1,0). - // The upper left/right corners of the quad is always the negative of - // the opposite corners (regardless of rotation). - quad_lower_left.x = (-PARTICLE_SIZE/2) * (mat[0] + mat[1]); - quad_lower_left.y = (-PARTICLE_SIZE/2) * (mat[4] + mat[5]); - quad_lower_left.z = (-PARTICLE_SIZE/2) * (mat[8] + mat[9]); - quad_lower_right.x = (PARTICLE_SIZE/2) * (mat[0] - mat[1]); - quad_lower_right.y = (PARTICLE_SIZE/2) * (mat[4] - mat[5]); - quad_lower_right.z = (PARTICLE_SIZE/2) * (mat[8] - mat[9]); - - // Don't update z-buffer, since all particles are transparent! - glDepthMask( GL_FALSE ); - - // Enable blending - glEnable( GL_BLEND ); - glBlendFunc( GL_SRC_ALPHA, GL_ONE ); - - // Select particle texture - if( !wireframe ) - { - glEnable( GL_TEXTURE_2D ); - glBindTexture( GL_TEXTURE_2D, particle_tex_id ); - } - - // Set up vertex arrays. We use interleaved arrays, which is easier to - // handle (in most situations) and it gives a linear memeory access - // access pattern (which may give better performance in some - // situations). GL_T2F_C4UB_V3F means: 2 floats for texture coords, - // 4 ubytes for color and 3 floats for vertex coord (in that order). - // Most OpenGL cards / drivers are optimized for this format. - glInterleavedArrays( GL_T2F_C4UB_V3F, 0, vertex_array ); - - // Is particle physics carried out in a separate thread? - if( multithreading ) - { - // Wait for particle physics thread to be done - glfwLockMutex( thread_sync.particles_lock ); - while( running && thread_sync.p_frame <= thread_sync.d_frame ) - { - glfwWaitCond( thread_sync.p_done, thread_sync.particles_lock, - 0.1 ); - } - - // Store the frame time and delta time for the physics thread - thread_sync.t = t; - thread_sync.dt = dt; - - // Update frame counter - thread_sync.d_frame ++; - } - else - { - // Perform particle physics in this thread - ParticleEngine( t, dt ); - } - - // Loop through all particles and build vertex arrays. - particle_count = 0; - vptr = vertex_array; - pptr = particles; - for( i = 0; i < MAX_PARTICLES; i ++ ) - { - if( pptr->active ) - { - // Calculate particle intensity (we set it to max during 75% - // of its life, then it fades out) - alpha = 4.0f * pptr->life; - if( alpha > 1.0f ) - { - alpha = 1.0f; - } - - // Convert color from float to 8-bit (store it in a 32-bit - // integer using endian independent type casting) - ((GLubyte *)&rgba)[0] = (GLubyte)(pptr->r * 255.0f); - ((GLubyte *)&rgba)[1] = (GLubyte)(pptr->g * 255.0f); - ((GLubyte *)&rgba)[2] = (GLubyte)(pptr->b * 255.0f); - ((GLubyte *)&rgba)[3] = (GLubyte)(alpha * 255.0f); - - // 3) Translate the quad to the correct position in modelview - // space and store its parameters in vertex arrays (we also - // store texture coord and color information for each vertex). - - // Lower left corner - vptr->s = 0.0f; - vptr->t = 0.0f; - vptr->rgba = rgba; - vptr->x = pptr->x + quad_lower_left.x; - vptr->y = pptr->y + quad_lower_left.y; - vptr->z = pptr->z + quad_lower_left.z; - vptr ++; - - // Lower right corner - vptr->s = 1.0f; - vptr->t = 0.0f; - vptr->rgba = rgba; - vptr->x = pptr->x + quad_lower_right.x; - vptr->y = pptr->y + quad_lower_right.y; - vptr->z = pptr->z + quad_lower_right.z; - vptr ++; - - // Upper right corner - vptr->s = 1.0f; - vptr->t = 1.0f; - vptr->rgba = rgba; - vptr->x = pptr->x - quad_lower_left.x; - vptr->y = pptr->y - quad_lower_left.y; - vptr->z = pptr->z - quad_lower_left.z; - vptr ++; - - // Upper left corner - vptr->s = 0.0f; - vptr->t = 1.0f; - vptr->rgba = rgba; - vptr->x = pptr->x - quad_lower_right.x; - vptr->y = pptr->y - quad_lower_right.y; - vptr->z = pptr->z - quad_lower_right.z; - vptr ++; - - // Increase count of drawable particles - particle_count ++; - } - - // If we have filled up one batch of particles, draw it as a set - // of quads using glDrawArrays. - if( particle_count >= BATCH_PARTICLES ) - { - // The first argument tells which primitive type we use (QUAD) - // The second argument tells the index of the first vertex (0) - // The last argument is the vertex count - glDrawArrays( GL_QUADS, 0, PARTICLE_VERTS * particle_count ); - particle_count = 0; - vptr = vertex_array; - } - - // Next particle - pptr ++; - } - - // We are done with the particle data: Unlock mutex and signal physics - // thread - if( multithreading ) - { - glfwUnlockMutex( thread_sync.particles_lock ); - glfwSignalCond( thread_sync.d_done ); - } - - // Draw final batch of particles (if any) - glDrawArrays( GL_QUADS, 0, PARTICLE_VERTS * particle_count ); - - // Disable vertex arrays (Note: glInterleavedArrays implicitly called - // glEnableClientState for vertex, texture coord and color arrays) - glDisableClientState( GL_VERTEX_ARRAY ); - glDisableClientState( GL_TEXTURE_COORD_ARRAY ); - glDisableClientState( GL_COLOR_ARRAY ); - - // Disable texturing and blending - glDisable( GL_TEXTURE_2D ); - glDisable( GL_BLEND ); - - // Allow Z-buffer updates again - glDepthMask( GL_TRUE ); -} - - -//======================================================================== -// Fountain geometry specification -//======================================================================== - -#define FOUNTAIN_SIDE_POINTS 14 -#define FOUNTAIN_SWEEP_STEPS 32 - -static const float fountain_side[ FOUNTAIN_SIDE_POINTS*2 ] = { - 1.2f, 0.0f, 1.0f, 0.2f, 0.41f, 0.3f, 0.4f, 0.35f, - 0.4f, 1.95f, 0.41f, 2.0f, 0.8f, 2.2f, 1.2f, 2.4f, - 1.5f, 2.7f, 1.55f,2.95f, 1.6f, 3.0f, 1.0f, 3.0f, - 0.5f, 3.0f, 0.0f, 3.0f -}; - -static const float fountain_normal[ FOUNTAIN_SIDE_POINTS*2 ] = { - 1.0000f, 0.0000f, 0.6428f, 0.7660f, 0.3420f, 0.9397f, 1.0000f, 0.0000f, - 1.0000f, 0.0000f, 0.3420f,-0.9397f, 0.4226f,-0.9063f, 0.5000f,-0.8660f, - 0.7660f,-0.6428f, 0.9063f,-0.4226f, 0.0000f,1.00000f, 0.0000f,1.00000f, - 0.0000f,1.00000f, 0.0000f,1.00000f -}; - - -//======================================================================== -// DrawFountain() - Draw a fountain -//======================================================================== - -void DrawFountain( void ) -{ - static GLuint fountain_list = 0; - double angle; - float x, y; - int m, n; - - // The first time, we build the fountain display list - if( !fountain_list ) - { - // Start recording of a new display list - fountain_list = glGenLists( 1 ); - glNewList( fountain_list, GL_COMPILE_AND_EXECUTE ); - - // Set fountain material - glMaterialfv( GL_FRONT, GL_DIFFUSE, fountain_diffuse ); - glMaterialfv( GL_FRONT, GL_SPECULAR, fountain_specular ); - glMaterialf( GL_FRONT, GL_SHININESS, fountain_shininess ); - - // Build fountain using triangle strips - for( n = 0; n < FOUNTAIN_SIDE_POINTS-1; n ++ ) - { - glBegin( GL_TRIANGLE_STRIP ); - for( m = 0; m <= FOUNTAIN_SWEEP_STEPS; m ++ ) - { - angle = (double) m * (2.0*M_PI/(double)FOUNTAIN_SWEEP_STEPS); - x = (float) cos( angle ); - y = (float) sin( angle ); - - // Draw triangle strip - glNormal3f( x * fountain_normal[ n*2+2 ], - y * fountain_normal[ n*2+2 ], - fountain_normal[ n*2+3 ] ); - glVertex3f( x * fountain_side[ n*2+2 ], - y * fountain_side[ n*2+2 ], - fountain_side[ n*2+3 ] ); - glNormal3f( x * fountain_normal[ n*2 ], - y * fountain_normal[ n*2 ], - fountain_normal[ n*2+1 ] ); - glVertex3f( x * fountain_side[ n*2 ], - y * fountain_side[ n*2 ], - fountain_side[ n*2+1 ] ); - } - glEnd(); - } - - // End recording of display list - glEndList(); - } - else - { - // Playback display list - glCallList( fountain_list ); - } -} - - -//======================================================================== -// TesselateFloor() - Recursive function for building variable tesselated -// floor -//======================================================================== - -void TesselateFloor( float x1, float y1, float x2, float y2, - int recursion ) -{ - float delta, x, y; - - // Last recursion? - if( recursion >= 5 ) - { - delta = 999999.0f; - } - else - { - x = (float) (fabs(x1) < fabs(x2) ? fabs(x1) : fabs(x2)); - y = (float) (fabs(y1) < fabs(y2) ? fabs(y1) : fabs(y2)); - delta = x*x + y*y; - } - - // Recurse further? - if( delta < 0.1f ) - { - x = (x1+x2) * 0.5f; - y = (y1+y2) * 0.5f; - TesselateFloor( x1,y1, x, y, recursion + 1 ); - TesselateFloor( x,y1, x2, y, recursion + 1 ); - TesselateFloor( x1, y, x,y2, recursion + 1 ); - TesselateFloor( x, y, x2,y2, recursion + 1 ); - } - else - { - glTexCoord2f( x1*30.0f, y1*30.0f ); - glVertex3f( x1*80.0f, y1*80.0f , 0.0f ); - glTexCoord2f( x2*30.0f, y1*30.0f ); - glVertex3f( x2*80.0f, y1*80.0f , 0.0f ); - glTexCoord2f( x2*30.0f, y2*30.0f ); - glVertex3f( x2*80.0f, y2*80.0f , 0.0f ); - glTexCoord2f( x1*30.0f, y2*30.0f ); - glVertex3f( x1*80.0f, y2*80.0f , 0.0f ); - } -} - - -//======================================================================== -// DrawFloor() - Draw floor. We builde the floor recursively, and let the -// tesselation in the centre (near x,y=0,0) be high, while the selleation -// around the edges be low. -//======================================================================== - -void DrawFloor( void ) -{ - static GLuint floor_list = 0; - - // Select floor texture - if( !wireframe ) - { - glEnable( GL_TEXTURE_2D ); - glBindTexture( GL_TEXTURE_2D, floor_tex_id ); - } - - // The first time, we build the floor display list - if( !floor_list ) - { - // Start recording of a new display list - floor_list = glGenLists( 1 ); - glNewList( floor_list, GL_COMPILE_AND_EXECUTE ); - - // Set floor material - glMaterialfv( GL_FRONT, GL_DIFFUSE, floor_diffuse ); - glMaterialfv( GL_FRONT, GL_SPECULAR, floor_specular ); - glMaterialf( GL_FRONT, GL_SHININESS, floor_shininess ); - - // Draw floor as a bunch of triangle strips (high tesselation - // improves lighting) - glNormal3f( 0.0f, 0.0f, 1.0f ); - glBegin( GL_QUADS ); - TesselateFloor( -1.0f,-1.0f, 0.0f,0.0f, 0 ); - TesselateFloor( 0.0f,-1.0f, 1.0f,0.0f, 0 ); - TesselateFloor( 0.0f, 0.0f, 1.0f,1.0f, 0 ); - TesselateFloor( -1.0f, 0.0f, 0.0f,1.0f, 0 ); - glEnd(); - - // End recording of display list - glEndList(); - } - else - { - // Playback display list - glCallList( floor_list ); - } - - glDisable( GL_TEXTURE_2D ); - -} - - -//======================================================================== -// SetupLights() - Position and configure light sources -//======================================================================== - -void SetupLights( void ) -{ - float l1pos[4], l1amb[4], l1dif[4], l1spec[4]; - float l2pos[4], l2amb[4], l2dif[4], l2spec[4]; - - // Set light source 1 parameters - l1pos[0] = 0.0f; l1pos[1] = -9.0f; l1pos[2] = 8.0f; l1pos[3] = 1.0f; - l1amb[0] = 0.2f; l1amb[1] = 0.2f; l1amb[2] = 0.2f; l1amb[3] = 1.0f; - l1dif[0] = 0.8f; l1dif[1] = 0.4f; l1dif[2] = 0.2f; l1dif[3] = 1.0f; - l1spec[0] = 1.0f; l1spec[1] = 0.6f; l1spec[2] = 0.2f; l1spec[3] = 0.0f; - - // Set light source 2 parameters - l2pos[0] = -15.0f; l2pos[1] = 12.0f; l2pos[2] = 1.5f; l2pos[3] = 1.0f; - l2amb[0] = 0.0f; l2amb[1] = 0.0f; l2amb[2] = 0.0f; l2amb[3] = 1.0f; - l2dif[0] = 0.2f; l2dif[1] = 0.4f; l2dif[2] = 0.8f; l2dif[3] = 1.0f; - l2spec[0] = 0.2f; l2spec[1] = 0.6f; l2spec[2] = 1.0f; l2spec[3] = 0.0f; - - // Configure light sources in OpenGL - glLightfv( GL_LIGHT1, GL_POSITION, l1pos ); - glLightfv( GL_LIGHT1, GL_AMBIENT, l1amb ); - glLightfv( GL_LIGHT1, GL_DIFFUSE, l1dif ); - glLightfv( GL_LIGHT1, GL_SPECULAR, l1spec ); - glLightfv( GL_LIGHT2, GL_POSITION, l2pos ); - glLightfv( GL_LIGHT2, GL_AMBIENT, l2amb ); - glLightfv( GL_LIGHT2, GL_DIFFUSE, l2dif ); - glLightfv( GL_LIGHT2, GL_SPECULAR, l2spec ); - glLightfv( GL_LIGHT3, GL_POSITION, glow_pos ); - glLightfv( GL_LIGHT3, GL_DIFFUSE, glow_color ); - glLightfv( GL_LIGHT3, GL_SPECULAR, glow_color ); - - // Enable light sources - glEnable( GL_LIGHT1 ); - glEnable( GL_LIGHT2 ); - glEnable( GL_LIGHT3 ); -} - - -//======================================================================== -// Draw() - Main rendering function -//======================================================================== - -void Draw( double t ) -{ - double xpos, ypos, zpos, angle_x, angle_y, angle_z; - static double t_old = 0.0; - float dt; - - // Calculate frame-to-frame delta time - dt = (float)(t-t_old); - t_old = t; - - // Setup viewport - glViewport( 0, 0, width, height ); - - // Clear color and Z-buffer - glClearColor( 0.1f, 0.1f, 0.1f, 1.0f ); - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - // Setup projection - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - gluPerspective( 65.0, (double)width/(double)height, 1.0, 60.0 ); - - // Setup camera - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - - // Rotate camera - angle_x = 90.0 - 10.0; - angle_y = 10.0 * sin( 0.3 * t ); - angle_z = 10.0 * t; - glRotated( -angle_x, 1.0, 0.0, 0.0 ); - glRotated( -angle_y, 0.0, 1.0, 0.0 ); - glRotated( -angle_z, 0.0, 0.0, 1.0 ); - - // Translate camera - xpos = 15.0 * sin( (M_PI/180.0) * angle_z ) + - 2.0 * sin( (M_PI/180.0) * 3.1 * t ); - ypos = -15.0 * cos( (M_PI/180.0) * angle_z ) + - 2.0 * cos( (M_PI/180.0) * 2.9 * t ); - zpos = 4.0 + 2.0 * cos( (M_PI/180.0) * 4.9 * t ); - glTranslated( -xpos, -ypos, -zpos ); - - // Enable face culling - glFrontFace( GL_CCW ); - glCullFace( GL_BACK ); - glEnable( GL_CULL_FACE ); - - // Enable lighting - SetupLights(); - glEnable( GL_LIGHTING ); - - // Enable fog (dim details far away) - glEnable( GL_FOG ); - glFogi( GL_FOG_MODE, GL_EXP ); - glFogf( GL_FOG_DENSITY, 0.05f ); - glFogfv( GL_FOG_COLOR, fog_color ); - - // Draw floor - DrawFloor(); - - // Enable Z-buffering - glEnable( GL_DEPTH_TEST ); - glDepthFunc( GL_LEQUAL ); - glDepthMask( GL_TRUE ); - - // Draw fountain - DrawFountain(); - - // Disable fog & lighting - glDisable( GL_LIGHTING ); - glDisable( GL_FOG ); - - // Draw all particles (must be drawn after all solid objects have been - // drawn!) - DrawParticles( t, dt ); - - // Z-buffer not needed anymore - glDisable( GL_DEPTH_TEST ); -} - - -//======================================================================== -// Resize() - GLFW window resize callback function -//======================================================================== - -void GLFWCALL Resize( int x, int y ) -{ - width = x; - height = y > 0 ? y : 1; // Prevent division by zero in aspect calc. -} - - -//======================================================================== -// Input callback functions -//======================================================================== - -void GLFWCALL KeyFun( int key, int action ) -{ - if( action == GLFW_PRESS ) - { - switch( key ) - { - case GLFW_KEY_ESC: - running = 0; - break; - case 'W': - wireframe = !wireframe; - glPolygonMode( GL_FRONT_AND_BACK, - wireframe ? GL_LINE : GL_FILL ); - break; - default: - break; - } - } -} - - -//======================================================================== -// PhysicsThreadFun() - Thread for updating particle physics -//======================================================================== - -void GLFWCALL PhysicsThreadFun( void *arg ) -{ - while( running ) - { - // Lock mutex - glfwLockMutex( thread_sync.particles_lock ); - - // Wait for particle drawing to be done - while( running && thread_sync.p_frame > thread_sync.d_frame ) - { - glfwWaitCond( thread_sync.d_done, thread_sync.particles_lock, - 0.1 ); - } - - // No longer running? - if( !running ) - { - break; - } - - // Update particles - ParticleEngine( thread_sync.t, thread_sync.dt ); - - // Update frame counter - thread_sync.p_frame ++; - - // Unlock mutex and signal drawing thread - glfwUnlockMutex( thread_sync.particles_lock ); - glfwSignalCond( thread_sync.p_done ); - } -} - - -//======================================================================== -// main() -//======================================================================== - -int main( int argc, char **argv ) -{ - int i, frames, benchmark; - double t0, t; - GLFWthread physics_thread = 0; - - // Use multithreading by default, but don't benchmark - multithreading = 1; - benchmark = 0; - - // Check command line arguments - for( i = 1; i < argc; i ++ ) - { - // Use benchmarking? - if( strcmp( argv[i], "-b" ) == 0 ) - { - benchmark = 1; - } - - // Force multithreading off? - else if( strcmp( argv[i], "-s" ) == 0 ) - { - multithreading = 0; - } - - // With a Finder launch on Mac OS X we get a bogus -psn_0_46268417 - // kind of argument (actual numbers vary). Ignore it. - else if( strncmp( argv[i], "-psn_", 5) == 0 ); - - // Usage - else - { - if( strcmp( argv[i], "-?" ) != 0 ) - { - printf( "Unknonwn option %s\n\n", argv[ i ] ); - } - printf( "Usage: %s [options]\n", argv[ 0 ] ); - printf( "\n"); - printf( "Options:\n" ); - printf( " -b Benchmark (run program for 60 s)\n" ); - printf( " -s Run program as single thread (default is to use two threads)\n" ); - printf( " -? Display this text\n" ); - printf( "\n"); - printf( "Program runtime controls:\n" ); - printf( " w Toggle wireframe mode\n" ); - printf( " ESC Exit program\n" ); - exit( 0 ); - } - } - - // Initialize GLFW - if( !glfwInit() ) - { - fprintf( stderr, "Failed to initialize GLFW\n" ); - exit( EXIT_FAILURE ); - } - - // Open OpenGL fullscreen window - if( !glfwCreateWindow( WIDTH, HEIGHT, 0,0,0,0, 16,0, GLFW_FULLSCREEN ) ) - { - fprintf( stderr, "Failed to open GLFW window\n" ); - glfwTerminate(); - exit( EXIT_FAILURE ); - } - - // Set window title - glfwSetWindowTitle( "Particle engine" ); - - // Disable VSync (we want to get as high FPS as possible!) - glfwSwapInterval( 0 ); - - // Window resize callback function - glfwSetWindowSizeCallback( Resize ); - - // Set keyboard input callback function - glfwSetKeyCallback( KeyFun ); - - // Upload particle texture - glGenTextures( 1, &particle_tex_id ); - glBindTexture( GL_TEXTURE_2D, particle_tex_id ); - glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); - glTexImage2D( GL_TEXTURE_2D, 0, GL_LUMINANCE, P_TEX_WIDTH, P_TEX_HEIGHT, - 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, particle_texture ); - - // Upload floor texture - glGenTextures( 1, &floor_tex_id ); - glBindTexture( GL_TEXTURE_2D, floor_tex_id ); - glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); - glTexImage2D( GL_TEXTURE_2D, 0, GL_LUMINANCE, F_TEX_WIDTH, F_TEX_HEIGHT, - 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, floor_texture ); - - // Check if we have GL_EXT_separate_specular_color, and if so use it - if( glfwExtensionSupported( "GL_EXT_separate_specular_color" ) ) - { - glLightModeli( GL_LIGHT_MODEL_COLOR_CONTROL_EXT, - GL_SEPARATE_SPECULAR_COLOR_EXT ); - } - - // Set filled polygon mode as default (not wireframe) - glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); - wireframe = 0; - - // Clear particle system - for( i = 0; i < MAX_PARTICLES; i ++ ) - { - particles[ i ].active = 0; - } - min_age = 0.0f; - - // Set "running" flag - running = 1; - - // Set initial times - thread_sync.t = 0.0; - thread_sync.dt = 0.001f; - - // Init threading - if( multithreading ) - { - thread_sync.p_frame = 0; - thread_sync.d_frame = 0; - thread_sync.particles_lock = glfwCreateMutex(); - thread_sync.p_done = glfwCreateCond(); - thread_sync.d_done = glfwCreateCond(); - physics_thread = glfwCreateThread( PhysicsThreadFun, NULL ); - } - - // Main loop - t0 = glfwGetTime(); - frames = 0; - while( running ) - { - // Get frame time - t = glfwGetTime() - t0; - - // Draw... - Draw( t ); - - // Swap buffers - glfwSwapBuffers(); - - // Check if window was closed - running = running && glfwGetWindowParam( GLFW_OPENED ); - - // Increase frame count - frames ++; - - // End of benchmark? - if( benchmark && t >= 60.0 ) - { - running = 0; - } - } - t = glfwGetTime() - t0; - - // Wait for particle physics thread to die - if( multithreading ) - { - glfwWaitThread( physics_thread, GLFW_WAIT ); - } - - // Display profiling information - printf( "%d frames in %.2f seconds = %.1f FPS", frames, t, - (double)frames / t ); - printf( " (multithreading %s)\n", multithreading ? "on" : "off" ); - - // Terminate OpenGL - glfwTerminate(); - - exit( EXIT_SUCCESS ); -} - diff --git a/examples/pong3d.c b/examples/pong3d.c deleted file mode 100644 index 58c9ee20..00000000 --- a/examples/pong3d.c +++ /dev/null @@ -1,854 +0,0 @@ -//======================================================================== -// This is a small test application for GLFW. -// This is an OpenGL port of the famous "PONG" game (the first computer -// game ever?). It is very simple, and could be improved alot. It was -// created in order to show off the gaming capabilities of GLFW. -//======================================================================== - -#include -#include -#include -#include - - -//======================================================================== -// Constants -//======================================================================== - -// Screen resolution -#define WIDTH 640 -#define HEIGHT 480 - -// Player size (units) -#define PLAYER_XSIZE 0.05f -#define PLAYER_YSIZE 0.15f - -// Ball size (units) -#define BALL_SIZE 0.02f - -// Maximum player movement speed (units / second) -#define MAX_SPEED 1.5f - -// Player movement acceleration (units / seconds^2) -#define ACCELERATION 4.0f - -// Player movement deceleration (units / seconds^2) -#define DECELERATION 2.0f - -// Ball movement speed (units / second) -#define BALL_SPEED 0.4f - -// Menu options -#define MENU_NONE 0 -#define MENU_PLAY 1 -#define MENU_QUIT 2 - -// Game events -#define NOBODY_WINS 0 -#define PLAYER1_WINS 1 -#define PLAYER2_WINS 2 - -// Winner ID -#define NOBODY 0 -#define PLAYER1 1 -#define PLAYER2 2 - -// Camera positions -#define CAMERA_CLASSIC 0 -#define CAMERA_ABOVE 1 -#define CAMERA_SPECTATOR 2 -#define CAMERA_DEFAULT CAMERA_CLASSIC - - -//======================================================================== -// Textures -//======================================================================== - -#define TEX_TITLE 0 -#define TEX_MENU 1 -#define TEX_INSTR 2 -#define TEX_WINNER1 3 -#define TEX_WINNER2 4 -#define TEX_FIELD 5 -#define NUM_TEXTURES 6 - -// Texture names -char * tex_name[ NUM_TEXTURES ] = { - "pong3d_title.tga", - "pong3d_menu.tga", - "pong3d_instr.tga", - "pong3d_winner1.tga", - "pong3d_winner2.tga", - "pong3d_field.tga" -}; - -// OpenGL texture object IDs -GLuint tex_id[ NUM_TEXTURES ]; - - -//======================================================================== -// Global variables -//======================================================================== - -// Display information -int width, height; - -// Frame information -double thistime, oldtime, dt, starttime; - -// Camera information -int camerapos; - -// Player information -struct { - double ypos; // -1.0 to +1.0 - double yspeed; // -MAX_SPEED to +MAX_SPEED -} player1, player2; - -// Ball information -struct { - double xpos, ypos; - double xspeed, yspeed; -} ball; - -// And the winner is... -int winner; - -// Lighting configuration -const GLfloat env_ambient[4] = {1.0f,1.0f,1.0f,1.0f}; -const GLfloat light1_position[4] = {-3.0f,3.0f,2.0f,1.0f}; -const GLfloat light1_diffuse[4] = {1.0f,1.0f,1.0f,0.0f}; -const GLfloat light1_ambient[4] = {0.0f,0.0f,0.0f,0.0f}; - -// Object material properties -const GLfloat player1_diffuse[4] = {1.0f,0.3f,0.3f,1.0f}; -const GLfloat player1_ambient[4] = {0.3f,0.1f,0.0f,1.0f}; -const GLfloat player2_diffuse[4] = {0.3f,1.0f,0.3f,1.0f}; -const GLfloat player2_ambient[4] = {0.1f,0.3f,0.1f,1.0f}; -const GLfloat ball_diffuse[4] = {1.0f,1.0f,0.5f,1.0f}; -const GLfloat ball_ambient[4] = {0.3f,0.3f,0.1f,1.0f}; -const GLfloat border_diffuse[4] = {0.3f,0.3f,1.0f,1.0f}; -const GLfloat border_ambient[4] = {0.1f,0.1f,0.3f,1.0f}; -const GLfloat floor_diffuse[4] = {1.0f,1.0f,1.0f,1.0f}; -const GLfloat floor_ambient[4] = {0.3f,0.3f,0.3f,1.0f}; - - -//======================================================================== -// LoadTextures() - Load textures from disk and upload to OpenGL card -//======================================================================== - -GLboolean LoadTextures( void ) -{ - int i; - - // Generate texture objects - glGenTextures( NUM_TEXTURES, tex_id ); - - // Load textures - for( i = 0; i < NUM_TEXTURES; i ++ ) - { - // Select texture object - glBindTexture( GL_TEXTURE_2D, tex_id[ i ] ); - - // Set texture parameters - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); - - // Upload texture from file to texture memory - if( !glfwLoadTexture2D( tex_name[ i ], 0 ) ) - { - fprintf( stderr, "Failed to load texture %s\n", tex_name[ i ] ); - return GL_FALSE; - } - } - - return GL_TRUE; -} - - -//======================================================================== -// DrawImage() - Draw a 2D image as a texture -//======================================================================== - -void DrawImage( int texnum, float x1, float x2, float y1, float y2 ) -{ - glEnable( GL_TEXTURE_2D ); - glBindTexture( GL_TEXTURE_2D, tex_id[ texnum ] ); - glBegin( GL_QUADS ); - glTexCoord2f( 0.0f, 1.0f ); - glVertex2f( x1, y1 ); - glTexCoord2f( 1.0f, 1.0f ); - glVertex2f( x2, y1 ); - glTexCoord2f( 1.0f, 0.0f ); - glVertex2f( x2, y2 ); - glTexCoord2f( 0.0f, 0.0f ); - glVertex2f( x1, y2 ); - glEnd(); - glDisable( GL_TEXTURE_2D ); -} - - -//======================================================================== -// GameMenu() - Game menu (returns menu option) -//======================================================================== - -int GameMenu( void ) -{ - int option; - - // Enable sticky keys - glfwEnable( GLFW_STICKY_KEYS ); - - // Wait for a game menu key to be pressed - do - { - // Get window size - glfwGetWindowSize( &width, &height ); - - // Set viewport - glViewport( 0, 0, width, height ); - - // Clear display - glClearColor( 0.0f, 0.0f, 0.0f, 0.0f ); - glClear( GL_COLOR_BUFFER_BIT ); - - // Setup projection matrix - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( 0.0f, 1.0f, 1.0f, 0.0f, -1.0f, 1.0f ); - - // Setup modelview matrix - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - - // Display title - glColor3f( 1.0f, 1.0f, 1.0f ); - DrawImage( TEX_TITLE, 0.1f, 0.9f, 0.0f, 0.3f ); - - // Display menu - glColor3f( 1.0f, 1.0f, 0.0f ); - DrawImage( TEX_MENU, 0.38f, 0.62f, 0.35f, 0.5f ); - - // Display instructions - glColor3f( 0.0f, 1.0f, 1.0f ); - DrawImage( TEX_INSTR, 0.32f, 0.68f, 0.65f, 0.85f ); - - // Swap buffers - glfwSwapBuffers(); - - // Check for keys - if( glfwGetKey( 'Q' ) || !glfwGetWindowParam( GLFW_OPENED ) ) - { - option = MENU_QUIT; - } - else if( glfwGetKey( GLFW_KEY_F1 ) ) - { - option = MENU_PLAY; - } - else - { - option = MENU_NONE; - } - - // To avoid horrible busy waiting, sleep for at least 20 ms - glfwSleep( 0.02 ); - } - while( option == MENU_NONE ); - - // Disable sticky keys - glfwDisable( GLFW_STICKY_KEYS ); - - return option; -} - - -//======================================================================== -// NewGame() - Initialize a new game -//======================================================================== - -void NewGame( void ) -{ - // Frame information - starttime = thistime = glfwGetTime(); - - // Camera information - camerapos = CAMERA_DEFAULT; - - // Player 1 information - player1.ypos = 0.0; - player1.yspeed = 0.0; - - // Player 2 information - player2.ypos = 0.0; - player2.yspeed = 0.0; - - // Ball information - ball.xpos = -1.0 + PLAYER_XSIZE; - ball.ypos = player1.ypos; - ball.xspeed = 1.0; - ball.yspeed = 1.0; -} - - -//======================================================================== -// PlayerControl() - Player control -//======================================================================== - -void PlayerControl( void ) -{ - float joy1pos[ 2 ], joy2pos[ 2 ]; - - // Get joystick X & Y axis positions - glfwGetJoystickPos( GLFW_JOYSTICK_1, joy1pos, 2 ); - glfwGetJoystickPos( GLFW_JOYSTICK_2, joy2pos, 2 ); - - // Player 1 control - if( glfwGetKey( 'A' ) || joy1pos[ 1 ] > 0.2f ) - { - player1.yspeed += dt * ACCELERATION; - if( player1.yspeed > MAX_SPEED ) - { - player1.yspeed = MAX_SPEED; - } - } - else if( glfwGetKey( 'Z' ) || joy1pos[ 1 ] < -0.2f ) - { - player1.yspeed -= dt * ACCELERATION; - if( player1.yspeed < -MAX_SPEED ) - { - player1.yspeed = -MAX_SPEED; - } - } - else - { - player1.yspeed /= exp( DECELERATION * dt ); - } - - // Player 2 control - if( glfwGetKey( 'K' ) || joy2pos[ 1 ] > 0.2f ) - { - player2.yspeed += dt * ACCELERATION; - if( player2.yspeed > MAX_SPEED ) - { - player2.yspeed = MAX_SPEED; - } - } - else if( glfwGetKey( 'M' ) || joy2pos[ 1 ] < -0.2f ) - { - player2.yspeed -= dt * ACCELERATION; - if( player2.yspeed < -MAX_SPEED ) - { - player2.yspeed = -MAX_SPEED; - } - } - else - { - player2.yspeed /= exp( DECELERATION * dt ); - } - - // Update player 1 position - player1.ypos += dt * player1.yspeed; - if( player1.ypos > 1.0 - PLAYER_YSIZE ) - { - player1.ypos = 1.0 - PLAYER_YSIZE; - player1.yspeed = 0.0; - } - else if( player1.ypos < -1.0 + PLAYER_YSIZE ) - { - player1.ypos = -1.0 + PLAYER_YSIZE; - player1.yspeed = 0.0; - } - - // Update player 2 position - player2.ypos += dt * player2.yspeed; - if( player2.ypos > 1.0 - PLAYER_YSIZE ) - { - player2.ypos = 1.0 - PLAYER_YSIZE; - player2.yspeed = 0.0; - } - else if( player2.ypos < -1.0 + PLAYER_YSIZE ) - { - player2.ypos = -1.0 + PLAYER_YSIZE; - player2.yspeed = 0.0; - } -} - - -//======================================================================== -// BallControl() - Ball control -//======================================================================== - -int BallControl( void ) -{ - int event; - double ballspeed; - - // Calculate new ball speed - ballspeed = BALL_SPEED * (1.0 + 0.02*(thistime-starttime)); - ball.xspeed = ball.xspeed > 0 ? ballspeed : -ballspeed; - ball.yspeed = ball.yspeed > 0 ? ballspeed : -ballspeed; - ball.yspeed *= 0.74321; - - // Update ball position - ball.xpos += dt * ball.xspeed; - ball.ypos += dt * ball.yspeed; - - // Did the ball hit a top/bottom wall? - if( ball.ypos >= 1.0 ) - { - ball.ypos = 2.0 - ball.ypos; - ball.yspeed = -ball.yspeed; - } - else if( ball.ypos <= -1.0 ) - { - ball.ypos = -2.0 - ball.ypos; - ball.yspeed = -ball.yspeed; - } - - // Did the ball hit/miss a player? - event = NOBODY_WINS; - - // Is the ball entering the player 1 goal? - if( ball.xpos < -1.0 + PLAYER_XSIZE ) - { - // Did player 1 catch the ball? - if( ball.ypos > (player1.ypos-PLAYER_YSIZE) && - ball.ypos < (player1.ypos+PLAYER_YSIZE) ) - { - ball.xpos = -2.0 + 2.0*PLAYER_XSIZE - ball.xpos; - ball.xspeed = -ball.xspeed; - } - else - { - event = PLAYER2_WINS; - } - } - - // Is the ball entering the player 2 goal? - if( ball.xpos > 1.0 - PLAYER_XSIZE ) - { - // Did player 2 catch the ball? - if( ball.ypos > (player2.ypos-PLAYER_YSIZE) && - ball.ypos < (player2.ypos+PLAYER_YSIZE) ) - { - ball.xpos = 2.0 - 2.0*PLAYER_XSIZE - ball.xpos; - ball.xspeed = -ball.xspeed; - } - else - { - event = PLAYER1_WINS; - } - } - - return event; -} - - -//======================================================================== -// DrawBox() - Draw a 3D box -//======================================================================== - -#define TEX_SCALE 4.0f - - -void DrawBox( float x1, float y1, float z1, float x2, float y2, float z2 ) -{ - // Draw six sides of a cube - glBegin( GL_QUADS ); - // Side 1 (down) - glNormal3f( 0.0f, 0.0f, -1.0f ); - glTexCoord2f( 0.0f, 0.0f ); - glVertex3f( x1,y2,z1 ); - glTexCoord2f( TEX_SCALE, 0.0f ); - glVertex3f( x2,y2,z1 ); - glTexCoord2f( TEX_SCALE, TEX_SCALE ); - glVertex3f( x2,y1,z1 ); - glTexCoord2f( 0.0f, TEX_SCALE ); - glVertex3f( x1,y1,z1 ); - // Side 2 (up) - glNormal3f( 0.0f, 0.0f, 1.0f ); - glTexCoord2f( 0.0f, 0.0f ); - glVertex3f( x1,y1,z2 ); - glTexCoord2f( TEX_SCALE, 0.0f ); - glVertex3f( x2,y1,z2 ); - glTexCoord2f( TEX_SCALE, TEX_SCALE ); - glVertex3f( x2,y2,z2 ); - glTexCoord2f( 0.0f, TEX_SCALE ); - glVertex3f( x1,y2,z2 ); - // Side 3 (backward) - glNormal3f( 0.0f, -1.0f, 0.0f ); - glTexCoord2f( 0.0f, 0.0f ); - glVertex3f( x1,y1,z1 ); - glTexCoord2f( TEX_SCALE, 0.0f ); - glVertex3f( x2,y1,z1 ); - glTexCoord2f( TEX_SCALE, TEX_SCALE ); - glVertex3f( x2,y1,z2 ); - glTexCoord2f( 0.0f, TEX_SCALE ); - glVertex3f( x1,y1,z2 ); - // Side 4 (forward) - glNormal3f( 0.0f, 1.0f, 0.0f ); - glTexCoord2f( 0.0f, 0.0f ); - glVertex3f( x1,y2,z2 ); - glTexCoord2f( TEX_SCALE, 0.0f ); - glVertex3f( x2,y2,z2 ); - glTexCoord2f( TEX_SCALE, TEX_SCALE ); - glVertex3f( x2,y2,z1 ); - glTexCoord2f( 0.0f, TEX_SCALE ); - glVertex3f( x1,y2,z1 ); - // Side 5 (left) - glNormal3f( -1.0f, 0.0f, 0.0f ); - glTexCoord2f( 0.0f, 0.0f ); - glVertex3f( x1,y1,z2 ); - glTexCoord2f( TEX_SCALE, 0.0f ); - glVertex3f( x1,y2,z2 ); - glTexCoord2f( TEX_SCALE, TEX_SCALE ); - glVertex3f( x1,y2,z1 ); - glTexCoord2f( 0.0f, TEX_SCALE ); - glVertex3f( x1,y1,z1 ); - // Side 6 (right) - glNormal3f( 1.0f, 0.0f, 0.0f ); - glTexCoord2f( 0.0f, 0.0f ); - glVertex3f( x2,y1,z1 ); - glTexCoord2f( TEX_SCALE, 0.0f ); - glVertex3f( x2,y2,z1 ); - glTexCoord2f( TEX_SCALE, TEX_SCALE ); - glVertex3f( x2,y2,z2 ); - glTexCoord2f( 0.0f, TEX_SCALE ); - glVertex3f( x2,y1,z2 ); - glEnd(); -} - - -//======================================================================== -// UpdateDisplay() - Draw graphics (all game related OpenGL stuff goes -// here) -//======================================================================== - -void UpdateDisplay( void ) -{ - // Get window size - glfwGetWindowSize( &width, &height ); - - // Set viewport - glViewport( 0, 0, width, height ); - - // Clear display - glClearColor( 0.02f, 0.02f, 0.02f, 0.0f ); - glClearDepth( 1.0f ); - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - // Setup projection matrix - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - gluPerspective( - 55.0f, // Angle of view - (GLfloat)width/(GLfloat)height, // Aspect - 1.0f, // Near Z - 100.0f // Far Z - ); - - // Setup modelview matrix - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - switch( camerapos ) - { - default: - case CAMERA_CLASSIC: - gluLookAt( - 0.0f, 0.0f, 2.5f, - 0.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f - ); - break; - case CAMERA_ABOVE: - gluLookAt( - 0.0f, 0.0f, 2.5f, - (float)ball.xpos, (float)ball.ypos, 0.0f, - 0.0f, 1.0f, 0.0f - ); - break; - case CAMERA_SPECTATOR: - gluLookAt( - 0.0f, -2.0, 1.2f, - (float)ball.xpos, (float)ball.ypos, 0.0f, - 0.0f, 0.0f, 1.0f - ); - break; - } - - // Enable depth testing - glEnable( GL_DEPTH_TEST ); - glDepthFunc( GL_LEQUAL ); - - // Enable lighting - glEnable( GL_LIGHTING ); - glLightModelfv( GL_LIGHT_MODEL_AMBIENT, env_ambient ); - glLightModeli( GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE ); - glLightModeli( GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE ); - glLightfv( GL_LIGHT1, GL_POSITION, light1_position ); - glLightfv( GL_LIGHT1, GL_DIFFUSE, light1_diffuse ); - glLightfv( GL_LIGHT1, GL_AMBIENT, light1_ambient ); - glEnable( GL_LIGHT1 ); - - // Front face is counter-clock-wise - glFrontFace( GL_CCW ); - - // Enable face culling (not necessary, but speeds up rendering) - glCullFace( GL_BACK ); - glEnable( GL_CULL_FACE ); - - // Draw Player 1 - glMaterialfv( GL_FRONT, GL_DIFFUSE, player1_diffuse ); - glMaterialfv( GL_FRONT, GL_AMBIENT, player1_ambient ); - DrawBox( -1.f, (GLfloat)player1.ypos-PLAYER_YSIZE, 0.f, - -1.f+PLAYER_XSIZE, (GLfloat)player1.ypos+PLAYER_YSIZE, 0.1f ); - - // Draw Player 2 - glMaterialfv( GL_FRONT, GL_DIFFUSE, player2_diffuse ); - glMaterialfv( GL_FRONT, GL_AMBIENT, player2_ambient ); - DrawBox( 1.f-PLAYER_XSIZE, (GLfloat)player2.ypos-PLAYER_YSIZE, 0.f, - 1.f, (GLfloat)player2.ypos+PLAYER_YSIZE, 0.1f ); - - // Draw Ball - glMaterialfv( GL_FRONT, GL_DIFFUSE, ball_diffuse ); - glMaterialfv( GL_FRONT, GL_AMBIENT, ball_ambient ); - DrawBox( (GLfloat)ball.xpos-BALL_SIZE, (GLfloat)ball.ypos-BALL_SIZE, 0.f, - (GLfloat)ball.xpos+BALL_SIZE, (GLfloat)ball.ypos+BALL_SIZE, BALL_SIZE*2 ); - - // Top game field border - glMaterialfv( GL_FRONT, GL_DIFFUSE, border_diffuse ); - glMaterialfv( GL_FRONT, GL_AMBIENT, border_ambient ); - DrawBox( -1.1f, 1.0f, 0.0f, 1.1f, 1.1f, 0.1f ); - // Bottom game field border - glColor3f( 0.0f, 0.0f, 0.7f ); - DrawBox( -1.1f, -1.1f, 0.0f, 1.1f, -1.0f, 0.1f ); - // Left game field border - DrawBox( -1.1f, -1.0f, 0.0f, -1.0f, 1.0f, 0.1f ); - // Left game field border - DrawBox( 1.0f, -1.0f, 0.0f, 1.1f, 1.0f, 0.1f ); - - // Enable texturing - glEnable( GL_TEXTURE_2D ); - glBindTexture( GL_TEXTURE_2D, tex_id[ TEX_FIELD ] ); - - // Game field floor - glMaterialfv( GL_FRONT, GL_DIFFUSE, floor_diffuse ); - glMaterialfv( GL_FRONT, GL_AMBIENT, floor_ambient ); - DrawBox( -1.01f, -1.01f, -0.01f, 1.01f, 1.01f, 0.0f ); - - // Disable texturing - glDisable( GL_TEXTURE_2D ); - - // Disable face culling - glDisable( GL_CULL_FACE ); - - // Disable lighting - glDisable( GL_LIGHTING ); - - // Disable depth testing - glDisable( GL_DEPTH_TEST ); -} - - -//======================================================================== -// GameOver() -//======================================================================== - -void GameOver( void ) -{ - // Enable sticky keys - glfwEnable( GLFW_STICKY_KEYS ); - - // Until the user presses ESC or SPACE - while( !glfwGetKey( GLFW_KEY_ESC ) && !glfwGetKey( ' ' ) && - glfwGetWindowParam( GLFW_OPENED ) ) - { - // Draw display - UpdateDisplay(); - - // Setup projection matrix - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( 0.0f, 1.0f, 1.0f, 0.0f, -1.0f, 1.0f ); - - // Setup modelview matrix - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - - // Enable blending - glEnable( GL_BLEND ); - - // Dim background - glBlendFunc( GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA ); - glColor4f( 0.3f, 0.3f, 0.3f, 0.3f ); - glBegin( GL_QUADS ); - glVertex2f( 0.0f, 0.0f ); - glVertex2f( 1.0f, 0.0f ); - glVertex2f( 1.0f, 1.0f ); - glVertex2f( 0.0f, 1.0f ); - glEnd(); - - // Display winner text - glBlendFunc( GL_ONE, GL_ONE_MINUS_SRC_COLOR ); - if( winner == PLAYER1 ) - { - glColor4f( 1.0f, 0.5f, 0.5f, 1.0f ); - DrawImage( TEX_WINNER1, 0.35f, 0.65f, 0.46f, 0.54f ); - } - else if( winner == PLAYER2 ) - { - glColor4f( 0.5f, 1.0f, 0.5f, 1.0f ); - DrawImage( TEX_WINNER2, 0.35f, 0.65f, 0.46f, 0.54f ); - } - - // Disable blending - glDisable( GL_BLEND ); - - // Swap buffers - glfwSwapBuffers(); - } - - // Disable sticky keys - glfwDisable( GLFW_STICKY_KEYS ); -} - - -//======================================================================== -// GameLoop() - Game loop -//======================================================================== - -void GameLoop( void ) -{ - int playing, event; - - // Initialize a new game - NewGame(); - - // Enable sticky keys - glfwEnable( GLFW_STICKY_KEYS ); - - // Loop until the game ends - playing = GL_TRUE; - while( playing && glfwGetWindowParam( GLFW_OPENED ) ) - { - // Frame timer - oldtime = thistime; - thistime = glfwGetTime(); - dt = thistime - oldtime; - - // Get user input and update player positions - PlayerControl(); - - // Move the ball, and check if a player hits/misses the ball - event = BallControl(); - - // Did we have a winner? - switch( event ) - { - case PLAYER1_WINS: - winner = PLAYER1; - playing = GL_FALSE; - break; - case PLAYER2_WINS: - winner = PLAYER2; - playing = GL_FALSE; - break; - default: - break; - } - - // Did the user press ESC? - if( glfwGetKey( GLFW_KEY_ESC ) ) - { - playing = GL_FALSE; - } - - // Did the user change camera view? - if( glfwGetKey( '1' ) ) - { - camerapos = CAMERA_CLASSIC; - } - else if( glfwGetKey( '2' ) ) - { - camerapos = CAMERA_ABOVE; - } - else if( glfwGetKey( '3' ) ) - { - camerapos = CAMERA_SPECTATOR; - } - - // Draw display - UpdateDisplay(); - - // Swap buffers - glfwSwapBuffers(); - } - - // Disable sticky keys - glfwDisable( GLFW_STICKY_KEYS ); - - // Show winner - GameOver(); -} - - -//======================================================================== -// main() - Program entry point -//======================================================================== - -int main( void ) -{ - int menuoption; - - // Initialize GLFW - if( !glfwInit() ) - { - fprintf( stderr, "Failed to initialize GLFW\n" ); - exit( EXIT_FAILURE ); - } - - // Open OpenGL window - if( !glfwCreateWindow( WIDTH, HEIGHT, 0,0,0,0, 16,0, GLFW_FULLSCREEN ) ) - { - fprintf( stderr, "Failed to open GLFW window\n" ); - glfwTerminate(); - exit( EXIT_FAILURE ); - } - - glfwSwapInterval( 1 ); - - // Load all textures - if( !LoadTextures() ) - { - glfwTerminate(); - exit( EXIT_FAILURE ); - } - - // Main loop - do - { - // Get menu option - menuoption = GameMenu(); - - // If the user wants to play, let him... - if( menuoption == MENU_PLAY ) - { - GameLoop(); - } - } - while( menuoption != MENU_QUIT ); - - // Unload all textures - if( glfwGetWindowParam( GLFW_OPENED ) ) - { - glDeleteTextures( NUM_TEXTURES, tex_id ); - } - - // Terminate GLFW - glfwTerminate(); - - exit( EXIT_SUCCESS ); -} - diff --git a/examples/pong3d_field.tga b/examples/pong3d_field.tga deleted file mode 100644 index cc20bbdb82434faa3bbc01d27fd199d5214c8b2f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17816 zcmX|}e{dV;dFN%NMs0SHI?kkP%2AbGdCn*k0V?F{xhdB=r)t{su}NjqHbo+iD6^KR zvTiF8>zcy>XAvHxn34|yB_~ak&?{qiY6r*cVu%X?wHYn1v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pcb?P$1Bo;vSBdz|2BZry{_UKR_FBjjhUH6R1Y)C T6XevNs>&3`i95eA{_g(;MdbFK diff --git a/examples/pong3d_instr.tga b/examples/pong3d_instr.tga deleted file mode 100644 index 758eb447a97187cef812cb9100aa94631954c256..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21279 zcmeHP2Rzl?8-Hw~u1JaYUN7zOrunvumiCagw6_K-?eS|Wl1eG+&3!AgpOA8k(A#T3TA#+S)ogI;BdL($&?~)6*+mx^$T`Wds6&zP^6hvSken3=9no z%atoRYdx^?T-t5?5%{RRyhG;G+gQKLqG{PBmGnVGq{dE>^7n>1PN7A;%0Y}Kk&>(;H?v}yC_pMSP(+t$LuqFuXo?c2BS(4j-ejvYI7>eRV& z=fD2?t4o(IUAuPe)~#Fj?%jLz=+U!h&tAQH_3qufPoF-PmX=mlR(<>S?bokg|Ni|4 z3>YwQ;6Q6@>p_DC4IVsr$dDmJhYlS!Y}oMO!$*u5F>>U{QKLqU9zEK|#%9czF}Ak0 zW5&6LI($jMT-_KUc7k8k|j%*E_HNtbaHZXc6MI2 zY}xYV%U7&e;o{=5a^=cZt5&UEy?V`>HEY+dUAJ!C`t|EKY}l}I&OZQHkR-?3wdtE=nIojZ5!+U4fv=I-vkd-rY+505>2_IP@F?%lh0-@bkO z_wV=e@;Y$fz`=tDy}i8;9XfRQ@L?YxA75YJBS(%LJ$m%-zyCgV?3kaQpHL|L=bwL$ zA3uKL#EFw9Px|}&2LuG1I&~^AF!1#0(`U|{IeYf(xpU`&f`ZPUKY!uEh2Y@eix)3m zx^(IC<;z#DT)BGn>a}avu3x`?-O#2ckbM|d-rZ=XlPhi*u8uA z?%%)v;K7534<9~y^yu;9$4{O-dHVF}vuDqqKY#w>#fz6OU%qhGS8$adC0+@$m@>317Z^ zNlZ-q`t@s4Qc`kqa!N`{YHDg)TH3d7-@bqUo}Qkbk&%&^nJE&9#9}cbvJOyUlqmtj zWv7FEZPk?#@gGX7@$yCYD$P&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_%Zg zbtqb8Jx3ksCGV5`Na?h%xpY8uT>UVaskVDyH%6yrDYp3dx$k7bI;R`N zW8z)uxkXm^Pp&B>Xc`|n04-<$r9oFN&QElj;z+j0iJ2uANkJ#0Gf8rOrV;N>bTV~l zHvc`HMmUx&a$@J@g{4k2m!$Kn2sGH+b;;8vX)+ywK&5oH5P=p&Qfhfk%5H5nfk2Z% z=<1f@0d)yiE~nZ8focv|?b1rZ%84&=mXttA3H-m8z^*exi@gYn5HrC0b1~{aB_&sc znA%`*uehtHXfe;y{-L;y(wOXBKF1zG^3VD8>!0weHksp?R_6lSAkrIfVffRXCKXw< z=6rxYbJElOf*Zv#m++XItLBMW(w!lOqx?p(gKsej|LQT;(+EPQqRIzJ6 zyRlF)6YEH?e;V~Am6F`bF;9$~5fsN{*Eq>E%PHw+zc*=PcvBAFv&WzH>1I)53Rs0- z7m($S8zi5TkoI{Jql1|D{zex0SGMAq?*7d>bg(S@D`DBg_VUUO3e(3oq@5J4((+@^ zbJe18@Dn0%11%)WMD}!FYDiV_yEnSBXt~>pW2$&<&0U=Q7f%@-0ej644VImZ#@0Yj zxnG0ZU`FRb=<|#q$$uh{r4yt4LRc1>f4cyfYNsXJv%Ek^bW^Kp6srtRrwn@wPGi~$ zx{2517W>}>73sd{U4TS#$SPZ`WbG6L(;(I*FDmRii5|Q0yN9}jPQ|M=`lgF3L*)!{ zCHg-DUBE2K9-Poct$rqkob{9n6f3CW&zX;cV1ko4KQjl32D$+52$IG&@;#<3f!cwg zVeVib5?mWf4OxWNdYaje8(5fvMq$kHe{|08Ukt+fEAFs>jq5uE@ diff --git a/examples/pong3d_menu.tga b/examples/pong3d_menu.tga deleted file mode 100644 index d0d6c5a431687bfd6442e43c3878a9eb905c48b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1835 zcmbVMTawc-5FFd7KrLK{i*bQLe#C)-km6&1*q~+M0-Qi+$_YgGjAbh+zSu1}vefFC z>1kQyjg-Il@=jjMRenoIj~IXChe+&m7gLVsZQ6^Zkej3-2jP$yvZRY#urXlCQ#Jn=lGQ*?msDM%?fom_#3D0WLYd>| zrM8HEH4zdvDSlgLUu?J06w%uHU$F5BH?%^)6{nIMA=d zk04{L6gsNXLvPU$y7bcLR=F~R;{Yz~AoE6761IR~EZy-Sc90#?@jjEKjdZ2xgd?t2 zqtTm)Fw3kYxE=nmQqN{37J-&5_=7y4JqUx5<790bksq4`P6Xm?W2J#gsv94$c80Ep zhB(C(Tcv$%4nwfg>5lD?ncV@L-j6_|Q=WiD2HsmBQ7_k*Bwh}mIAS5_(&Zv)0+JQ*BV=)qzNL$W#l<{{t=av1 zh6fQJ3*Rf(fcY7y8DcVufs`P8r)X65U6x`6n^qTRM5LcL_vtFnz@hK-l+BKK+wK>L@83So!V-2z3xXZm}7`ZB*l$gvAC5tvMEd)H$-L j=(lM?g-Vm}Fwx!OsnJ{IV_$0Jn){}t&ktU$$5s9UqXSX} diff --git a/examples/pong3d_title.tga b/examples/pong3d_title.tga deleted file mode 100644 index d0d8e36d74011c25b908647632b4997dc0cf6456..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 106516 zcmce<2Uu0-68EdpK|w&VD`1!2d+#7pY#<^iz4tE4M#QdZ#w41=BqzmGyQY|O(oIiH ztg&~~Ps%w-)cc#Y_QoyIob!G6J~xkH?Xt@I&dh)2KQr%IyH6kUK0W{S>*zDI&nDhF z^zGB9U*En4{rVXj81y$XvNAQbv9K6vWi`gy+TPmQ(Z*(+t?l?hgC-6hJlW39Y3NXw zVZ+>p4|g9i!gIt3?~x;YM~(6uJvv~_m|zEoP)A4JvI9Gh95~R*%*@2l(6C=W&cB39 zY5Ml>s-AbWd0aUDLK{fApwaUOGHV?zUm(zi=HkaaQ;24-Pwyn%uA z>u+LWYG`O=U~mUt81Mz7KxhnPqkPSlIq~(~d~L^x7&Ye{XliQLzyAnJOU7xh$P^hd zHiYFdVua7AQK|$Z$Bz$lbaWdwjEQhkPQwK{Ig^G-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&FQF0w3B;?_t8&nQ%zy$8{}lNZuz2KOu=$5&hqZv-5nf;^D9Cmh%8yTa)bBY`_R_53Nd#EsKBJQuYjdwwMb@* z(k&)GcZG@o03fK`8+`%t0oVDB*iQpf9c|dr#*qVa(xFwCsH`z*} tHdR8;ZTT#I0=XtA{V5%aZ%3NviFkRDt1L_SF1IuQK`j3YU|hlP{|lS9Lw*1N diff --git a/examples/pong3d_winner1.tga b/examples/pong3d_winner1.tga deleted file mode 100644 index f963720c5b897c01b8694a0fb2d76ad617877a7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 861 zcmZvaO-{ow5QV29sw!Ag>q$zL$Sb2xaDZHc?={d~z#x?;&rAh7an>TNM%UG8<_V`T}Av+dQR1Q!U7Qc6{sSH8wNZP39q9qy#b$XF9@I6ez)S<6n zq_ehk;iMZ&fsh(meZGobq4LV7e~pc@d~^GlelDh;wKF}zCi`6*Je6~M>is%9SNEbW LDfk1czN>u!GHiyO diff --git a/examples/pong3d_winner2.tga b/examples/pong3d_winner2.tga deleted file mode 100644 index ea8266dea9f6ca7b261f2163b4f2bc4777a59027..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 891 zcmZvbOHRWu5Qe8Asw!Ag>q)E8}th{PDhL`jrJ%{=Jv6BL#k|RH6{>RMJ?8(;O zi#^-HZuV}m>~grW8Ozl^%t9=dzKDzE#2U(`*Z?%X-syv|S(? zK)sHv$a>wtB4Eb?Ma3Y>!sKURS)Tb0r3+%vTaEo6DJm{if#^X&j{?aT=fbk|<~&_O zt+PmDbft=sKHTt?QQd&&`CbHe)uYgASx)wtida}Bc}9?zn%(@SUw-irZBG_CWXznz z=XiOM7P58fg0$VeHnc3XW7$gDg_J8@PnncbAuX(+Ga!3cnA!amNonh?123}NqEvQz zr;kDo0gOh0x+DVBrpbD_p`wQ*Phz^)ltEEbz;t}sX=m;%O{Moj&@6$p=8wfP;J5)? zkhFgfjw0#^%tT0ME$!44Ga|_7pj0Ep>Z9on#mYG5)@84;kMi2DpOfl)jnK+)SAA~d cBD_m`U#oV84}EF9M`aSmW&0a^ddAJZ0j)ZbKmY&$ From cdcf3be4620e7eb5acb7990d837cdf8d4381ba02 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 29 Aug 2012 17:26:54 +0200 Subject: [PATCH 11/16] Removed event debug printfs. --- src/x11_window.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/src/x11_window.c b/src/x11_window.c index a34449d8..b6c7f4ae 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -477,10 +477,7 @@ static void processSingleEvent(void) // A keyboard key was pressed window = findWindow(event.xkey.window); if (window == NULL) - { - fprintf(stderr, "Cannot find GLFW window structure for KeyPress event\n"); return; - } // Translate and report key press _glfwInputKey(window, translateKey(event.xkey.keycode), GLFW_PRESS); @@ -496,10 +493,7 @@ static void processSingleEvent(void) // A keyboard key was released window = findWindow(event.xkey.window); if (window == NULL) - { - fprintf(stderr, "Cannot find GLFW window structure for KeyRelease event\n"); return; - } // Do not report key releases for key repeats. For key repeats we // will get KeyRelease/KeyPress pairs with similar or identical @@ -538,10 +532,7 @@ static void processSingleEvent(void) // A mouse button was pressed or a scrolling event occurred window = findWindow(event.xbutton.window); if (window == NULL) - { - fprintf(stderr, "Cannot find GLFW window structure for ButtonPress event\n"); return; - } if (event.xbutton.button == Button1) _glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_LEFT, GLFW_PRESS); @@ -570,10 +561,7 @@ static void processSingleEvent(void) // A mouse button was released window = findWindow(event.xbutton.window); if (window == NULL) - { - fprintf(stderr, "Cannot find GLFW window structure for ButtonRelease event\n"); return; - } if (event.xbutton.button == Button1) { @@ -601,10 +589,7 @@ static void processSingleEvent(void) // The cursor entered the window window = findWindow(event.xcrossing.window); if (window == NULL) - { - fprintf(stderr, "Cannot find GLFW window structure for EnterNotify event\n"); return; - } if (window->cursorMode == GLFW_CURSOR_HIDDEN) hideCursor(window); @@ -618,10 +603,7 @@ static void processSingleEvent(void) // The cursor left the window window = findWindow(event.xcrossing.window); if (window == NULL) - { - fprintf(stderr, "Cannot find GLFW window structure for LeaveNotify event\n"); return; - } if (window->cursorMode == GLFW_CURSOR_HIDDEN) showCursor(window); @@ -635,10 +617,7 @@ static void processSingleEvent(void) // The cursor was moved window = findWindow(event.xmotion.window); if (window == NULL) - { - fprintf(stderr, "Cannot find GLFW window structure for MotionNotify event\n"); return; - } if (event.xmotion.x != window->X11.cursorPosX || event.xmotion.y != window->X11.cursorPosY) @@ -676,10 +655,7 @@ static void processSingleEvent(void) // The window configuration changed somehow window = findWindow(event.xconfigure.window); if (window == NULL) - { - fprintf(stderr, "Cannot find GLFW window structure for ConfigureNotify event\n"); return; - } _glfwInputWindowSize(window, event.xconfigure.width, @@ -697,10 +673,7 @@ static void processSingleEvent(void) // Custom client message, probably from the window manager window = findWindow(event.xclient.window); if (window == NULL) - { - fprintf(stderr, "Cannot find GLFW window structure for ClientMessage event\n"); return; - } if ((Atom) event.xclient.data.l[0] == _glfwLibrary.X11.wmDeleteWindow) { @@ -731,10 +704,7 @@ static void processSingleEvent(void) // The window was mapped window = findWindow(event.xmap.window); if (window == NULL) - { - fprintf(stderr, "Cannot find GLFW window structure for MapNotify event\n"); return; - } _glfwInputWindowIconify(window, GL_FALSE); break; @@ -745,10 +715,7 @@ static void processSingleEvent(void) // The window was unmapped window = findWindow(event.xmap.window); if (window == NULL) - { - fprintf(stderr, "Cannot find GLFW window structure for UnmapNotify event\n"); return; - } _glfwInputWindowIconify(window, GL_TRUE); break; @@ -759,10 +726,7 @@ static void processSingleEvent(void) // The window gained focus window = findWindow(event.xfocus.window); if (window == NULL) - { - fprintf(stderr, "Cannot find GLFW window structure for FocusIn event\n"); return; - } _glfwInputWindowFocus(window, GL_TRUE); @@ -777,10 +741,7 @@ static void processSingleEvent(void) // The window lost focus window = findWindow(event.xfocus.window); if (window == NULL) - { - fprintf(stderr, "Cannot find GLFW window structure for FocusOut event\n"); return; - } _glfwInputWindowFocus(window, GL_FALSE); @@ -795,10 +756,7 @@ static void processSingleEvent(void) // The window's contents was damaged window = findWindow(event.xexpose.window); if (window == NULL) - { - fprintf(stderr, "Cannot find GLFW window structure for Expose event\n"); return; - } _glfwInputWindowDamage(window); break; From 38e4cc3dad598583240cd1176080a19567513ad5 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 29 Aug 2012 17:29:46 +0200 Subject: [PATCH 12/16] Removed superfluous comments. --- src/x11_window.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/x11_window.c b/src/x11_window.c index b6c7f4ae..4ee16644 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -479,12 +479,8 @@ static void processSingleEvent(void) if (window == NULL) return; - // Translate and report key press _glfwInputKey(window, translateKey(event.xkey.keycode), GLFW_PRESS); - - // Translate and report character input _glfwInputChar(window, translateChar(&event.xkey)); - break; } @@ -521,9 +517,7 @@ static void processSingleEvent(void) } } - // Translate and report key release _glfwInputKey(window, translateKey(event.xkey.keycode), GLFW_RELEASE); - break; } From 2502e4d6f36011732d14e9253faeeb88a743e536 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 29 Aug 2012 18:31:12 +0200 Subject: [PATCH 13/16] Renamed glfwGetJoystickPos to glfwGetJoystickAxes. --- include/GL/glfw3.h | 2 +- readme.html | 1 + src/cocoa_joystick.m | 8 ++++---- src/internal.h | 2 +- src/joystick.c | 8 ++++---- src/win32_joystick.c | 14 +++++++------- src/x11_joystick.c | 4 ++-- tests/joysticks.c | 2 +- 8 files changed, 21 insertions(+), 20 deletions(-) diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h index 5172da21..45f44339 100644 --- a/include/GL/glfw3.h +++ b/include/GL/glfw3.h @@ -564,7 +564,7 @@ GLFWAPI void glfwSetScrollCallback(GLFWscrollfun cbfun); /* Joystick input */ GLFWAPI int glfwGetJoystickParam(int joy, int param); -GLFWAPI int glfwGetJoystickPos(int joy, float* pos, int numaxes); +GLFWAPI int glfwGetJoystickAxes(int joy, float* axes, int numaxes); GLFWAPI int glfwGetJoystickButtons(int joy, unsigned char* buttons, int numbuttons); /* Clipboard */ diff --git a/readme.html b/readme.html index 23c9113f..d330d1c1 100644 --- a/readme.html +++ b/readme.html @@ -300,6 +300,7 @@ version of GLFW.

  • Renamed GLFW_BUILD_DLL to _GLFW_BUILD_DLL
  • Renamed version test to glfwinfo
  • Renamed GLFW_NO_GLU to GLFW_INCLUDE_GLU and made it disabled by default
  • +
  • Renamed glfwGetJoystickPos to glfwGetJoystickAxes to match glfwGetJoystickButtons
  • Renamed mouse position functions to cursor position equivalents
  • Replaced glfwOpenWindow and glfwCloseWindow with glfwCreateWindow and glfwDestroyWindow
  • Replaced ad hoc build system with CMake
  • diff --git a/src/cocoa_joystick.m b/src/cocoa_joystick.m index ff4ba958..7eac7f91 100644 --- a/src/cocoa_joystick.m +++ b/src/cocoa_joystick.m @@ -528,7 +528,7 @@ int _glfwPlatformGetJoystickParam(int joy, int param) // Get joystick axis positions //======================================================================== -int _glfwPlatformGetJoystickPos(int joy, float* pos, int numaxes) +int _glfwPlatformGetJoystickAxes(int joy, float* axes, int numaxes) { int i; @@ -556,12 +556,12 @@ int _glfwPlatformGetJoystickPos(int joy, float* pos, int numaxes) long readScale = axes->maxReport - axes->minReport; if (readScale == 0) - pos[i] = axes->value; + axes[i] = axes->value; else - pos[i] = (2.0f * (axes->value - axes->minReport) / readScale) - 1.0f; + axes[i] = (2.0f * (axes->value - axes->minReport) / readScale) - 1.0f; if (i & 1) - pos[i] = -pos[i]; + axes[i] = -axes[i]; } return numaxes; diff --git a/src/internal.h b/src/internal.h index 8fe3b241..c83b0949 100644 --- a/src/internal.h +++ b/src/internal.h @@ -273,7 +273,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window); // Joystick input int _glfwPlatformGetJoystickParam(int joy, int param); -int _glfwPlatformGetJoystickPos(int joy, float* pos, int numaxes); +int _glfwPlatformGetJoystickAxes(int joy, float* axes, int numaxes); int _glfwPlatformGetJoystickButtons(int joy, unsigned char* buttons, int numbuttons); // Time input diff --git a/src/joystick.c b/src/joystick.c index d7f98758..84763951 100644 --- a/src/joystick.c +++ b/src/joystick.c @@ -61,7 +61,7 @@ GLFWAPI int glfwGetJoystickParam(int joy, int param) // Get joystick axis positions //======================================================================== -GLFWAPI int glfwGetJoystickPos(int joy, float* pos, int numaxes) +GLFWAPI int glfwGetJoystickAxes(int joy, float* axes, int numaxes) { int i; @@ -77,7 +77,7 @@ GLFWAPI int glfwGetJoystickPos(int joy, float* pos, int numaxes) return 0; } - if (pos == NULL || numaxes < 0) + if (axes == NULL || numaxes < 0) { _glfwSetError(GLFW_INVALID_VALUE, NULL); return 0; @@ -85,9 +85,9 @@ GLFWAPI int glfwGetJoystickPos(int joy, float* pos, int numaxes) // Clear positions for (i = 0; i < numaxes; i++) - pos[i] = 0.0f; + axes[i] = 0.0f; - return _glfwPlatformGetJoystickPos(joy, pos, numaxes); + return _glfwPlatformGetJoystickAxes(joy, axes, numaxes); } diff --git a/src/win32_joystick.c b/src/win32_joystick.c index fcc6b599..a51773d3 100644 --- a/src/win32_joystick.c +++ b/src/win32_joystick.c @@ -116,7 +116,7 @@ int _glfwPlatformGetJoystickParam(int joy, int param) // Get joystick axis positions //======================================================================== -int _glfwPlatformGetJoystickPos(int joy, float* pos, int numaxes) +int _glfwPlatformGetJoystickAxes(int joy, float* axes, int numaxes) { JOYCAPS jc; JOYINFOEX ji; @@ -137,22 +137,22 @@ int _glfwPlatformGetJoystickPos(int joy, float* pos, int numaxes) // Get position values for all axes axis = 0; if (axis < numaxes) - pos[axis++] = calcJoystickPos(ji.dwXpos, jc.wXmin, jc.wXmax); + axes[axis++] = calcJoystickPos(ji.dwXpos, jc.wXmin, jc.wXmax); if (axis < numaxes) - pos[axis++] = -calcJoystickPos(ji.dwYpos, jc.wYmin, jc.wYmax); + axes[axis++] = -calcJoystickPos(ji.dwYpos, jc.wYmin, jc.wYmax); if (axis < numaxes && jc.wCaps & JOYCAPS_HASZ) - pos[axis++] = calcJoystickPos(ji.dwZpos, jc.wZmin, jc.wZmax); + axes[axis++] = calcJoystickPos(ji.dwZpos, jc.wZmin, jc.wZmax); if (axis < numaxes && jc.wCaps & JOYCAPS_HASR) - pos[axis++] = calcJoystickPos(ji.dwRpos, jc.wRmin, jc.wRmax); + axes[axis++] = calcJoystickPos(ji.dwRpos, jc.wRmin, jc.wRmax); if (axis < numaxes && jc.wCaps & JOYCAPS_HASU) - pos[axis++] = calcJoystickPos(ji.dwUpos, jc.wUmin, jc.wUmax); + axes[axis++] = calcJoystickPos(ji.dwUpos, jc.wUmin, jc.wUmax); if (axis < numaxes && jc.wCaps & JOYCAPS_HASV) - pos[axis++] = -calcJoystickPos(ji.dwVpos, jc.wVmin, jc.wVmax); + axes[axis++] = -calcJoystickPos(ji.dwVpos, jc.wVmin, jc.wVmax); return axis; } diff --git a/src/x11_joystick.c b/src/x11_joystick.c index 09885373..a5700c68 100644 --- a/src/x11_joystick.c +++ b/src/x11_joystick.c @@ -260,7 +260,7 @@ int _glfwPlatformGetJoystickParam(int joy, int param) // Get joystick axis positions //======================================================================== -int _glfwPlatformGetJoystickPos(int joy, float* pos, int numAxes) +int _glfwPlatformGetJoystickAxes(int joy, float* axes, int numAxes) { int i; @@ -273,7 +273,7 @@ int _glfwPlatformGetJoystickPos(int joy, float* pos, int numAxes) numAxes = _glfwLibrary.X11.joystick[joy].numAxes; for (i = 0; i < numAxes; i++) - pos[i] = _glfwLibrary.X11.joystick[joy].axis[i]; + axes[i] = _glfwLibrary.X11.joystick[joy].axis[i]; return numAxes; } diff --git a/tests/joysticks.c b/tests/joysticks.c index 488f98ad..40202ce7 100644 --- a/tests/joysticks.c +++ b/tests/joysticks.c @@ -137,7 +137,7 @@ static void refresh_joysticks(void) j->axes = realloc(j->axes, j->axis_count * sizeof(float)); } - glfwGetJoystickPos(GLFW_JOYSTICK_1 + i, j->axes, j->axis_count); + glfwGetJoystickAxes(GLFW_JOYSTICK_1 + i, j->axes, j->axis_count); button_count = glfwGetJoystickParam(GLFW_JOYSTICK_1 + i, GLFW_BUTTONS); if (button_count != j->button_count) From 733cd5372fd932dbf1754dbb9a7f63bb5a3dcc0c Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 30 Aug 2012 02:17:08 +0200 Subject: [PATCH 14/16] Fixed and separated GLFW version check. --- tests/glfwinfo.c | 49 ++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/tests/glfwinfo.c b/tests/glfwinfo.c index 11a84612..52d6e0de 100644 --- a/tests/glfwinfo.c +++ b/tests/glfwinfo.c @@ -119,6 +119,32 @@ static void list_extensions(int major, int minor) putchar('\n'); } +static GLboolean valid_version(void) +{ + int major, minor, revision; + + glfwGetVersion(&major, &minor, &revision); + + printf("GLFW header version: %u.%u.%u\n", + GLFW_VERSION_MAJOR, + GLFW_VERSION_MINOR, + GLFW_VERSION_REVISION); + + printf("GLFW library version: %u.%u.%u\n", major, minor, revision); + + if (major != GLFW_VERSION_MAJOR) + { + printf("*** ERROR: GLFW major version mismatch! ***\n"); + return GL_FALSE; + } + + if (minor != GLFW_VERSION_MINOR || revision != GLFW_VERSION_REVISION) + printf("*** WARNING: GLFW version mismatch! ***\n"); + + printf("GLFW library version string: \"%s\"\n", glfwGetVersionString()); + return GL_TRUE; +} + int main(int argc, char** argv) { int ch, profile = 0, strategy = 0, major = 1, minor = 0, revision; @@ -126,6 +152,9 @@ int main(int argc, char** argv) GLint flags, mask; GLFWwindow window; + if (!valid_version()) + exit(EXIT_FAILURE); + while ((ch = getopt(argc, argv, "dfhlm:n:p:r:")) != -1) { switch (ch) @@ -181,26 +210,6 @@ int main(int argc, char** argv) argc -= optind; argv += optind; - // Report GLFW version - - glfwGetVersion(&major, &minor, &revision); - - printf("GLFW header version: %u.%u.%u\n", - GLFW_VERSION_MAJOR, - GLFW_VERSION_MINOR, - GLFW_VERSION_REVISION); - - printf("GLFW library version: %u.%u.%u\n", major, minor, revision); - - if (major != GLFW_VERSION_MAJOR || - minor != GLFW_VERSION_MINOR || - revision != GLFW_VERSION_REVISION) - { - printf("*** WARNING: GLFW version mismatch! ***\n"); - } - - printf("GLFW library version string: \"%s\"\n", glfwGetVersionString()); - // Initialize GLFW and create window glfwSetErrorCallback(error_callback); From 52c27113d3de0f02f130267bd1822403f959f028 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 2 Sep 2012 15:21:40 +0200 Subject: [PATCH 15/16] Shortened PC boolean name. --- src/win32_platform.h | 2 +- src/win32_time.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/win32_platform.h b/src/win32_platform.h index 79bbbb94..ba10039e 100644 --- a/src/win32_platform.h +++ b/src/win32_platform.h @@ -191,7 +191,7 @@ typedef struct _GLFWlibraryWin32 // Timer data struct { - GLboolean hasPerformanceCounter; + GLboolean hasPC; double resolution; unsigned int t0_32; __int64 t0_64; diff --git a/src/win32_time.c b/src/win32_time.c index 1e1d57f4..96f7b454 100644 --- a/src/win32_time.c +++ b/src/win32_time.c @@ -45,13 +45,13 @@ void _glfwInitTimer(void) if (QueryPerformanceFrequency((LARGE_INTEGER*) &freq)) { - _glfwLibrary.Win32.timer.hasPerformanceCounter = GL_TRUE; + _glfwLibrary.Win32.timer.hasPC = GL_TRUE; _glfwLibrary.Win32.timer.resolution = 1.0 / (double) freq; QueryPerformanceCounter((LARGE_INTEGER*) &_glfwLibrary.Win32.timer.t0_64); } else { - _glfwLibrary.Win32.timer.hasPerformanceCounter = GL_FALSE; + _glfwLibrary.Win32.timer.hasPC = GL_FALSE; _glfwLibrary.Win32.timer.resolution = 0.001; // winmm resolution is 1 ms _glfwLibrary.Win32.timer.t0_32 = _glfw_timeGetTime(); } @@ -71,7 +71,7 @@ double _glfwPlatformGetTime(void) double t; __int64 t_64; - if (_glfwLibrary.Win32.timer.hasPerformanceCounter) + if (_glfwLibrary.Win32.timer.hasPC) { QueryPerformanceCounter((LARGE_INTEGER*) &t_64); t = (double)(t_64 - _glfwLibrary.Win32.timer.t0_64); @@ -91,7 +91,7 @@ void _glfwPlatformSetTime(double t) { __int64 t_64; - if (_glfwLibrary.Win32.timer.hasPerformanceCounter) + if (_glfwLibrary.Win32.timer.hasPC) { QueryPerformanceCounter((LARGE_INTEGER*) &t_64); _glfwLibrary.Win32.timer.t0_64 = t_64 - (__int64) (t / _glfwLibrary.Win32.timer.resolution); From a339098bc01b246d67ad165bcd2380ce51d666db Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 2 Sep 2012 15:22:56 +0200 Subject: [PATCH 16/16] Formatting. --- include/GL/glfw3.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h index 45f44339..1e90a5bc 100644 --- a/include/GL/glfw3.h +++ b/include/GL/glfw3.h @@ -527,11 +527,11 @@ GLFWAPI void glfwSetGammaRamp(const GLFWgammaramp* ramp); GLFWAPI void glfwWindowHint(int target, int hint); GLFWAPI GLFWwindow glfwCreateWindow(int width, int height, int mode, const char* title, GLFWwindow share); GLFWAPI void glfwDestroyWindow(GLFWwindow window); -GLFWAPI void glfwSetWindowTitle(GLFWwindow, const char* title); -GLFWAPI void glfwGetWindowSize(GLFWwindow, int* width, int* height); -GLFWAPI void glfwSetWindowSize(GLFWwindow, int width, int height); -GLFWAPI void glfwGetWindowPos(GLFWwindow, int* xpos, int* ypos); -GLFWAPI void glfwSetWindowPos(GLFWwindow, int xpos, int ypos); +GLFWAPI void glfwSetWindowTitle(GLFWwindow window, const char* title); +GLFWAPI void glfwGetWindowSize(GLFWwindow window, int* width, int* height); +GLFWAPI void glfwSetWindowSize(GLFWwindow window, int width, int height); +GLFWAPI void glfwGetWindowPos(GLFWwindow window, int* xpos, int* ypos); +GLFWAPI void glfwSetWindowPos(GLFWwindow window, int xpos, int ypos); GLFWAPI void glfwIconifyWindow(GLFWwindow window); GLFWAPI void glfwRestoreWindow(GLFWwindow window); GLFWAPI int glfwGetWindowParam(GLFWwindow window, int param);