diff options
author | Ian Romanick <[email protected]> | 2004-02-23 17:37:36 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2004-02-23 17:37:36 +0000 |
commit | c00fbd55ba45e0c9e4e8ed246103e75cc7fe0af5 (patch) | |
tree | 5be3bd1a5d226f4e4c75bd690cca41b7ea404c14 /progs/xdemos | |
parent | 001dc022fc8c463ff20030e2a54934c93d50c969 (diff) |
The available GLX version is now logged in addition to the client
version and the server version.
Diffstat (limited to 'progs/xdemos')
-rw-r--r-- | progs/xdemos/glxinfo.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/progs/xdemos/glxinfo.c b/progs/xdemos/glxinfo.c index f3fb6fd659c..0e9a731dc86 100644 --- a/progs/xdemos/glxinfo.c +++ b/progs/xdemos/glxinfo.c @@ -271,12 +271,20 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits) const char *glRenderer = (const char *) glGetString(GL_RENDERER); const char *glVersion = (const char *) glGetString(GL_VERSION); const char *glExtensions = (const char *) glGetString(GL_EXTENSIONS); + int glxVersionMajor; + int glxVersionMinor; char *displayName = NULL; char *colon = NULL, *period = NULL; #ifdef DO_GLU const char *gluVersion = (const char *) gluGetString(GLU_VERSION); const char *gluExtensions = (const char *) gluGetString(GLU_EXTENSIONS); #endif + + if (! glXQueryVersion( dpy, & glxVersionMajor, & glxVersionMinor )) { + fprintf(stderr, "Error: glXQueryVersion failed\n"); + exit(1); + } + /* Strip the screen number from the display name, if present. */ if (!(displayName = (char *) malloc(strlen(DisplayString(dpy)) + 1))) { fprintf(stderr, "Error: malloc() failed\n"); @@ -300,6 +308,7 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits) printf("client glx version string: %s\n", clientVersion); printf("client glx extensions:\n"); print_extension_list(clientExtensions); + printf("GLX version: %u.%u\n", glxVersionMajor, glxVersionMinor); printf("GLX extensions:\n"); print_extension_list(glxExtensions); printf("OpenGL vendor string: %s\n", glVendor); |