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 |
|
|
} |