diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h
index 6fd41cae..d3d48a33 100644
--- a/include/GL/glfw3.h
+++ b/include/GL/glfw3.h
@@ -470,6 +470,9 @@ extern "C" {
* Typedefs
*************************************************************************/
+/* OpenGL function pointer type */
+typedef void (*GLFWglproc)(void);
+
/* Window handle type */
typedef void* GLFWwindow;
@@ -589,7 +592,7 @@ GLFWAPI GLFWwindow glfwGetCurrentContext(void);
GLFWAPI void glfwSwapBuffers(void);
GLFWAPI void glfwSwapInterval(int interval);
GLFWAPI int glfwExtensionSupported(const char* extension);
-GLFWAPI void* glfwGetProcAddress(const char* procname);
+GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname);
GLFWAPI void glfwCopyContext(GLFWwindow src, GLFWwindow dst, unsigned long mask);
diff --git a/readme.html b/readme.html
index e1b29330..fbc3e9d7 100644
--- a/readme.html
+++ b/readme.html
@@ -292,6 +292,7 @@ version of GLFW.
Added glfwSetGamma, glfwSetGammaRamp and glfwGetGammaRamp functions and GLFWgammaramp type for monitor gamma ramp control
Changed buffer bit depth parameters of glfwOpenWindow to window hints
Changed glfwOpenWindow and glfwSetWindowTitle to use UTF-8 encoded strings
+ Changed glfwGetProcAddress to return a (generic) function pointer
Renamed glfw.h to glfw3.h to avoid conflicts with 2.x series
Renamed GLFW_WINDOW token to GLFW_WINDOWED
Renamed GLFW_WINDOW_NO_RESIZE to GLFW_WINDOW_RESIZABLE
diff --git a/src/cocoa_opengl.m b/src/cocoa_opengl.m
index 33bf4ab5..b04efaee 100644
--- a/src/cocoa_opengl.m
+++ b/src/cocoa_opengl.m
@@ -88,14 +88,14 @@ int _glfwPlatformExtensionSupported(const char* extension)
// Get the function pointer to an OpenGL function
//========================================================================
-void* _glfwPlatformGetProcAddress(const char* procname)
+GLFWglproc _glfwPlatformGetProcAddress(const char* procname)
{
CFStringRef symbolName = CFStringCreateWithCString(kCFAllocatorDefault,
procname,
kCFStringEncodingASCII);
- void* symbol = CFBundleGetFunctionPointerForName(_glfwLibrary.NSGL.framework,
- symbolName);
+ GLFWglproc symbol = CFBundleGetFunctionPointerForName(_glfwLibrary.NSGL.framework,
+ symbolName);
CFRelease(symbolName);
diff --git a/src/internal.h b/src/internal.h
index 5293caf4..ec2bab10 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -327,7 +327,7 @@ void _glfwPlatformSwapBuffers(void);
void _glfwPlatformSwapInterval(int interval);
void _glfwPlatformRefreshWindowParams(void);
int _glfwPlatformExtensionSupported(const char* extension);
-void* _glfwPlatformGetProcAddress(const char* procname);
+GLFWglproc _glfwPlatformGetProcAddress(const char* procname);
void _glfwPlatformCopyContext(_GLFWwindow* src, _GLFWwindow* dst, unsigned long mask);
diff --git a/src/opengl.c b/src/opengl.c
index b35f8694..67b5e728 100644
--- a/src/opengl.c
+++ b/src/opengl.c
@@ -613,7 +613,7 @@ GLFWAPI int glfwExtensionSupported(const char* extension)
// This function can be used to get access to extended OpenGL functions.
//========================================================================
-GLFWAPI void* glfwGetProcAddress(const char* procname)
+GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname)
{
if (!_glfwInitialized)
{
diff --git a/src/win32_opengl.c b/src/win32_opengl.c
index 2262c222..f6275782 100644
--- a/src/win32_opengl.c
+++ b/src/win32_opengl.c
@@ -111,9 +111,9 @@ int _glfwPlatformExtensionSupported(const char* extension)
// Get the function pointer to an OpenGL function
//========================================================================
-void* _glfwPlatformGetProcAddress(const char* procname)
+GLFWglproc _glfwPlatformGetProcAddress(const char* procname)
{
- return (void*) wglGetProcAddress(procname);
+ return wglGetProcAddress(procname);
}
diff --git a/src/x11_opengl.c b/src/x11_opengl.c
index ac1974f1..dc2788c8 100644
--- a/src/x11_opengl.c
+++ b/src/x11_opengl.c
@@ -752,9 +752,9 @@ int _glfwPlatformExtensionSupported(const char* extension)
// Get the function pointer to an OpenGL function
//========================================================================
-void* _glfwPlatformGetProcAddress(const char* procname)
+GLFWglproc _glfwPlatformGetProcAddress(const char* procname)
{
- return (void*) _glfw_glXGetProcAddress((const GLubyte*) procname);
+ return _glfw_glXGetProcAddress((const GLubyte*) procname);
}