From d2762e7f36ab16d52a8f5bd8b0a25160131c4ca16d3a0301e8caa9bf74b255fa Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 22 Jan 2009 12:09:44 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/freeglut?expand=0&rev=8 --- freeglut-glxgears-notify.diff | 26 ++++++++++++++++++++++++++ freeglut-glxinfo-notify.diff | 24 ++++++++++++++++++++++++ freeglut.changes | 8 ++++++++ freeglut.spec | 15 ++++++++++++++- 4 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 freeglut-glxgears-notify.diff create mode 100644 freeglut-glxinfo-notify.diff diff --git a/freeglut-glxgears-notify.diff b/freeglut-glxgears-notify.diff new file mode 100644 index 0000000..56bf324 --- /dev/null +++ b/freeglut-glxgears-notify.diff @@ -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 + #include +@@ -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 diff --git a/freeglut-glxinfo-notify.diff b/freeglut-glxinfo-notify.diff new file mode 100644 index 0000000..fadcf95 --- /dev/null +++ b/freeglut-glxinfo-notify.diff @@ -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 + #include + #include +@@ -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); + } diff --git a/freeglut.changes b/freeglut.changes index 080d6c9..486e2ba 100644 --- a/freeglut.changes +++ b/freeglut.changes @@ -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 diff --git a/freeglut.spec b/freeglut.spec index be2328d..9bd1fcc 100644 --- a/freeglut.spec +++ b/freeglut.spec @@ -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