/[packages]/cauldron/opengl-games-utils/current/SOURCES/opengl-game-functions.sh
ViewVC logotype

Annotation of /cauldron/opengl-games-utils/current/SOURCES/opengl-game-functions.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1364259 - (hide annotations) (download) (as text)
Fri Feb 8 13:56:00 2019 UTC (5 years, 2 months ago) by daviddavid
File MIME type: application/x-sh
File size: 804 byte(s)
- new version: 0.2 (sync with fedora)

1 daviddavid 1364259 # check if DRI is available, true if it is, false otherwise
2    
3     function hasDri ()
4     {
5     if [ "`glxinfo | grep "direct rendering: " | head -n 1 | cut -d " " -f 3`" != Yes ] ||
6     glxinfo | grep -qE "OpenGL renderer string: Software Rasterizer|OpenGL renderer string: Gallium .* on llvmpipe"; then
7     return 1
8     else
9     return 0
10     fi
11     }
12    
13 ahmad 95989 # check if DRI is available, show an error and exit if it isn't
14 daviddavid 1364259
15 ahmad 95989 function checkDriOK ()
16     {
17 daviddavid 1364259 if ! hasDri; then
18 ahmad 95989 zenity --error --text="Your system currently is not capable of hardware \
19     accelerated 3D. Therefore $1 cannot run.
20    
21     Usually the cause of this error is that there are no Free Software drivers \
22     for your graphics card, please contact your graphics card manufacturer and \
23     kindly ask them to provide Free Software support for your card."
24     exit 1;
25     fi
26     }

Properties

Name Value
svn:eol-style native
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.30