OpenGL Support with OpenCV-3.0

I built the Opencv-3 with OpenGL support but I received an error when I execute a basic program: No OpenGL support (Library was built without OpenGL support) in cvNamedWindow, file /home/usr/kinect/