I am trying to use OpenGL on my Ubuntu 12.04 LTS. I installed OpenGL with the following commands:
sudo apt-get install g++ cmake
sudo apt-get install freeglut3 freeglut3-dev
sudo apt-get install binutils-gold
I wrote a simple example in C++ and compiled it with g++ -lGL -lglut main.cpp -o test
and then I tested it using ./test
. A window opened but it was black and I didn't show anything.
So, I installed my nvidia driver using the following commands:
sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nvidia-current
sudo apt-get install nvidia-settings
sudo reboot
And now when I try to run again the program it gives me the 2 errors:
Xlib: extension "GLX" missing on display ":0".
freeglut (./test): OpenGL GLX extension not supported by display ':0'
What could be the problem?
Also, here is the output of the lspci | grep VGA
command:
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 525M] (rev a1)
/var/log/xorg.0.log
to http://paste.ubuntu.com/ and drop a link here? Thanks. – Seth Mar 02 '14 at 18:25lspci | grep VGA
? (please edit it into your question). – Seth Mar 02 '14 at 18:36glxinfo | grep vendor
if it is NVIDIA Corporation you activated the proprietary nvidia driver. – user3793747 Apr 07 '15 at 00:13