PDA

View Full Version : opengl installation



jyoti
07-01-2009, 04:54 AM
Hi

I am new to opengl.I need to install opengl on linux but I am not getting how to do it.I tried running 2 drivers from nvidia.com
but nothing happened.
Pls can someone tell me how to install opengl.I know that this must
be the dumbest question on this forum.
I am getting confused with mesa drivers and those by nvidia.
can sumone tell me a step by step procedure for installation?
Also tell about which additional libraries need to be installed like GLUT.


Thanx a lot in advance.pls reply asap.

Dark Photon
07-01-2009, 06:22 AM
I am new to opengl. I need to install opengl on linux but I am not getting how to do it. I tried running 2 drivers from nvidia.com but nothing happened.
Well I can tell you on OpenSuSE (http://www.opensuse.org), it's trivial. Just a few GUI clicks. You just do an online update, add the NVidia software repository, select the NVidia drivers on the Software Manager, and let it install. If you want more detail, let me know.

To verify you have them installed and working correctly, run:
> glxinfo | grep vendor
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation

and you should see output like the above.

On other distros (or on SuSE if you want to run the absolute latest and greatest drivers or flip drivers versions alot), you do something like this:

- Install kernel-source package (one time setup)
- Download NVidia drivers for your platform
- Kill X
- sh NVIDIA*.run <-- Starts the NVidia driver installer
- Answer the prompts
- Restart X

Nothing distro-centric specific here, except for the procedure used to kill X (and any X login manager you might use) and restart X. On SuSE, you use "init 3" and "init 5", respectively. Probably a bunch of ways to do this, but I'm not afraid of the command-line and it works.


I am getting confused with mesa drivers and those by nvidia. can sumone tell me a step by step procedure for installation?
Mesa provides GL if you don't have H/W accel drivers installed. So install Mesa (usually installed by default), but then when you install the NVidia drivers it'll drop its files on top of it where necessary. It'll also update your X configuration file (/etc/X11/xorg.conf) automagically.

Mesa also provides the GLU library, which you'll probably want.


Also tell about which additional libraries need to be installed like GLUT.
You don't need glut, but you can install it if you want to dev or run GLUT-based programs.

The main OpenGL libs you probably care about:

libGL.so - Core OpenGL (gl... functions)
libGLU.so - OpenGL Utilities lib (glu... functions)
libglut.so - GLUT Toolkit (glut... functions)

They are provided by:

libGLU.so - Mesa/NVidia drivers
libGLU.so - Mesa
libglut.so - Freeglut