<div dir="ltr"><div>Hi Vaillancourt,</div><div><br></div><div>The OSG does not provide thread safe sharing of contexts, and OpenGL itself doesn't provide it either, so even if we attempted to mutex lock all access to GL objects that multi-threaded nature of graphics would step around locks we attempted to add. If you want to share contexts then you'll need to use single threading.<br></div><div><br></div><div>With the VSG Vulkan objects are per logical device so you can share objects on the same hardware in a more user controlled way, one still has to take care because the objects aren't generally safe to read/write to one has to use explicit synchronization when managing objects to avoid threading collisions. The VSG and Vulkan have waaay lower CPU overhead so multi-threading is actually far less critical for performance, paradoxically as Vulkan is so much better at handling threading!<br></div><div><br></div><div>Robert.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 30 Sep 2020 at 14:05, OpenSceneGraph Users <<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Greetings. </div><div> </div><div>Using OSG 3.6.3, we have experimented with the 'osgwindows' example, loading a test model and observing the VRAM usage. </div><div><br></div><div>We saw that having two graphics context, set to each camera of the two windows (as in the example) has twice the VRAM footprint usage compared to using a single graphics context, camera and window.</div><div> </div><div>Is there a multi-thread safe way to only have a single VRAM footprint usage, using two graphics contexts/cameras/windows ?</div><div> </div><div>We have tried "sharing" the first graphics context to the 'traits->sharedContext' of the second window. </div><div><br></div><div>This seems to have given us the the desired effect of single VRAM footprint usage, but any multi-threading model seems to be unstable, not functional.</div><div> </div><div>Thank you!</div><div><br></div><div>- Vaillancourt</div></div>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com" target="_blank">osg-users+unsubscribe@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/fec92607-7b68-4144-b480-5cd2c071283fo%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank">https://groups.google.com/d/msgid/osg-users/fec92607-7b68-4144-b480-5cd2c071283fo%40googlegroups.com</a>.<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div>