freeglut/freeglut-glxinfo-notify.diff

25 lines
745 B
Diff

diff -ur glxinfo.orig/glxinfo.c glxinfo/glxinfo.c
--- glxinfo.orig/glxinfo.c 2004-07-29 21:18:52.000000000 +0200
+++ glxinfo/glxinfo.c 2009-01-20 18:10:08.000000000 +0100
@@ -35,6 +35,8 @@
* Brian Paul 26 January 2000
*/
+#define _GNU_SOURCE
+
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <GL/gl.h>
@@ -323,6 +325,11 @@
fprintf(stderr, "Error: glXMakeCurrent failed\n");
}
+ if (! glXIsDirect(dpy, ctx))
+ printf ("\n***\n*** WARNING: Direct Rendering is NOT enabled\n***\n\n");
+ else if (strcasestr ((char *) glGetString(GL_RENDERER), "software"))
+ printf ("\n***\n*** WARNING: Hardware acceleration is NOT active\n***\n\n");
+
glXDestroyContext(dpy, ctx);
XDestroyWindow(dpy, win);
}