Originally Posted by AaronP
There's your problem. Like I said, Mesa is buggy, and will prevent your OpenGL applications from working correctly when used with the NVIDIA driver. Please contact your Linux distribution to find out why it's picking up libGL.so.1 from the non-standard /usr/lib/mesa directory instead of the standard /usr/lib.
I think this is due to I want to compile other software which require freeglut-dev package. And this automatic installed the dependency libglu-dev.
Anyway, I removed /usr/lib/mesa from LD_LIBRARY_PATH and everything works well. Thanks for your help.