[osg-users] Changing another thread's node's StateSet's data

Fei Liu 1243153982 at qq.com
Mon Dec 12 17:54:22 PST 2016

CTW_Liu wrote:
> Hi,
> I have a project which is required WPF to show a 3d scene, so I create a CLR dll project and a C++ dll project which use OSG. All of them were created in VS2013 and my osg version is 3.4.0.
> One of the demands in my project is that users can change model's texture through WPF's button. I create a thread for OSG scene, and another thread for interaction. However, I found that when I want to read specific node's StateSet through WPF, the image object which in Texture2D points to NULL. And because of this, I can't modify node's StateSet directly. Also, I found that I can't copy the nodes' StateSet for reusing or deleting them. I can only  set node's StateSet with a new StateSet, but I have no idea in recovering the model's texture.
> So I want to ask how to change node's StateSet directly through WPF and CLR, or how to save completely StateSet's data to a global buffer which will be read by another thread.
> Thank you!
> Cheers,
> Fei

Read this topic online here:

More information about the osg-users mailing list