diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h
index 6e70e59c..63e5f17f 100644
--- a/include/GL/glfw3.h
+++ b/include/GL/glfw3.h
@@ -409,10 +409,11 @@ extern "C" {
#define GLFW_FSAA_SAMPLES 0x00020012
#define GLFW_OPENGL_VERSION_MAJOR 0x00020013
#define GLFW_OPENGL_VERSION_MINOR 0x00020014
-#define GLFW_OPENGL_FORWARD_COMPAT 0x00020015
-#define GLFW_OPENGL_DEBUG_CONTEXT 0x00020016
-#define GLFW_OPENGL_PROFILE 0x00020017
-#define GLFW_OPENGL_ROBUSTNESS 0x00020018
+#define GLFW_OPENGL_REVISION 0x00020015
+#define GLFW_OPENGL_FORWARD_COMPAT 0x00020016
+#define GLFW_OPENGL_DEBUG_CONTEXT 0x00020017
+#define GLFW_OPENGL_PROFILE 0x00020018
+#define GLFW_OPENGL_ROBUSTNESS 0x00020019
/* GLFW_OPENGL_ROBUSTNESS mode tokens */
#define GLFW_OPENGL_NO_ROBUSTNESS 0x00000000
@@ -582,7 +583,6 @@ GLFWAPI void glfwSwapBuffers(void);
GLFWAPI void glfwSwapInterval(int interval);
GLFWAPI int glfwExtensionSupported(const char* extension);
GLFWAPI void* glfwGetProcAddress(const char* procname);
-GLFWAPI void glfwGetGLVersion(int* major, int* minor, int* rev);
GLFWAPI void glfwCopyGLState(GLFWwindow src, GLFWwindow dst, unsigned long mask);
/* Enable/disable functions */
diff --git a/readme.html b/readme.html
index 31cc03ed..d1d4b031 100644
--- a/readme.html
+++ b/readme.html
@@ -276,6 +276,7 @@ version of GLFW.
Added glfwCopyGLState
function for copying OpenGL state categories between contexts
Added GLFW_OPENGL_ES2_PROFILE
profile for creating OpenGL ES 2.0 contexts using the GLX_EXT_create_context_es2_profile
and WGL_EXT_create_context_es2_profile
extensions
Added GLFW_OPENGL_ROBUSTNESS
window hint and associated strategy tokens for GL_ARB_robustness
support
+ Added GLFW_OPENGL_REVISION
window parameter to make up for removal of glfwGetGLVersion
Added windows
simple multi-window test program
Added sharing
simple OpenGL object sharing test program
Added a parameter to glfwOpenWindow
for specifying a context the new window's context will share objects with
@@ -295,6 +296,7 @@ version of GLFW.
Removed deprecated Carbon port
Removed glfwSleep
function
Removed glfwGetNumberOfProcessors
function
+ Removed glfwGetGLVersion
function
Removed GLFW_OPENED
window parameter
Removed nonsensical key actions for Unicode character input
Removed GLFWCALL
and GLFWAPIENTRY
macros for stdcall calling convention
diff --git a/src/opengl.c b/src/opengl.c
index 7621b438..5e465f4a 100644
--- a/src/opengl.c
+++ b/src/opengl.c
@@ -556,38 +556,6 @@ GLFWAPI void* glfwGetProcAddress(const char* procname)
}
-//========================================================================
-// Returns the OpenGL version
-//========================================================================
-
-GLFWAPI void glfwGetGLVersion(int* major, int* minor, int* rev)
-{
- _GLFWwindow* window;
-
- if (!_glfwInitialized)
- {
- _glfwSetError(GLFW_NOT_INITIALIZED, NULL);
- return;
- }
-
- window = _glfwLibrary.currentWindow;
- if (!window)
- {
- _glfwSetError(GLFW_NO_CURRENT_WINDOW, NULL);
- return;
- }
-
- if (major != NULL)
- *major = window->glMajor;
-
- if (minor != NULL)
- *minor = window->glMinor;
-
- if (rev != NULL)
- *rev = window->glRevision;
-}
-
-
//========================================================================
// Copies the specified OpenGL state categories from src to dst
//========================================================================
diff --git a/src/window.c b/src/window.c
index 086b9188..156460d0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -777,6 +777,8 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow handle, int param)
return window->glMajor;
case GLFW_OPENGL_VERSION_MINOR:
return window->glMinor;
+ case GLFW_OPENGL_REVISION:
+ return window->glRevision;
case GLFW_OPENGL_FORWARD_COMPAT:
return window->glForward;
case GLFW_OPENGL_DEBUG_CONTEXT:
diff --git a/tests/version.c b/tests/version.c
index e473ef55..c36fa387 100644
--- a/tests/version.c
+++ b/tests/version.c
@@ -229,7 +229,9 @@ int main(int argc, char** argv)
printf("OpenGL context version string: \"%s\"\n", glGetString(GL_VERSION));
- glfwGetGLVersion(&major, &minor, &revision);
+ major = glfwGetWindowParam(window, GLFW_OPENGL_VERSION_MAJOR);
+ minor = glfwGetWindowParam(window, GLFW_OPENGL_VERSION_MINOR);
+ revision = glfwGetWindowParam(window, GLFW_OPENGL_REVISION);
printf("OpenGL context version parsed by GLFW: %u.%u.%u\n", major, minor, revision);