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]
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:
only needed to compile OGL-apps:
in /usr/X11R6/include/ or /usr/include or /usr/local/include:
That should more or less be it. If you have still problems, just ask.
I hope the brought some light into the whole matter…