I need to know when Map layer does its update. This occurs when zoom or rotation changes and low resolution tile is replaced by detalized one. I tried to find some callbacks or virtual functions but could not. At least i need recieve event when whole map is updated, but it would be great to get it on each tile of each layer.
Please, help me to find some methods or different solution.
Thank you for advice, gwaldron, but it is not exactly what i need.
My primary purpose is to draw as less frames as it possible. I call frame() method manually only on several conditions. Now i need to update tiles after camera changes. As i discovered from code inspection, tiles getting their updates from traverse() method that is result of frame() call. That is mean that i need to call frame() on my Viewer many times untill all tiles are ready. But when i should stop doing my calls?
For example RexTerrainEngineNode has PageLoader object as child which has Requests map which i could analize and check if it contains not finished requests. Requests field is protected, but i can inherit from PageLoader and get it. But i cant create PageLoader object getting unresolved refference link errors (mb because it is in library osgdb_osgearth_engine_rex).
There is also TileNodeRegistry object in RexTerrainEngineNode, but it is private.
What you are after (I believe) is called an ON_DEMAND frame scheme, in which the OSG viewer will only call frame() when something changes. Although you can request this scheme through the osgViewer::Viewer API, the REX terrain engine does not support it. It's on the to-do list but we don't have a specific time frame for it.
The REX terrain engine is encapsulated in a plugin - it is an internal library and API access is not available.
I saw frame scheme option and reworked Viewer::checkNeedToDoFrame() method in my class to not get spam from RexTerrainEngineNode. Anyway can i do something to check tile's state or something else for my needs?
I extremely need last ImageLayer support for textures input :)
In my ON_DEMAND implementation only one need is to know when i should stop call frame(). For example if i do it N times, it can be enough for tiles to be updated. But if connection is too slow it can be not enough.
OK, looks like there are no api abilities.