Hi Tomasz,
        I need two windows, one window named Mainwindow is for UI part, this is 
developed by QT, it has been proved OK, another window named 3D windows is 
developed by opengles, this 3D windows is initialized by QDialog, opengles can 
use this window to draw.
        
Best Regards,
Jacky NI.
  

-----Original Message-----
From: Tomasz Olszak [mailto:[email protected]] 
Sent: Wednesday, June 18, 2014 6:40 PM
To: Jacky (ZhiJun) Ni
Cc: Manuel Bachmann; [email protected]
Subject: Re: Is there any way could transform the QT window to the struct 
“wl_egl_window”?

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

CONFIDENTIALITY NOTICE: The information contained in this message may be 
privileged and/or confidential. If you are not the intended recipient, or 
responsible for delivering this message to the intended recipient, any review, 
forwarding, dissemination, distribution or copying of this communication or any 
attachment(s) is strictly prohibited. If you have received this message in 
error, please notify the sender immediately, and delete it and all attachments 
from your computer and network.
_______________________________________________
IVI mailing list
[email protected]
https://lists.tizen.org/listinfo/ivi

Reply via email to