2014-06-18 12:14 GMT+02:00 Jacky (ZhiJun) Ni <[email protected]>: > Thanks again, I’ve solved the issue that GLES will load X11 backend on > tizen-ivi, by recompiling the mesa only with wayland, or “export > EGL_PLATFORM=wayland” without recompiling. > > But the new problem comes, my application crash again, in the application, > all the egl initialize steps finished, like “eglGetDisplay ok, eglInitialize > ok, eglChooseConfig ok, eglCreateContext ok,” but aftet call the > “eglCreateWindowSurface”, my application crashed, analyze the mesa’s egl > codes, I find out that “dri2_wl_create_window_surface” will be called via > eglCreateWindowSurface. The below is two key functions, parameter “window” > and “native_window” is the same one. > > > > API declaration: > > eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType > window, const EGLint *attrib_list) > > dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig > *conf, void *native_window, const EGLint *attrib_list) > > > > My application’s window is based on QT, I normally use QT’s API like > “Mainwindow-> effectiveWinId() “ or “Mainwindow->winId()” to get the WINDOW > for “window”. > > > > But in wayland, I pass the “winId” to the eglCreateWindowSurface again, it > failed, because mesa’s wayland interface need the struct named > “wl_egl_window” for “native_window”, not just an window HWND integer on X11. > > > > struct wl_egl_window { > > struct wl_surface *surface; > > > > int width; > > int height; > > int dx; > > int dy; > > > > int attached_width; > > int attached_height; > > > > void *private; > > void (*resize_callback)(struct wl_egl_window *, void *); > > }; > > > > In the deep codes, native_window will be operated , so if I passed the HWND > integer to “eglCreateWindowSurface”, it will crash! > > > > Is there any way could transform the QT window to the struct > “wl_egl_window”? > > Currently ther is no such API in Qt Wayland. What are you trying to achieve? I plan to provide Qt Wayland compositor API so that you can use Qt features to create wayland compositor. However QWaylandWindow inherits wl_surface if it helps you. Why do you need to create another window surface?
-- regards, Tomasz Olszak Qt for Tizen | http://qt-project.org/wiki/Tizen _______________________________________________ IVI mailing list [email protected] https://lists.tizen.org/listinfo/ivi
