Statistics
| Revision:

gvsig-3d / 1.10 / trunk / binaries / linux / 3D / detect_videodriver.sh @ 110

History | View | Annotate | Download (595 Bytes)

1
archname=$(uname -m);
2

    
3
echo "Detecting video driver...";
4
for dri in `glxinfo | grep rendering | awk '{ print $3 }'`
5
do
6
if [ "$dri" = "Yes" ]; then
7
echo "DRI active"
8
else 
9
echo "DRI OFF 3D Extension could not work!!"
10
break
11
fi 
12

    
13
done
14
for driver in `glxinfo | grep renderer | awk '{ print $4 }'`
15
do
16
echo "You are using driver" $driver;
17
if [ "$driver" = "Mesa" ]; then
18
	pathtoGL=$(find /usr/lib/mesa -type f -name libGL.*);
19
        if  [ "$pathtoGL" = "" ]; then
20
                pathtoGL=$(find /usr/lib/ -type f -name libGL.*);
21
        fi
22
        export LD_PRELOAD=$LD_PRELOAD:$pathtoGL;
23
fi 
24
done
25