2014-08-08 11:25 GMT+03:00 Steve (YiLiang) Zhou <sz...@telecomsys.com>: > Thanks Giulio, > Our app has an render thread which use opengl api to draw something like map > on eglsurface. > So I was thinking about to use a QGLWidget to render it , just call > glwidget->makeCurrent() when the render thread ready to draw a frame. > I don't need to embed a QGLWidget to another waylandwindow, just new a > QGLWidget which is a child of our app mainwindow(qt mainwindow). > I tried to do it ,but got errors like this: "Cannot make QOpenGLContext > current in a different thread" and crash . > Is my solution theoretically make sense?
If you don't need to embed it it's probably better to use a QWindow with a QOpenGLContext instead of QGLWidget. It requires a bit more of boilerplate code but it gives you more freedom to do exactly what you want. > > Thanks and Best Regards > Steve Zhou > > > -----Original Message----- > From: Giulio Camuffo [mailto:giuliocamu...@gmail.com] > Sent: Friday, August 08, 2014 2:54 PM > To: Steve (YiLiang) Zhou > Cc: Filip Piechocki; interest@qt-project.org > Subject: Re: [Interest] Help!! app qt4 upgrade to qt5 for wayland on tizen > ivi, can't get the QDialog's window handle which can cast to > EGLNativeWindowType > > 2014-08-08 7:52 GMT+03:00 Steve (YiLiang) Zhou <sz...@telecomsys.com>: >> Hi Filip, >> >> I got what you mean, so if I use QGLWidget to get the wl_suface and >> createeglwindow , it can work theoretically ,right? > > You're not supposed to get the wl_surface or anything like that, QGLWidgets > abstracts it away. > Anyway, this is kinda a moot discussion because currently you can't embed a > QGLWidget in another window on wayland, the qpa plugin lacks support for it, > and then the compositor may too (Weston is fine but QtCompositor wouldn't > support it yet). > > So you're out of luck, if you want it working now. Maybe if you say exactly > what you want to achieve on a high level we can find another way to do it. > > -- > Giulio > > >> >> >> >> Thanks and Best Regards >> >> Steve Zhou >> >> >> >> From: Filip Piechocki [mailto:fpiecho...@gmail.com] >> Sent: Friday, August 08, 2014 12:40 PM >> To: Steve (YiLiang) Zhou >> Cc: interest@qt-project.org Interest >> >> >> Subject: Re: [Interest] Help!! app qt4 upgrade to qt5 for wayland on >> tizen ivi, can't get the QDialog's window handle which can cast to >> EGLNativeWindowType >> >> >> >> Hi, >> As Giulio wrote, it is not clear what you want to achieve. If you want >> to draw with OpenGL on a Qt widget, there is a QGLWidget which is >> supposed for that (or its actual replacement - QOpenGLWidget, but it >> will be introduced in 5.4 if I'm not wrong here, you can try the >> latest snapshot). QDialog is not supposed for that. >> >> BR, >> Filip >> >> On Aug 8, 2014 3:57 AM, "Steve (YiLiang) Zhou" <sz...@telecomsys.com> wrote: >> >> Hi Thiago, >> Thanks for your reply, Giulio did give me some advices to try , but >> I'm not so familiar with qt and wayland ,so I post the help request >> here too. >> Can you or Giulio give me some sample codes so that I can get this work? >> Anyway thank you guys very much for your replys. >> >> >> >> Thanks and Best Regards >> Steve Zhou >> >> -----Original Message----- >> From: Thiago Macieira [mailto:thiago.macie...@intel.com] >> Sent: Thursday, August 07, 2014 10:19 PM >> To: interest@qt-project.org >> Cc: Steve (YiLiang) Zhou >> Subject: Re: [Interest] Help!! app qt4 upgrade to qt5 for wayland on >> tizen ivi, can't get the QDialog's window handle which can cast to >> EGLNativeWindowType >> >> On Thursday 07 August 2014 15:51:31 Steve Zhou wrote: >>> Dear all, >> >> Hi Steve >> >> Didn't Giulio reply to you on this very subject on the wayland mailing >> list? >> Giulio is Qt Wayland's co-maintainer, so his answer there is the best >> you're going to get. >> >> Is there anything new? >> -- >> Thiago Macieira - thiago.macieira (AT) intel.com >> Software Architect - Intel Open Source Technology Center >> >> >> 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. >> _______________________________________________ >> Interest mailing list >> Interest@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest >> >> 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. >> >> >> _______________________________________________ >> Interest mailing list >> Interest@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest >> > > 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. _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest