1 |
ahmad |
95989 |
This package contains various shell scripts which are intented for use by |
2 |
|
|
3D games packages. These shell scripts can be used to check if direct rendering |
3 |
|
|
is available before launching an OpenGL game. This package is intended for use |
4 |
|
|
by other packages and is not intended for direct end user use! |
5 |
|
|
|
6 |
|
|
|
7 |
daviddavid |
1364259 |
Currently this package contains one utility script: |
8 |
ahmad |
95989 |
opengl-game-wrapper.sh |
9 |
|
|
|
10 |
|
|
To use this script create a link in /usr/bin gamename-wrapper[.sh] to |
11 |
|
|
opengl-game-wrapper.sh, and put gamename-wrapper[.sh] in your desktop file |
12 |
|
|
instead of gamename. The wrapper script will use $0 to determine gamename, |
13 |
|
|
if direct rendering is available the wrapper script will execute gamename |
14 |
|
|
with any parameters passed to the script, if direct rendering is not |
15 |
|
|
available a userfriendly error dialog will be shown explaining that gamename |
16 |
|
|
cannot run without hardware accelerated 3d, and that this is probably due to |
17 |
|
|
missing Free Software support for the users card. |
18 |
|
|
|
19 |
daviddavid |
1364259 |
The utility script uses 2 functions defined in |
20 |
|
|
/usr/share/opengl-games-utils/opengl-game-functions.sh |
21 |
|
|
You can also use these 2 functions directly from your own scripts by |
22 |
|
|
including the above file from your own shell script. |
23 |
ahmad |
95989 |
|
24 |
daviddavid |
1364259 |
The 2 included functions are: |
25 |
ahmad |
95989 |
|
26 |
daviddavid |
1364259 |
hasDri: |
27 |
|
|
This function will return true if hardware accellerated OpenGL is available |
28 |
|
|
and false if it is not. This does not say anything about the OpenGL |
29 |
|
|
capabilities (nor the quality of the driver). |
30 |
ahmad |
95989 |
|
31 |
daviddavid |
1364259 |
checkDriOK: |
32 |
|
|
This functino calls hasDri, if hardware accellerated OpenGL is available |
33 |
|
|
it does nothing, if it is not available it will show an error dialog and |
34 |
|
|
then call exit. This is the function around which opengl-game-wrapper.sh is |
35 |
|
|
build. It is provided as a "library" function so that if your game needs a |
36 |
|
|
wrapper script anyways, you don't need to wrap the wrapper but instead can |
37 |
|
|
call it directly from the wrapper. |
38 |
|
|
|
39 |
|
|
|
40 |
ahmad |
95989 |
Last but not least before I forget, to avoid any licensing issues I hereby |
41 |
|
|
declare that all files in this package are in the Public Domain. |
42 |
|
|
|
43 |
daviddavid |
1364259 |
Hans de Goede 15 September 2011. |