gwaldron / osgearth

3D Maps for OpenSceneGraph / C++14
https://www.pelicanmapping.com/home-1/opensource
Other
1.47k stars 772 forks source link

Call function dirty() of my custom imagelayer which inherit from imageLayer didn't make createImageImplementation re-execute #2535

Closed luoxiaozhu closed 3 months ago

luoxiaozhu commented 3 months ago

osgEarth Version (required): 3.5 What is the problem? Hi ,I made my custom imageLayer which inherite from Imagelayer,and reimplement createImageImplementation to use the parameters of tilekey to query the elements in the local database, and the visibility of these elements change according to the user operations, So after I modify the visibility of certain elements I need createImageImplementation method can perform again, so I changed elements in visibility called after the layer of dirty method and set the layer of caching policy to NO_CACHE in advance,but function createImageImplementation didn't re-execute as i wish , I don't know what to do, hope to get your advice,thank you.

gwaldron commented 3 months ago

Try calling one of the mapNode->getTerrainEngine()->invalidateRegion(...) functions.

luoxiaozhu commented 3 months ago

hi gwaldron,thank you so much,it works!