Size: 1792
Comment:
|
Size: 1720
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 8: | Line 8: |
The /usr/!X11R6/lib/libGL* libraries are symbolic links to the hardware-specific libraries. There is a mechanism in the starup process of each client workstation which detects the accurate OpenGL library based on the information about the graphics card and the kernel driver. | The /usr/lib/libGL* libraries are symbolic links to the hardware-specific libraries. There is a mechanism in the starup process of each client workstation which detects the accurate OpenGL library based on the information about the graphics card and the kernel driver. |
Line 13: | Line 13: |
1. For compatibility reasons, the default OpenGL headers (from the MESA package) are saved in their default location, i.e. /usr/X11R6/include/GL which points to the same directory as /usr/include/GL. | 1. For compatibility reasons, the default OpenGL headers (from the MESA package) are saved in their default location, /usr/include/GL. |
OpenGL
Compiling OpenGL applications on Debian Linux
The Debian platform managed by the ISG.EE has a new directory layout for the OpenGL libraries and headers:
Libraries:
The /usr/lib/libGL* libraries are symbolic links to the hardware-specific libraries. There is a mechanism in the starup process of each client workstation which detects the accurate OpenGL library based on the information about the graphics card and the kernel driver.
Header Files:
1. For compatibility reasons, the default OpenGL headers (from the MESA package) are saved in their default location, /usr/include/GL. 2. The extended OpenGL header files from Nvidia are stored in /usr/lib/nvidia/include/GL which have to be included in the compile path in order to use the extended Nvidia functions.
Compiling sources and linking against the NVidia libraries:
add to CFLAGS / CPPFLAGS / CXXFLAGS `-I/usr/lib/nvidia/include/GL` add to LDFLAGS `` `-L/usr/lib/nvidia/lib` ` -Wl,-rpath -Wl,/usr/lib/nvidia/lib`
Remarks:
If you are using the libGLU you will get the following linker warning: `/usr/bin/ld: warning: libstdc++.so.5, needed by /usr/bin/../lib/libGLU.so, may conflict with libstdc++.so.6` This shouldn't affect your programs (the libGLU was linked against the old C++ standard library and most of the installed gnu compilers will link against the newer library). If you have problems linking against `libGL.so` from `/usr/lib` it is possible to access symbols directly from the NVidia opengl library in `/usr/lib/nvidia/lib`: remove `-L/usr/lib` and add instead `-L/usr/lib/nvidia/lib -lGL` to your `LDFLAGS` environment/ make variable.