USNavalResearchLaboratory / simdissdk

SIMDIS SDK
Other
120 stars 42 forks source link

Toggling Platform Highlight Causes Icon To Disappear #76

Closed cipperly closed 3 years ago

cipperly commented 3 years ago

In example_imageicons, toggling the highlight on and then off causes the icon itself to disappear. You have to re-enable the highlight to make the icon visible. Tested on SDK version 1.15 on Windows using Visual Studio 2019.

emminizer commented 3 years ago

Thanks for your report. I have reproduced the problem and am investigating.

You can temporarily work around this by adding the following code, disabling the icon factory's "fast path":

#include "simVis/PlatformIconFactory.h"
// ...
  simVis::PlatformIconFactory::instance()->setEnabled(false);
emminizer commented 3 years ago

The issue is not seen in SIMDIS proper, where we actually have a regression test on this very thing because it was a problem a few weeks back. The underlying cause in the example is an osg::clone() that was generating a geometry node that had an invalid image texture. I was able to fix this by setting the data variance to DYNAMIC on the image (not the texture). I don't think this should be required, but it fixed the issue on my side.

Thanks again for the report. Tracking down the underlying cause was more difficult than expected.

cipperly commented 3 years ago

Thanks Daniel. I can confirm that your fix worked for me also. Thanks for the quick turnaround.