Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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)
share|improve this question
    
What graphics card do you have? Can you also paste /var/log/xorg.0.log to paste.ubuntu.com and drop a link here? Thanks. –  Seth Mar 2 at 18:25
    
Nvidia; here is the link paste.ubuntu.com/7023355 –  user1956190 Mar 2 at 18:32
    
What Nvidia? Do you have an Intel card too? What is the output of lspci | grep VGA? (please edit it into your question). –  Seth Mar 2 at 18:36
    
I have edited my question. What could be wrong? –  user1956190 Mar 3 at 11:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.