2014-08-07 9:13 GMT+02:00 Steve (YiLiang) Zhou <[email protected]>:
> Dear all,
>
> My tizen ivi image is: tizen_20140422.1_ivi-release-mbr-i586-sdb.raw.bz2
>
> I have app which was developed by qt4, and we want to port it to tizen ivi
> wayland platform, so I have to update our app to qt5.
>
> We have a feature : drawing something based on egl on a qt window(we use
> QDialog).
>
> Egl need a EGLSurface and a EGLDisplay to get the feature work.
>
> EGLSurface *eglCreateWindowSurface*(
>
> EGLDisplay *display*,
>
>
>
> EGLConfig *config*,
>
>
>
> NativeWindowType *native_window*,
>
>
>
> EGLint const * *attrib_list*);
>
> In x11 based OS like ubuntu 12.04 , we use EGL_DEFAULT_DISPLAY to get
> display, the qt window’s winId() to cast to NativeWindowType
>
> It works well on X11 based OS.
>
> But when it comes to wayland ,it will crash at *eglCreateWindowSurface, *I
> googled a lot ,but rarely got something useful.
>
> Someone said that to get *eglCreateWindowSurface *work on wayland ,the
> native_window has to be a wl_egl_window type.
>
> I tried to get it like bellow:
>
>
>
> *QDialog *dialog = new QDialog(mainW);*
>
> *dialog->setGeometry(QRect(0, 0, 720, 430));*
>
> *dialog->show();*
>
>
>
> *QPlatformNativeInterface *native =*
>
> * QGuiApplication::platformNativeInterface();*
>
> * struct wl_display *wl_dpy = (struct wl_display *)*
>
> * native->nativeResourceForWindow("display", NULL);*
>
> * struct wl_surface *surface = static_cast<struct wl_surface *>(*
>
> * native->nativeResourceForWindow("surface",
> dialog->windowHandle()));*
>
> *struct wl_egl_window * wl_wind = wl_egl_window_create(surface, 720,430 );*
>
>
>
> use the wl_wind and wl_dpy to eglCreateWindowSurface , the app didn’t
> crash ,but the graphics we want to draw on the window can’t be seen.
>
>
>
> Is there someone met this before? Can somebody give some advices?
>
>
>
Hi,
I think the best would be to ask on Qt interest[1] mailing list.
I'm sure that they help you with correct solution or workaround. In fact it
is not Tizen specific.
[1] http://lists.qt-project.org/mailman/listinfo/interest
--
regards,
Tomasz Olszak
Qt for Tizen | http://qt-project.org/wiki/Tizen
_______________________________________________
IVI mailing list
[email protected]
https://lists.tizen.org/listinfo/ivi