Opencv support opengl

in my opendv code on tx2
namedWindow(“image”, WINDOW_AUTOSIZE|WINDOW_OPENGL);
compile is OK, but running got below error.

open /dev/ttyTHS1 OK
terminate called after throwing an instance of ‘cv::Exception’
what(): OpenCV(4.1.1) /home/nvidia/host/build_opencv/nv_opencv/modules/highgui/src/window_gtk.cpp:1062: error: (-218:No OpenGL support) Library was built without OpenGL support in function ‘cvNamedWindow’

Aborted

can nvidia add the opengl -D WITH_OPENGL=ON in build opencv ?

thanks.

Hi,
You may use the script to rebuild OpenCV.

yeah, thanks for the quick reply.
but I reach the same as you pasted there and re buiild the opencv with opengl support.
but from my test it did not include the NVIDIA optimiized features.

so is that possible to add opengl support in jetpack 4.4 by default ?

Hi,
We may not have plan for this. It is a 3rdparty software framework and needs to go through certain process to enable functions and include it into SDKManager. Since it is open source source code, suggest you download, enable and build it manually.

We have samples in

/usr/src/nvidia/graphics_demos/

If you hit performance issue, please check if you can reproduce it with the samples, and share the steps so that we can do further investigation.