How to leverage QOpenGLWidget in QT to get sEGLDisplay = eglGetDisplay and sEGLSurface = eglCreateWindowSurface
-
How to leverage QOpenGLWidget in QT to get sEGLDisplay = eglGetDisplay and sEGLSurface = eglCreateWindowSurface?My app uses the following code:
cam->sEGLDisplay = sEGLDisplay; if (win->sEGLImage != EGL_NO_IMAGE_KHR) { /* Notice: need to Destroy EGLImage before next creation, * Otherwise it would cause memory leak issue, as pfneglCreateImageKHR * would allocate buffer each time by itself, not controlled by caller. */ pfneglDestroyImageKHR(win->sEGLDisplay, win->sEGLImage); win->sEGLImage = EGL_NO_IMAGE_KHR; if (psBuffer->sPlanes[0].pvPtr != MAP_FAILED && psBuffer->sPlanes[0].pvPtr != NULL) { munmap(psBuffer->sPlanes[0].pvPtr, psBuffer->sPlanes[0].uiSize); } } ...... avm3d.RenderOnce(); eglSwapBuffers(sEGLDisplay, sEGLSurface);I need to run the UI interface on QT and display the algorithm running results, I tried many methods, but still did not solve the problem.
Originally, I thought that QT and OpenGL would not interfere with each other, but then it turned out that they would conflict, and the number of configs in eglChooseConfig returned to 0, and the surface could not be created