From 3a72f33541466c0d0b00a4c33e70c981e87fa9fe Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 2 Aug 2012 01:13:05 +0200 Subject: [PATCH] Removed GLFW_ACCELERATED window parameter. --- include/GL/glfw3.h | 1 - readme.html | 1 + src/cocoa_window.m | 5 ----- src/internal.h | 1 - src/win32_opengl.c | 12 ------------ src/window.c | 2 -- src/x11_opengl.c | 4 ---- tests/defaults.c | 1 - 8 files changed, 1 insertion(+), 26 deletions(-) diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h index 28e38bd1..693e55f3 100644 --- a/include/GL/glfw3.h +++ b/include/GL/glfw3.h @@ -390,7 +390,6 @@ extern "C" { /* glfwGetWindowParam tokens */ #define GLFW_ACTIVE 0x00020001 #define GLFW_ICONIFIED 0x00020002 -#define GLFW_ACCELERATED 0x00020003 #define GLFW_OPENGL_REVISION 0x00020004 /* The following constants are used for both glfwGetWindowParam diff --git a/readme.html b/readme.html index 10fa433b..e5fa8c9d 100644 --- a/readme.html +++ b/readme.html @@ -318,6 +318,7 @@ version of GLFW.

  • Removed GLFW_OPENED window parameter
  • Removed nonsensical key actions for Unicode character input
  • Removed GLFWCALL and GLFWAPIENTRY macros for stdcall calling convention
  • +
  • Removed GLFW_ACCELERATED window parameter
  • Bugfix: The default OpenGL version in the glfwinfo test was set to 1.1
  • Bugfix: The OpenGL profile and forward-compatibility window parameters were not saved after context creation
  • Bugfix: The FSAA test did not check for the availability of GL_ARB_multisample
  • diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 9f20398a..e0b146b9 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1047,11 +1047,6 @@ void _glfwPlatformRefreshWindowParams(void) // Since GLFW doesn't understand screens, we use virtual screen zero - [window->NSGL.pixelFormat getValues:&value - forAttribute:NSOpenGLPFAAccelerated - forVirtualScreen:0]; - window->accelerated = value; - [window->NSGL.pixelFormat getValues:&value forAttribute:NSOpenGLPFAAlphaSize forVirtualScreen:0]; diff --git a/src/internal.h b/src/internal.h index 700b6c06..f0bc6cb0 100644 --- a/src/internal.h +++ b/src/internal.h @@ -211,7 +211,6 @@ struct _GLFWwindow int samples; // OpenGL extensions and context attributes - GLboolean accelerated; // GL_TRUE if OpenGL context is "accelerated" int glMajor, glMinor, glRevision; GLboolean glForward, glDebug; int glProfile; diff --git a/src/win32_opengl.c b/src/win32_opengl.c index cc795e53..1bb26bfc 100644 --- a/src/win32_opengl.c +++ b/src/win32_opengl.c @@ -300,14 +300,6 @@ static void refreshContextParams(_GLFWwindow* window, int pixelFormat) if (window->WGL.ARB_pixel_format) { - if (getPixelFormatAttrib(window, pixelFormat, WGL_ACCELERATION_ARB) != - WGL_NO_ACCELERATION_ARB) - { - window->accelerated = GL_TRUE; - } - else - window->accelerated = GL_FALSE; - window->redBits = getPixelFormatAttrib(window, pixelFormat, WGL_RED_BITS_ARB); window->greenBits = @@ -353,10 +345,6 @@ static void refreshContextParams(_GLFWwindow* window, int pixelFormat) DescribePixelFormat(window->WGL.DC, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd); - // Is current OpenGL context accelerated? - window->accelerated = (pfd.dwFlags & PFD_GENERIC_ACCELERATED) || - !(pfd.dwFlags & PFD_GENERIC_FORMAT) ? 1 : 0; - // "Standard" window parameters window->redBits = pfd.cRedBits; window->greenBits = pfd.cGreenBits; diff --git a/src/window.c b/src/window.c index f8939e37..119ce7de 100644 --- a/src/window.c +++ b/src/window.c @@ -682,8 +682,6 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow handle, int param) return window == _glfwLibrary.activeWindow; case GLFW_ICONIFIED: return window->iconified; - case GLFW_ACCELERATED: - return window->accelerated; case GLFW_RED_BITS: return window->redBits; case GLFW_GREEN_BITS: diff --git a/src/x11_opengl.c b/src/x11_opengl.c index edcd69b6..048b794f 100644 --- a/src/x11_opengl.c +++ b/src/x11_opengl.c @@ -233,10 +233,6 @@ static void refreshContextParams(_GLFWwindow* window, GLXFBConfigID fbconfigID) abort(); } - // There is no clear definition of an "accelerated" context on X11/GLX, and - // true sounds better than false, so we hardcode true here - window->accelerated = GL_TRUE; - window->redBits = getFBConfigAttrib(window, *fbconfig, GLX_RED_SIZE); window->greenBits = getFBConfigAttrib(window, *fbconfig, GLX_GREEN_SIZE); window->blueBits = getFBConfigAttrib(window, *fbconfig, GLX_BLUE_SIZE); diff --git a/tests/defaults.c b/tests/defaults.c index d7c5a02c..16c62723 100644 --- a/tests/defaults.c +++ b/tests/defaults.c @@ -42,7 +42,6 @@ typedef struct static Param parameters[] = { - { GLFW_ACCELERATED, "accelerated" }, { GLFW_RED_BITS, "red bits" }, { GLFW_GREEN_BITS, "green bits" }, { GLFW_BLUE_BITS, "blue bits" },