OBS User unknown 2009-01-22 12:09:44 +00:00 committed by Git OBS Bridge
parent 23f3759269
commit d2762e7f36
4 changed files with 72 additions and 1 deletions

View File

@ -0,0 +1,26 @@
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

View File

@ -0,0 +1,24 @@
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);
}

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Jan 20 18:36:46 CET 2009 - mhopf@suse.de
- freeglut-glxgears-notify.diff, freeglut-glxinfo-notify.diff
* Notify user if direct rendering or hardware acceleration
is not available
* Notify user that glxgears is not a benchmark
-------------------------------------------------------------------
Sat Jan 17 12:47:22 CET 2009 - sndirsch@suse.de

View File

@ -22,7 +22,7 @@ Name: freeglut
BuildRequires: Mesa-devel gcc-c++ libdrm-devel pkgconfig xorg-x11-devel
Summary: Freely licensed alternative to the GLUT library
Version: 080721
Release: 21
Release: 23
Url: http://freeglut.sourceforge.net/
%define USE_EXTERNAL_MESA 1
Source0: freeglut-%{version}.tar.bz2
@ -33,6 +33,8 @@ Source4: compat70.tar.bz2
Patch: freeglut-%{version}.diff
Patch1: glxdemos.diff
Patch2: freeglut-sig11-bug466806.diff
Patch10: freeglut-glxgears-notify.diff
Patch11: freeglut-glxinfo-notify.diff
License: X11/MIT
Provides: mesaglut
Obsoletes: mesaglut
@ -116,6 +118,12 @@ if [ "%_lib" != lib ] ; then
fi
popd
%endif
pushd ../glxgears
%patch10 -p1
popd
pushd ../glxinfo
%patch11 -p1
popd
%build
autoreconf -fi
@ -192,6 +200,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/*
%changelog
* Tue Jan 20 2009 mhopf@suse.de
- freeglut-glxgears-notify.diff, freeglut-glxinfo-notify.diff
* Notify user if direct rendering or hardware acceleration
is not available
* Notify user that glxgears is not a benchmark
* Sat Jan 17 2009 sndirsch@suse.de
- freeglut-sig11-bug466806.diff
* fix Sig11 in glutCreateWindow() for GLX drivers < 1.3