[osg-users] set proper size to window manager at startup

Robert Osfield robert.osfield at gmail.com
Mon Apr 18 03:28:45 PDT 2016


Hi Gianni,

It is appropriate for osgGA::EventQueue::setStartClick() to call clear() as
otherwise the queue would end up with inconsistent time stamps, as existing
events would have the wrong relative time.

The only alternative to this would be to reset all the event in the queue
so that their time was reset relative to the previous and new start ticks.
However, the setStartClick is something done at initialization of the
viewer, before event handling is meant to kick off, it's not something that
is meant for after start up.

Personally I think the problem you are seeing is in osgWidget relying upon
resize events at the start of the application, it really shouldn't rely
upon this.  I'm not the author though so pinpointing what it should do
would require sifting through the design and implementation to see a better
approach.  Unfortunately I don't have the time to do this right now.

Robert.

On 18 April 2016 at 11:19, Gianni Ambrosio <g.ambrosio+osg at gmail.com> wrote:

> OK, thanks Robert for the informations.
> So, just tio summarize the case for Cedric.
> When a Qt Application starts, most of Qt events (like resize, show,
> activate, ...) are sent to GLWidget before the OSG code handles them.
> GLWidget handles those events and queue them into OSG Eventqueue to be
> processed on the next frame() call. The problem in that the first call of
> ViewerBase::frame(double) calls
> setStartTick(osg::Timer::instance()->getStartTick()) (in realize() method)
> which clears the queued events. So this causes all events already queues
> not correctly handled.
>
> I found that setStartTick() call is used somewhere in OSG code. I can
> suggest to call eventQueue.clear() before setStartTick() separatedly when
> needed instead of calling it directly inside setStartTick() but I'm not
> aware of the overall OSG code and possible consequences.
>
> Hope this helps.
> Gianni
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=66854#66854
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160418/85fb2602/attachment-0003.htm>


More information about the osg-users mailing list