Unsolved QT WebAssembly : get EGLContext from QApplication
-
Hi.
I'm currently developping a WebAssembly application with QML and i want to get the EGLContext from it.
I've tried several ways to recover it :eglGetCurrentContext() //Returns EGL_NO_CONTEXT QOpenGLContext* openglcontext = QOpenGLContext::currentContext(); QEGLNativeContext nctx = qvariant_cast<QEGLNativeContext>(openglcontext->nativeHandle()); EGLContext ctx = nctx.context(); //Returns ctx == EGL_NO_CONTEXT
I'm using QT 5.15.2 and tried both binaries and sources recompilated. I'm sure EGL and OpenGL ES 2.0 (i need this one) are activated.
EGLDisplay display = eglGetDisplay (EGL_DEFAULT_DISPLAY); eglQueryString((EGLDisplay )display, EGL_VERSION); //1.4 Emscripten EGL eglQueryString((EGLDisplay )display, EGL_VENDOR); //Emscripten if(openglcontext->openGLModuleType()== QOpenGLContext::OpenGLModuleType::LibGLES) //true
I use a QQuickItem to be sure the context has been initialized with connect &QQuickWindow::beforeRendering().
My version of emscripten is 1.39.8 (embedded) and i use Chrome to display the application.Thanks for your help,
best regards