Hi Lukas,
I have do a test applying your patch and get the errors X11 your
mention, I haven't dug into the example QT implementation or
osgViewer::GraphicsWIndowX11 yet, but it does sound like we might need
to refactor either the example or GraphicsWindowX11 to avoid the
issue. I would like to see these fixed as end users wouldn't be able
to deploy an app that produces these warnings.
In your follow up post you write:
"Sorry, forgot to mention that i've remove the header definitions for mac
and windows. Please add the original header definitions from the
example."
I couldn't spot any code related this this. Could be specific about
what you mean here.
On a final note, the placement of the:
#if USE_QT4
if (arugments.read("--MTCompositeViewer"))
{
..
}
...
Makes the CompositeViewer code a bit more awkward, with the code
indendent when it needn't be and there is an extra #if def's around
the close } bracket that is at first look confusing.
A better structuring of your MTCompositeViewer code would be to put it
after the --CompositeViewer block, then you could just put the #if
USE_QT4 around one single block, and indentation could remain more
consistent between the blocks.
As there a couple of issues outstanding that need resolving I'm going
to hold off from merging right now. Could you restructure the code as
per the suggestion above and explain/resolve the header definitions.
Cheers,
Robert.
On Wed, Oct 15, 2008 at 9:07 PM, Lukas Diduch <[EMAIL PROTECTED]> wrote:
>
> This mod to QOSGWidget enables multithreaded rendering using QOSGWidget using
> CompositeViewer. It demonstrates as well the embedding of QOSGWidget into
> other
> QTWidgets. Performance is very good (70 fps) on AMD 3Ghz, FedoraCore8 using
> NVidia 8600GTS.
>
>
> usage:
> ~~~~~~
>
> osgviewerQT --QOSGWidget --MTCompositeViewer cow.osg
>
>
> There are some issues with this mod:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> 1. Other multithreading modes fail.
>
> 2. Correct Widget inheritance is crucial to functionality.
>
> 3. Written for QT4 only
>
> 4. Using 'ClickToFocus'. Select the widget first before manipulating.
>
> 5. though working fine we get a BadWindow error message see thread
>
> [osg-users] Multiple Contexts in QT Applications
>
> 6. Although the problem (point 5) is related to deranged traits values
> which are set by failing a call to XGetWindowAttributes in
> GraphicsWindowX11::setWindow the following fix (to set traits only if
> XGetWindowAttributes returns with no error) does not solve the problem
> properly:
>
> @ line 750, GraphicsWindowX11.cpp
>
> Status s = XGetWindowAttributes( _display, _window, &watt );
> if (s = True)
> {
> _traits->x = watt.x;
> _traits->y = watt.y;
> _traits->width = watt.width;
> _traits->height = watt.height;
> }
>
> The context can be embedded and displayed but somehow the
> perspective is distored in this case. That's why we set the traits
> in QOSGWidget::createContext after initializing the graphicsContext.
>
>
> Regards,
> Lukas
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org