Added glfwGetVersionString.

This commit is contained in:
Camilla Berglund
2010-09-13 18:05:59 +02:00
parent 3c2a89e5e8
commit d6fe447ca9
6 changed files with 47 additions and 3 deletions
+2
View File
@@ -12,3 +12,5 @@
/* Define this to 1 if glXGetProcAddressEXT is available */
#cmakedefine _GLFW_HAS_GLXGETPROCADDRESSEXT 1
#define _GLFW_VERSION_FULL "@GLFW_VERSION_FULL@"
+29
View File
@@ -247,3 +247,32 @@ int _glfwPlatformTerminate(void)
return GL_TRUE;
}
//========================================================================
// Get the GLFW version string
//========================================================================
const char* _glfwPlatformGetVersionString(void)
{
const char* version = "GLFW " _GLFW_VERSION_FULL
#if defined(_GLFW_HAS_XRANDR)
" XRandR"
#elif defined(_GLFW_HAS_XF86VIDMODE)
" Xf86VidMode"
#endif
#if defined(_GLFW_HAS_GLXGETPROCADDRESS)
" glXGetProcAddress"
#elif defined(_GLFW_HAS_GLXGETPROCADDRESSARB)
" glXGetProcAddressARB"
#elif defined(_GLFW_HAS_GLXGETPROCADDRESSEXT)
" glXGetProcAddressEXT"
#elif defined(_GLFW_DLOPEN_LIBGL)
" dlopen(libGL)"
#endif
#if defined(_GLFW_USE_LINUX_JOYSTICKS)
" Linux joystick API"
#endif
;
return version;
}