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

Gianni Ambrosio g.ambrosio+osg at gmail.com
Mon Apr 18 03:19:00 PDT 2016


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








More information about the osg-users mailing list