mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 16:44:11 +00:00
Added glfwGetVersionString.
This commit is contained in:
@@ -12,3 +12,5 @@
|
||||
/* Define this to 1 if glXGetProcAddressEXT is available */
|
||||
#cmakedefine _GLFW_HAS_GLXGETPROCADDRESSEXT 1
|
||||
|
||||
#define _GLFW_VERSION_FULL "@GLFW_VERSION_FULL@"
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user