I follow the MouseCoordsTool source file to output the geographic coordinates of the mouse on the screen.The application sometimes gets stuck because the node event callback calls GeoPoint:: makeGeographic, where GDAL_SCOPED_LOCK is called.A large number of GDAL_SCOPED_LOCK in the program,when load geographic data.
Because I started multi-threaded rendering, when I change the scene rendering node, I need to change the node during event callback or update callback.
How should I improve my program?
Getting rid of the GDAL_SCOPED_LOCK is one of the things we hope to look into for osgEarth 3.x. It is there because GDAL in the past was not guaranteed to be thread-safe. This situation is better now, but will require some re-factoring and testing in order to safely get rid of the mutex.