PDA

View Full Version : More opengl woes



PrincePhil
11-04-2000, 06:41 PM
If you want to know what driver you're running for sure, check you're XFree86.0.log file, probably somewhere in /var/log. Look for a reference to nvidia_drv.o. But chances are if you just replaced the 'nv' in the driver potion of your XF86Config file with 'nvidia' you've got to be running nvidia's driver, since if something was amiss you'd just crash the X server (as far as I know X has no way to recover from a bad driver).

As for getting opengl to work, I've had no luck. I'm not exactly sure what I would need to relink after I blow out the Mesa links. How exactly is opengl organised under X? Is there a standard with standard files I need in standard places to get things to work? Does the nvidia driver (the kernel and GLX packages) provide _everything_ I need to run opengl apps of any sort? What is the framework for opengl under linux (or does such a framework even exits)? How exactly does opengl work under Linux and X? What does the glx module provide, and what does it need to provide that? Is glx the only module I need to load. In short I'm really confused about the whole structure of opengl in linux and what needs to be where and why.

miq
11-05-2000, 11:17 AM
Originally posted by PrincePhil:
As for getting opengl to work, I've had no luck. I'm not exactly sure what I would need to relink after I blow out the Mesa links. How exactly is opengl organised under X? Is there a standard with standard files I need in standard places to get things to work? Does the nvidia driver (the kernel and GLX packages) provide _everything_ I need to run opengl apps of any sort? What is the framework for opengl under linux (or does such a framework even exits)? How exactly does opengl work under Linux and X? What does the glx module provide, and what does it need to provide that? Is glx the only module I need to load. In short I'm really confused about the whole structure of opengl in linux and what needs to be where and why. [/B]

Hi,

I do not have a complete answer to your question but I managed to get OpenGL running accelerated on my System.
The nvidia drivers contains only the following:
- nvidia driver-module for the xserver
- nvidia glx-module to provide the interface between X and OpenGL
- the Kernelmodule needed for direct hardware access (has to be recompiled whenever you change the kernel)
- the OpenGL libraries libGL.so and libGLcore

This is often enough to run OGL-apps. Some need libGLU.so and libGLUT too. These are included in mesa for example.
To compile OGL-apps, you also need the header-files. These are either part of XFree or Mesa or perhaps another source.

To get a correct installation of OGL with the nvidia-drivers under linux you need to do the following:

-install mesa+mesa-dev (if you use packages), else compile mesa and do a "make install".
-remove/rename the stuff from XFree and Mesa that is not needed: the libGL.so, libGLcore.so (eventually called libMesaGL.so and libMesaGLcore.so) somewhere under /usr/X11R6/lib and/or /usr/lib/ or /usr/local/lib. It is important that you not only remove the links to the actual libraries but that you change their names so that ldconfig does not create the links again.
-then install the 2 packages from nvidia for the Xfree/glx driver and libs and the kernel module.
-then change the /etc/X11/XF86config to load the glx module and the "nvidia" driver (instead of "nv")

After all that, you should have hardware accelerated OpenGL....
Many people say that it is enough to delete/change the symlinks to the nvidia libraries but I cannot confirm this, since ldconfig updates the links to the newest installed library-version (so libGL.so points to libGL.so.1.2.xxx (the mesa-libGL) for example instead of libGL.so.1.0.5 (nvidia 0.95 lib)). This all can easily become a mess. So it is best to rename/remove the existing libGL* from every relevant directory.

The standard location of the relevant files would be something like this:
/usr/lib/libGL.so.*
/usr/lib/libGLcore.so*
/usr/X11R6/modules/drivers/nvidia_drv.o
/usr/X11R6/modules/extensions/libglx.so*
only needed to compile OGL-apps:
in /usr/X11R6/include/ or /usr/include or /usr/local/include:
GL/glx.h
GL/gl.h
GL/glext.h
GL/glxtokens.h
GL/glu.h
GL/glut.h
...

That should more or less be it. If you have still problems, just ask.

I hope the brought some light into the whole matter...

bxe Miq

PrincePhil
11-05-2000, 02:49 PM
Wow, thanks http://www.opengl.org/discussion_boards/ubb/smile.gif..