Re: [eq-dev] problem when integrate into QT

26 views
Skip to first unread message

m0bl0

unread,
Nov 28, 2009, 10:39:25 AM11/28/09
to eq-...@equalizergraphics.com

Aren wrote:
>
> I want equalizer render in this QGLwidget(there's only one window in my
> config file), so I simply send it's HWND to equalizer without create a new
> WGLWindow in configInitWGLWindow(). It can render,but when I click or move
> the window or do some event, it's just stucked. I thought it's thread
> problem, so I change it to render in a separate thread. This time, it's ok
> when click or move window, but the render window can't react like eqPly's
> event handler, and when resizing window, it's just broken.
> what do I miss?How to deal with event handling?
>

Your event handling problems occur because Qt uses its own event dispatch,
so Eq doesn't receive any events from Windows. I don't think you can disable
this behavior in Qt, so the only option is to manually forward events from
Qt to Eq. You might want to have a look at
http://eqqt.sourceforge.net/
(svn at https://eqqt.svn.sourceforge.net/svnroot/eqqt/trunk),
which is my attempt at an Eq-Qt integration. It contains a "hello world"
example application.

HTH,
Marc
--
View this message in context: http://n2.nabble.com/problem-when-integrate-into-QT-tp4078219p4079765.html
Sent from the Equalizer - Parallel Rendering mailing list archive at Nabble.com.

_______________________________________________
eq-dev mailing list
eq-...@equalizergraphics.com
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com

Stefan Eilemann

unread,
Nov 30, 2009, 3:16:58 AM11/30/09
to Equalizer Developer List
Aren, Marc,

Robert Hauck (Bcc'ed to this email) is working on a Qt/Eq Hello-World example, based on Marc's work. This one will use one mainloop (from Qt). Hopefully this example will be done by the end of the year.


Cheers,

Stefan.

--
http://www.eyescale.ch
http://www.equalizergraphics.com
http://www.linkedin.com/in/eilemann

Aren

unread,
Dec 9, 2009, 10:08:16 PM12/9/09
to eq-...@equalizergraphics.com


m0bl0 wrote:
>
>
> Your event handling problems occur because Qt uses its own event dispatch,
> so Eq doesn't receive any events from Windows. I don't think you can
> disable this behavior in Qt, so the only option is to manually forward
> events from Qt to Eq. You might want to have a look at
> http://eqqt.sourceforge.net/
> (svn at https://eqqt.svn.sourceforge.net/svnroot/eqqt/trunk),
> which is my attempt at an Eq-Qt integration. It contains a "hello world"
> example application.
>
> HTH,
> Marc
>

Hi, m0bl0
Thanks for your Eq-QT example, now I've integrated eqPly example into QT,
but there's a small problem:
when it draws font, it crashed. By follow in, it seems occur in
BitmapFont::_initWGL(),
here's the code:


> const OSWindow* osWindow = window->getOSWindow();
> const WGLWindowIF* wglWindow = dynamic_cast< const WGLWindowIF*
> >(osWindow);
> if( !wglWindow )
> {
> EQWARN << "Window does not use a WGL window" << endl;
> return false;
> }
>
because we use QTWindowIF, so dynamic_cast to WGLWindowIF failed, and return
false.Then cause other lots of problems.
How to fix it, any suggestion?
Thanks in advanced!
Aren.
--
View this message in context: http://n2.nabble.com/Re-problem-when-integrate-into-QT-tp4079765p4143470.html

Stefan Eilemann

unread,
Dec 10, 2009, 3:17:36 AM12/10/09
to eq-...@equalizergraphics.com
On Thu, Dec 10, 2009 at 4:08 AM, Aren [via Software]
<[hidden email]> wrote:

>     const OSWindow*    osWindow  = window->getOSWindow();
>     const WGLWindowIF* wglWindow = dynamic_cast< const WGLWindowIF*
>>(osWindow);
>     if( !wglWindow )
>     {
>         EQWARN << "Window does not use a WGL window" << endl;
>         return false;
>     }
>
> because we use QTWindowIF, so dynamic_cast to WGLWindowIF failed, and return
> false.Then cause other lots of problems.
> How to fix it, any suggestion?

You can implement WGLWindowIF for your QTWindow. Iirc it only needs to
return the WGL-specific RC and DC, which you can hopefully query from
Qt.


HTH,

Stefan


View this message in context: Re: [eq-dev] problem when integrate into QT

Aren

unread,
Dec 11, 2009, 1:55:43 AM12/11/09
to eq-...@equalizergraphics.com


Stefan Eilemann wrote:
>
>
> You can implement WGLWindowIF for your QTWindow. Iirc it only needs to
> return the WGL-specific RC and DC, which you can hopefully query from
> Qt.
>
> HTH,
>
> Stefan
>
>

Thanks a lot, it works!~
--
View this message in context: http://n2.nabble.com/Re-problem-when-integrate-into-QT-tp4079765p4149742.html


Sent from the Equalizer - Parallel Rendering mailing list archive at Nabble.com.

_______________________________________________

Reply all
Reply to author
Forward
0 new messages