Adding removing objects to the scene dynamically
#2
Thank you for posting error details.

From the call stack I was able to determine that you were adding and removing a PixelVisual3D (MeshObjectNode is used only by PixelVisual3D). I was also able to reproduce the exception - it happens when you show PixelVisual3D, then remove it from its parent and add the same PixelVisual3D instance back to the visual tree.

The problem is that current version of PixelVisual3D disposes its resources when it is removed from the visual tree and the resources are not recreated when it is added back to the visual tree - this causes the exception.

I will fix that in the next version of DXEngine (I do not plan to release it very soon).


To solve this you will need to create a new instance of PixelVisual3D when you will want to show it again.


PS:
I have a very complex test that adds, removes, transforms and otherwise changes the objects in a 3D scene. But unfortunately PixelVisual3D was not included in this test - I have already fixed that.
Andrej Benedik
  


Messages In This Thread
RE: Adding removing objects to the scene dynamically - by abenedik - 02-06-2018, 01:18 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)