Toggling Platform Highlight Causes Icon To Disappear
Closed this issue · 3 comments
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.
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);
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.
Thanks Daniel. I can confirm that your fix worked for me also. Thanks for the quick turnaround.