Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to leverage QOpenGLWidget in QT to get sEGLDisplay = eglGetDisplay and sEGLSurface = eglCreateWindowSurface
Forum Updated to NodeBB v4.3 + New Features

How to leverage QOpenGLWidget in QT to get sEGLDisplay = eglGetDisplay and sEGLSurface = eglCreateWindowSurface

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 231 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pqfeng
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved