Rex terrain engine and updating custom tile source images with requiresUpdateCall

classic Classic list List threaded Threaded
3 messages Options
smani smani
Reply | Threaded
Open this post in threaded view
|

Rex terrain engine and updating custom tile source images with requiresUpdateCall

Hi

I have a custom tile source which returns tile images derived from osg::Image with overridden requiresUpdateCall to notify when an image should be updated. This worked well with the old mp engine, but with the rex engine I haven't been able to find a way to notify the terrain engine that it should check for images which need to be updated (so in short, requiresUpdateCall is never called). Any pointers how to achieve this? Note that mMapNode->getTerrainEngine()->dirtyTerrain() works in refreshing the terrain, but it appears to rebuilt it completely, not just updating the images which need to be updated.

Thanks
Sandro
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Rex terrain engine and updating custom tile source images with requiresUpdateCall

What version of osgEarth are you using?
I've just testing this succesfully in both 2.10.x and 3.x -- you can see it in action by running the WMS-T example:

osgearth_sequencecontrol wms-t_nexrad_animated.earth
Glenn Waldron / Pelican Mapping
smani smani
Reply | Threaded
Open this post in threaded view
|

Re: Rex terrain engine and updating custom tile source images with requiresUpdateCall

Thanks for your reply.

I'm on 2.10.x, but not using earth files, rather directly setting up the globe in C++.

I realize though that my description wasn't very clear. My issue is that I have some external trigger which causes the tile-source to rerender the tiles. I suppose I then need to notify osg that something has changed, which would then trigger [1]. But as far as I can see, just requesting a new frame with osgViewer->requestRedraw(); does not trigger this.

[1] https://github.com/gwaldron/osgearth/blob/master/src/osgEarthDrivers/engine_rex/TileNode.cpp#L717