forked from pool/freeglut
27 lines
920 B
Diff
27 lines
920 B
Diff
diff -ur glxgears.orig/glxgears.c glxgears/glxgears.c
|
|
--- glxgears.orig/glxgears.c 2005-04-15 10:37:23.000000000 +0200
|
|
+++ glxgears/glxgears.c 2009-01-20 17:57:12.000000000 +0100
|
|
@@ -42,6 +42,7 @@
|
|
*
|
|
*/
|
|
|
|
+#define _GNU_SOURCE
|
|
|
|
#include <X11/Xlib.h>
|
|
#include <X11/Xutil.h>
|
|
@@ -862,6 +863,14 @@
|
|
printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
|
|
}
|
|
|
|
+ if (! glXIsDirect(dpy, ctx))
|
|
+ printf ("\n***\n*** WARNING: Direct Rendering is NOT enabled\n***\n");
|
|
+ else if (strcasestr ((char *) glGetString(GL_RENDERER), "software"))
|
|
+ printf ("\n***\n*** WARNING: Hardware acceleration is NOT active\n***\n");
|
|
+ printf ("\n*** NOTE: Don't use glxgears as a benchmark.\n"
|
|
+ " OpenGL implementations are not optimized for frame rates >> 60fps,\n"
|
|
+ " thus these numbers are meaningless when compared between vendors.\n\n");
|
|
+
|
|
init();
|
|
|
|
#ifdef BUILD_PRINTSUPPORT
|