Difference between revisions of "VTK/OpenGL"
|Line 1:||Line 1:|
= Linux =
= Linux =
==ATI Open GL Driver==
==ATI Open GL Driver==
Latest revision as of 16:50, 11 November 2013
THIS INFORMATION IS OUT OF DATE AND SHOULD NOT BE USED--Burlen 15:50, 11 November 2013 (EST)
- 1 Linux
- 2 Mac OS X
- 3 Mesa, Off Screen Mesa, Mangled Mesa
ATI Open GL Driver
ATI Driver on Debian GNU/Linux
I tested Method1 only --Mathieu 22:53, 17 October 2006 (EDT)
ATI Driver on Fedora 2
Other (untested) How To:
- Fedora 2:
Debugging the ATI libGL
Some env var you should remember:
Documentation for fglrx options
Daniel Leidert wrote a man page at:
- Unofficial bug tracker: http://ati.cchtml.com/
- HOWTO ATI Drivers
nVidia Open GL Driver on Linux
nVidia Driver on Debian GNU/Linux
How to get OpenGL nVidia driver working on a linux debian system.
First thing you need to do is allow non-free packages from your sources.list file.
# Be carefull only for nvidia-kernel-source deb http://ftp.us.debian.org/debian/ stable main non-free contrib
sudo apt-get update sudo apt-get install nvidia-glx-dev nvidia-settings nvidia-xconfig sudo nvidia-xconfig
IMPORTANT: You have to be careful when you read the articles about this process around Internet! Because many of the documents around internet are very old. Since Debian 5.0(Lenny) you don't have to build your own kernel module. Pre-built packages are working perfectly.
CAUTION: A very new flagship graphic card will probably not be supported by the pre-built package. You may try one in experimental or unstable release. You may end up with replacing you card or building it from the scratch. If you build from the scratch, please refer the document to keep your work in Debian way.
nVidia Driver on Ubuntu
The Wiki page is fairly simple just linking to it
Since the debian way seems to be broken http://packages.ubuntu.com/hoary/misc/java-package, here is how to install Java on ubuntu.
Mac OS X
If it happens with an ATI card from the r600 series (2600 XT) or the r500 series (older series) or with an nVidia GeForce 7 series, you probably had called SetStereoWindowCapable(true) on the RenderWindow. This a driver bug, known by Apple. The only workaround is to call SetStereoWindowCapable(false).
Mesa, Off Screen Mesa, Mangled Mesa
- Pure OpenGL
- Pure Mesa (no hardware and it has off screen natively)
- OpenGL + Mangled Mesa (hardware on-screen and software off-screen)
- Enable VTK_OPENGL_HAS_OSMESA
- Set the following values to apropriate locations:
OSMESA_INCLUDE_DIR /.../include OSMESA_LIBRARY /.../lib/libOSMesa.a
OpenGL + Off screen
To do hardware rendering (on screen) and software rendering (off screen) within the same application, you will have to use mangled mesa. Mangled mesa is build using all symbols mangled.
You may want to first look at article How I Mangled Mesa.
Build Mangled Mesa
The following refers to Mesa 6.2.*
Edit apropriate system configuration file. On Linux, for example, if you are building static, edit the file:
Edit the CFLAGS line and add the following at the end of CFLAGS and CXXFLAGS:
Then edit file:
And rename the standard names for the libraries, for example:
# Library names (base name) GL_LIB = MesaGL GLU_LIB = MesaGLU GLUT_LIB = MesaGlut GLW_LIB = MesaGLw OSMESA_LIB = MesaOSMesa
- Disable VTK_OPENGL_HAS_OSMESA
- Make sure OpenGL settings are set to the hardware OpenGL library:
OPENGL_INCLUDE_DIR /usr/include OPENGL_gl_LIBRARY /usr/lib/libGL.so OPENGL_glu_LIBRARY /usr/lib/libGLU.so
- Enable VTK_USE_MANGLED_MESA
- Set mangled mesa options:
MANGLED_MESA_INCLUDE_DIR /.../include MANGLED_MESA_LIBRARY /.../lib/libMesaGL.a MANGLED_OSMESA_INCLUDE_DIR /.../include MANGLED_OSMESA_LIBRARY /.../lib/libMesaOSMesa.a
Use of Mangled Mesa
- For all mangled mesa calls, the vtk*Mesa* classes need to be used. For example, instead of vtkRenderWindow, vtkXMesaRenderWindow must be used. The full list of classes is:
vtkXMesaRenderWindow vtkMesaActor vtkMesaCamera vtkMesaImageActor vtkMesaLight vtkMesaProperty vtkMesaPolyDataMapper vtkMesaRenderer vtkMesaTexture vtkMesaVolumeTextureMapper2D vtkMesaVolumeRayCastMapper vtkMesaRayCastImageDisplayHelper vtkMesaFreeTypeTextMapper vtkMesaImageMapper vtkMesaPolyDataMapper2D
- To make Mangled mesa to be default, do the following at beginning of the program: