This commit is contained in:
gferg 2000-11-27 15:00:05 +00:00
parent d9d48a04b0
commit 5573f867fd
1 changed files with 182 additions and 92 deletions

View File

@ -19,8 +19,8 @@
<revhistory>
<revision>
<revnumber>v1.2</revnumber>
<date>Nov 11, 2000</date>
<revnumber>v1.3</revnumber>
<date>Nov 26, 2000</date>
<authorinitials>rbe</authorinitials>
</revision>
</revhistory>
@ -60,7 +60,7 @@
</para>
<para>
<ulink url="http://www.comptechnews.com/~reaster/nvgl.txt">http://www.comptechnews.com/~reaster/nvgl.txt</ulink>
<ulink url="http://www.linuxdoc.org/HOWTO/mini/Nvidia-OpenGL-Configuration-mini-HOWTO/">http://www.linuxdoc.org/HOWTO/mini/Nvidia-OpenGL-Configuration-mini-HOWTO/</ulink>
</para>
</sect2>
@ -145,7 +145,7 @@
</para>
<para>
XFree86 4.0 or later, preferably 4.01 as of this writing, is also required.
XFree86 4.0 or later, preferably 4.0.1 as of this writing, is also required.
Its installation will be covered later.
</para>
@ -207,11 +207,14 @@
</para>
<para>
Mesa 3.3.
Mesa 3.4.
</para>
<para>
MesaLib-3.3.tar.gz
<itemizedlist>
<listitem>MesaLib-3.4.tar.gz</listitem>
<listitem>MesaDemos-3.4.tar.gz</listitem>
</itemizedlist>
</para>
<para>
@ -219,21 +222,35 @@
</para>
<para>
Provides libGLU (GL Utility). GLU is a library built on top of OpenGL
to provide some higher level functions for applications. OpenGL
itself, libGL.so, is considered a low-level library. Many apps make
use of higher level libs like GLU to get work done.
</para>
Mesa provides the foundation for the 3d support included in XFree86, which comes only
with the libGL OpenGL core library component. To enable hardware
accelerated performance, many 3d hardware manufacturers provide a drop-in replacement
for Mesa's standard software-only libGL rendering library. For this document, we
are only interested in NVIDIA's libGL drop-in replacement library.
</para>
<para>
MesaLib provides a software OpenGL implementation consisting of libGL. It also provides libGLU (GL Utility).
libGLU is a library built on top of libGL to provide some higher-level functions for applications.
OpenGL itself, libGL, is considered a low-level library. GLU is a standard part of most OpenGL
installations and many programs make use of it.
</para>
<para>
MesaDemos provides many OpenGL demo programs and, more importantly, the GL Utility Toolkit
(libglut) library. GLUT provides a window system independent interface between OpenGL
and any supported window system. For instance, on the X Window System, it
hides the details of using glX functions to setup a window. Programmers
can write code once and can compile it to work on MS Windows or X, etc
provided that a GLUT library is available on the target platform. Like libGLU, libglut
is a standard part of most OpenGL installations and is required by many programs even though
it is not packaged with XFree86 4.0.1.
</para>
<para>
The main reason to install Mesa when you already have XFree86 4, is to get
libGLU. GLU is a standard part of most OpenGL installations and is expected
to be present by lots of programs.
</para>
<para>
GLUT
</para>
While GLUT is bundled with MesaDemos, it is also available as a separate package from
its original project website:
</para>
<para>
glut-3.7.tar.gz
@ -241,42 +258,27 @@
</para>
<para>
<ulink url="http://reality.sgi.com/mjk/glut3/">http://reality.sgi.com/mjk/glut3/</ulink>
<ulink url="http://reality.sgi.com/mjk/glut3/">http://reality.sgi.com/mjk/glut3/</ulink>
</para>
<para>
Glut provides a window system independent interface between OpenGL
and any supported window system. For instance, on the X Window System, it
hides the details of using glX functions to setup a window. Programmers
can write code once and can compile it to work on MS Windows or X, etc
provided that a GLUT library is available on the target platform.
You may use *either* the GLUT included with MesaDemos (preferred and easier) or the GLUT from its
project website. Don't install both! Its recommended at this time to go with the GLUT
packaged with MesaDemos, but instructions on how to install the other GLUT are still provided
in the next section as an option. Note that MesaDemos does not include the glut manpages, so
you may want to download the project GLUT package just to install its manpages.
</para>
<para>
Like GLU above, GLUT is a standard part of most OpenGL installations.
Many example programs and even some applications, make use of libglut.
For instance, The OpenGL Programming Guide (red book) makes use of Glut
for its example programs.
</para>
<para>
You need to install GLU and GLUT if you want to be able to compile
many of the programs that are freely downloadable as source code.
Some programs may even need them to run if they were linked to them
dynamically.
</para>
<para>
Qt
</para>
<para>
qt-x11-2.1.0.tar.gz or later version
qt-x11-2.2.2.tar.gz or later version
</para>
<para>
<ulink url="http://www.troll.no/">http://www.troll.no/</ulink>
<ulink url="http://www.troll.no/">http://www.troll.no/</ulink>
</para>
<para>
@ -289,29 +291,31 @@
</para>
<para>
Qt has an extension (qt/ententions/opengl) for OpenGL that provides for
Qt has functions (previously as an extension in $QTDIR/extensions/opengl)
for OpenGL that provides for
creating OpenGL rendering contexts in Qt windows. This provides some
alternative to both GLUT and using the glX functions directly plus the
alternative to both GLUT and using the glX functions directly, plus the
added benefit of full access to the excellent qt widgets and
cross-platform portability.
</para>
<para>
This is useful if you want to compile or develop programs based on Qt.
This is useful if you want to compile or develop programs based on Qt
(e.g., KDE2 and its apps).
</para>
<para>
NVIDIA drivers.
NVIDIA drivers (Mesa libGL replacement).
</para>
<itemizedlist>
<listitem><para>NVIDIA_kernel-0.9-4.tar.gz</para></listitem>
<listitem><para>NVIDIA_GLX-0.9-4.xfree401.tar.gz</para></listitem>
<listitem><para>NVIDIA_kernel-0.9-5.tar.gz</para></listitem>
<listitem><para>NVIDIA_GLX-0.9-5.tar.gz</para></listitem>
</itemizedlist>
<para>
As of this writing, version 0.9-5 is also available for XFree86 4.01
if you want to try them.
Note that XFree86 4.0.1, and later, is required with 0.9-5.
If you have XFree86 4.0.0, then you'll have to download the older 0.9-4 version.
</para>
<para>
@ -322,18 +326,19 @@
These make a kernel driver: /lib/modules/2.2.16/video/NVdriver
and libGL.so and libGLcore.so files that go into /usr/lib/ to replace
and Mesa ones that might be in there. libGL.so is OpenGL. These files
are nvidia's own hardware accelerated OpenGL implementation.
are Nvidia's own hardware accelerated OpenGL implementation.
</para>
<para>
XFree86 4.0.1 appears to contain the core of Mesa 3.3, however, it is missing
the libGLU* files which many programs want.
</para>
</sect1>
<sect1 id="instx">
<title>Install XFree86</title>
<para>
Installation of the software packages requires root login, which can be obtained
easily via the superuser/setuser command: "su -" (see, man su).
</para>
<para>
If you have a version of XFree86 installed already, you may want to move it
or delete it:
@ -363,6 +368,7 @@
tar -xvzf doctools-1.2.tar.gz
-- unpack the man pages (actually, glx pages are already present)
cd /usr/src
tar -xvzf mangl.tar.Z
tar -xvzf manglx.tar.Z
tar -xvzf manglu.tar.Z
@ -374,7 +380,7 @@
the rest of the distribution:
<screen>
cd xc/doc/man/GL
cd /usr/src/release/xc/doc/man/GL
Edit the file: Imakefile
SUBDIRS = glx gl glu
</screen>
@ -389,7 +395,7 @@
<screen>
cd /usr/src/release
cd doctools-1.2
cd doctools
make
make install
cd ..
@ -398,9 +404,21 @@
-- before installing, make sure you have moved or deleted prior installation of X
make install
make install.man
-- make symlinks for include files
cd /usr/include
ln -s ../X11R6/include/DPS DPS
ln -s ../X11R6/include/GL GL
ln -s ../X11R6/include/X11 X11
ln -s ../X11R6/include/bitmaps bitmaps
</screen>
</para>
<para>
Add /usr/X11R6/lib to your /etc/ld.so.conf file, then run "ldconfig" to update
/etc/ld.so.cache so the libraries will be visible.
</para>
<para>
When X is up and running (later), try using the xman program to see that the gl,glx,glu
and glut man pages are in section 3.
@ -411,7 +429,13 @@
<title>Install Mesa</title>
<para>
Note: This gives you the libGLU* files that are missing in XFree86.
Note: This gives you the libGLU* and libglut* files that are missing in XFree86.
XFree86 only comes with the OpenGL core library, libGL (based on Mesa). This
also installs Mesa's libGL, but we will delete that since it is to be replaced
by the Nvidia libGL.
</para>
<para>
To completely uninstall any Mesa libs that may have come with Slackware:
<screen>
@ -422,31 +446,37 @@
normally either under /usr or /usr/local. The example below assumes that
Mesa is installed (or going to get installed) under /usr. Installing
over an old version is probably harmless. Look for /usr/lib/libMesa*
or /usr/local/lib/libMesa*
or /usr/local/lib/libMesa* and delete them unless you have programs that
need them.
</para>
<para>
<screen>
-- unpack the Glut-3.7 packages ...
-- IF you are going to use the project GLUT distribution of GLUT, then
-- unpack the Glut-3.7 packages ...
-- Mesa's compile looks for it
cd /usr/src
tar -xvzf glut-3.7.tar.gz
tar -xvzf glut_data-3.7.tar.gz
-- IF you are using this GLUT, use the --with-glut=/usr/src/glut-3.7
-- parameter with Mesa's ./configure below in addition to the --prefix
cd /usr/src
tar -xvzf MesaLib-3.3.tar.gz
cd Mesa-3.3
./configure --prefix=/usr --with-glut=/usr/src/glut-3.7
tar -xvzf MesaLib-3.4.tar.gz
tar -xvzf MesaDemos-3.4.tar.gz
cd Mesa-3.4
./configure --prefix=/usr
make
make install
ldconfig
</screen>
</para>
<para>
At this point, Mesa installed its own version of the glx.h include
files over the ones that XFree86 installed. This will cause some
programs fail to compile and is corrected by copying the XFree86 GL include
programs to fail to compile and is corrected by copying the XFree86 GL include
files from the X source back to your system:
<screen>
@ -462,7 +492,7 @@
<para>
<screen>
-- delete the libGL.* files that come with XFree86 / Mesa 3.3
-- delete the libGL.* files that come with XFree86 / Mesa 3.4 ...
-- the nvidia libGL.* should replace them
cd /usr/X11R6/lib
rm libGL.*
@ -473,13 +503,14 @@
rm libGL.*
cd /usr/src
tar -xvzf NVIDIA_kernel-0.9-4.tar.gz
tar -xvzf NVIDIA_GLX-0.9-4.xfree401.tar.gz
cd NVIDIA_kernel-0.9-4
tar -xvzf NVIDIA_kernel-0.9-5.tar.gz
tar -xvzf NVIDIA_GLX-0.9-5.tar.gz
cd NVIDIA_kernel-0.9-5
make
cd ..
cd NVIDIA_GLX-0.9-4.1
cd NVIDIA_GLX-0.9-5
make
ldconfig
cd
-- make a basic X config file
xf86config
@ -488,12 +519,15 @@
You must edit XF86Config and set the following:
vi XF86Config
Load "dri"
driver "nvidia"
"1600x1200" (or your preferred screen resolution)
copy ttf fonts from Windows into a font directory and add a font path
replace 'driver "nv"' with 'driver "nvidia"'
"1600x1200" first (or your preferred screen resolution)
Copy ttf fonts from Windows into a font directory and add a font path.
Use ttmkfdir (check freshmeat.net) to a fonts.dir file.
-- note /usr/include/GL should be a symlink to /usr/X11R6/include/GL
-- you may like to edit /etc/X11/xinit/xinitrc to have it "startkde"
-- or "gnome-session" instead of twm.
-- note, /usr/include/GL should be a symlink to /usr/X11R6/include/GL
</screen>
</para>
@ -505,12 +539,17 @@
insmod NVdriver
</screen>
You can place this command in one of the system startup files, like
/etc/rc.d/rc.modules. But this may not be necessary if the following
line is present in /etc/modules.conf:
<screen>
alias char-major-195 NVdriver
</screen>
If this line is present, NVdriver is loaded automatically when X is started (autoclean).
You can check if its loaded using the command, lsmod.
</para>
<para>
You can place this command in one of the system startup files, like
/etc/rc.d/rc.modules
</para>
</sect1>
<sect1 id="instqt">
@ -519,51 +558,83 @@
<para>
<screen>
-- for Qt, there is no "make install", just place the source
-- where you want it to live:
cd /usr/local
tar -xvzf qt-x11-2.1.0.tar.gz
mv qt-2.1.0 qt
tar -xvzf qt-x11-2.2.2.tar.gz
ls -s qt-2.2.2 qt
cd qt
</screen>
</para>
<para>
Check qt/configs/linux-g++-shared and make sure no Mesa references are in there,
like -lMesaGL -lMesaGLU should be -lGL -lGLU. Read the INSTALL file about
environment variables to setup.
Read the INSTALL file about environment variables to setup before you try to
build Qt. You can add the following to /etc/profile:
<screen>
QTDIR=/usr/local/qt
PATH=$PATH:$QTDIR/bin
MANPATH=$MANPATH:$QTDIR/man
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QTDIR/lib
export QTDIR PATH MANPATH LD_LIBRARY_PATH
</screen>
LD_LIBRARY_PATH is optional if you include an entry in /etc/ld.so.conf for
the library path: /usr/local/qt/lib, then run "ldconfig" to update
/etc/ld.so.cache.
</para>
<para>
<screen>
-- note: configure has some options you can try, to see them
-- see ./configure --help
./configure
-- NOTE: when you run make as suggested on the next line, you may
-- encounter a make error that halts the build IF you run make
-- from outside X. The program $QTDIR/bin/uic (the User Interface Compiler)
-- may Segmentation Fault when run from a Linux console. You can run
-- "startx" and use the twm (tiny window manager) and xterm (or whatever you
-- might have setup for X) to run the rest of the Qt build. If for some
-- reason twm is not even available, then you can run "XFree86 &", use
-- "CTRL-ALT-F1" to get to a console, start an xterm as
-- "xterm -display localhost:0.0 &", then switch back to X with "ALT-F7".
make
-- Only for old versions of Qt before 2.1.0 or so ...
-- compile the opengl extension
-- Note that in qt 2.2.0, the OpenGL support has been moved out of extensions
-- Note that in qt 2.2.0 on, the OpenGL support has been moved out of extensions
-- and is now a standard part of the library that is installed if configure
-- finds OpenGL installed on your system. If you were to not want OpenGL
-- support in Qt, you'd have to pass the -no-opengl option to configure.
cd extensions/opengl/src
Check the Makefile and ensure there are not Mesa references.
-- Check the Makefile and ensure there are not Mesa references.
make
ldconfig
cd ../examples
Try compiling and running the examples.
ldconfig
cd ../examples
-- Try compiling and running the examples.
</screen>
</para>
</sect1>
<sect1 id="instglut">
<title>Install GLUT</title>
<title>Install GLUT 3.7 Distribution (optional)</title>
<para>
If you installed the MesaDemos package along the Mesa 3.4, then you
have already installed GLUT 3.7 since it is included with MesaDemos.
However, you may be interested in installing the GLUT manpages and you
can skip right to the "Install GLUT manual pages", below ...
</para>
<para>
Installing GLUT is a bit tricky. I'm not too familiar with imake, the
program that it uses to manage the Makefiles, and didn't quite see how to
get GLUT to install to where I wanted it (/usr/lib). It can be done
manually anyhow:
get GLUT to install to where I wanted it (/usr/lib, but MesaDemos will do this
without any trouble though). It can be done manually anyhow:
</para>
<para>
@ -619,6 +690,8 @@
ln -s libmui.so.3.7 libmui.so
ln -s libmui.so.3.7 libmui.so.3
cp -d libmui.* /usr/lib
-- Install the GLUT manual pages (not included with MesaDemos)
cd /usr/src/glut-3.7
make SUBDIRS=man Makefile
cd man/glut
@ -646,5 +719,22 @@
OpenGL system for running and developing OpenGL apps.
</para>
<para>
You can try building the demos in /usr/src/Mesa-3.4/{demos, xdemos} by using the
Makefile.X11 as Makefile and running "make targets" or "make teapot" etc. They
should build and link with the hardware accelerated libGL and run very fast!
Qt has a OpenGL example in $QTDIR/examples/gear, that you should be able to run
as simply as "make;./gear".
</para>
<para>
Just about any standard GL/GLX/GLU/glut app should run fine, such as WolfGL, GLQuake,
glqwcl.glx (GLQuakeWorld), quake2, and of course ... quake3!!!
</para>
<para>
HAVE FUN!
</para>
</sect1>
</article>