[osg-users] How can I know the number of GUIEventAdapter::USER in the message queue for GUIEventHandler?

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Sat Nov 28 03:12:16 PST 2020


On Sat, 28 Nov 2020 at 06:47, OpenSceneGraph Users <
osg-users at lists.openscenegraph.org> wrote:

> Is there a problem with adding or removing OSG nodes directly in the Qt
> Widget events?
>

If your application is running single threaded then adding/removing objects
from the scene graph should not be an issue.  It'll only be something to be
careful about when the application is multi-threaded.  The Qt aspect should
not have any bearing on the operation as long as race condition isn't
introduced.


> My idea is to send OSG USER events to complete the operation of adding and
> removing OSG nodes.
>

Technically you could do it, I don't know why you think it's useful, it's
not something I know of others doing.  This is entirely something your
application will be doing, you can't ask use about how your code works or
doesn't work.

 Perhaps a far better thing to do would be to take a big step back and
rather aks about implementation details on a "solution" to a problem you've
dreamed up and only lives in your code, tell us about what you want your
application to do at a high level,  Perhaps then we can just tell you what
is normally done in this situation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20201128/b0c4c1a6/attachment.html>


More information about the osg-users mailing list