Ask Your Question

Revision history [back]

namedWindow OpenGL exception in Windows 10

I try to output from webcam to OpenGL window. I built OpenCV with WITH_OPENGL flag. In cvconfig.h and in CMakeVars.txt HAVE_OPENGL presents. But every time I have exception. In debug I see error in system.cpp here:

#ifndef HAVE_OPENGL
     if (flags & CV_WINDOW_OPENGL) CV_ERROR( CV_OpenGlNotSupported, "Library was built without OpenGL support" );
#else

This is my code:

cv::namedWindow("raw", CV_WINDOW_OPENGL | CV_WINDOW_AUTOSIZE);