Thanks. I guess this answers my question. On Wednesday, May 19, 2021 at 11:22:32 AM UTC+3 [email protected] wrote:
> Hi Igor, > > On Wed, 19 May 2021 at 08:37, Igor Baidiuk <[email protected]> wrote: > >> Thanks for your answer. Although I believe you misunderstood my question >> in some aspects. >> >> First, I'm working with OSG, not VSG. >> > > Actually, I mistyped the single reference to VSG, I meant to type OSG. My > whole reply related to just the OSG. My main focus these days is the VSG > so I can type it automatically without realizing. Sorry for the confusion. > > > >> And AFAIK OSG's threading model is quite limited - because OpenGL doesn't >> support any kind of multithreaded rendering. >> > > OpenGL only supports thread per context, so each context can only be > driven by a single thread at any time, The OSG's viewer threading is built > around this constraint. > > >> Second, I mentioned Qt/QML to simply be more specific. I don't expect you >> or anyone else to help me with my work or tweak OSG somehow. >> Third, the question itself isn't that specific IMO to Qt. It's a >> situation where scene/UI rendering is performed on a separate thread, which >> is synchronized with main UI thread on each frame. My code ensures that >> scene graph is mutated in any way only at that specific synchronization >> point. My only issue is that I need to perform ray picking (or some other >> minor read accesses) over scene graph on main UI thread while scene may be >> rendered on render thread at the same time. If rendering mutates some parts >> of scene graph internally, then I may have issues. If not, then I'm good. >> > > Principally the rendering threads (cull and draw) don't write to the scene > graph, they just read from it. There are a limited number of exceptions > where nodes are view dependent and cache state within the node. This means > it should be safe to run an intersection traversal at the same time as the > viewer.renderingTraversals() is running. > > Cheers, > Robert. > > > > -- You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/174f6b17-75a7-431e-b107-fd5c4db1d0edn%40googlegroups.com.
