解决vtkXOpenGLRenderWindow (0x2a9db90): Could not find a decent visual

系统当前环境描述:64bit Ubuntu 12.04.5, gcc和g++4.6.3, clang+llvm-3.3,Mesa-10.3.5,vtk-5.10.1。


错误详情:

ERROR: In /usr/local/src/VTK5.10.1/Rendering/vtkXOpenGLRenderWindow.cxx, line 404
vtkXOpenGLRenderWindow (0x2a9db90): Could not find a decent visual

ERROR: In /usr/local/src/VTK5.10.1/Rendering/vtkXOpenGLRenderWindow.cxx, line 404
vtkXOpenGLRenderWindow (0x2a9db90): Could not find a decent visual

ERROR: In /usr/local/src/VTK5.10.1/Rendering/vtkXOpenGLRenderWindow.cxx, line 404
vtkXOpenGLRenderWindow (0x2a9db90): Could not find a decent visual

ERROR: In /usr/local/src/VTK5.10.1/Rendering/vtkXOpenGLRenderWindow.cxx, line 609
vtkXOpenGLRenderWindow (0x2a9db90): GLX not found.  Aborting.

Aborted (core dumped)


问题分析:

该问题类似与Qt creator5.0在安装了OpenGL的库们以后打开时报错:Could not initialize GLX Aborted (core dumped)一样。应该是OpenGL和系统驱动兼容问题。


解决方法:

安装bumblebee驱动。步骤:

1)确保系统已安装这些库:mesa-common-dev,libgl1-mesa-dev,libglu1-mesa-dev,libgl1-mesa-dri,libgl1-mesa-glx。没有的,比如缺少libgl1-mesa-glx,就:

sudo apt-get install libgl1-mesa-dri

2)安装bumblebee nvidia驱动。

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia linux-headers-generic

3)重启电脑。可以正常打开了。

你可能感兴趣的:(qt,OpenGL,Creator,VTK)