GLX missing on display

while i run the code i am getting the following error i am using ubuntu 11.10 and dell inspiron n5110

  
Xlib:  extension "GLX" missing on display ":0.0".  
freeglut (openframeworks): OpenGL GLX extension not supported by display ':0.0'  

please help asap

finally got the solution

  
sudo apt-get purge nvidia*  
sudo apt-get install --reinstall xserver-xorg-video-intel  libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core  
sudo dpkg-reconfigure xserver-xorg  
sudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf  

http://theiszm.wordpress.com/2010/06/27/glx-missing-on-display/#comment-126