gvsig-3d / 1.10 / trunk / binaries / linux / 3D / detect_videodriver.sh @ 24
History | View | Annotate | Download (560 Bytes)
1 |
echo "Detecting video driver..."; |
---|---|
2 |
for dri in `glxinfo | grep rendering | awk '{ print $3 }'` |
3 |
do |
4 |
if [ "$dri" = "Yes" ]; then |
5 |
echo "DRI active" |
6 |
else |
7 |
echo "DRI OFF 3D Extension could not work!!" |
8 |
break |
9 |
fi |
10 |
|
11 |
done |
12 |
for driver in `glxinfo | grep renderer | awk '{ print $4 }'` |
13 |
do |
14 |
echo "You are using driver" $driver; |
15 |
if [ "$driver" = "Mesa" ]; then |
16 |
pathtoGL=$(find /usr/lib/mesa -type f -name libGL.*); |
17 |
if [ "$pathtoGL" = "" ]; then |
18 |
pathtoGL=$(find /usr/lib/ -type f -name libGL.*); |
19 |
fi |
20 |
export LD_PRELOAD=$pathtoGL; |
21 |
fi |
22 |
done |
23 |
|