Weird texture update behaviour

Hello everyone,



I've got a world containing two terrainpages. By default one (the Current Map View) is set to Dynamic Culling while the other (the Future Map View) is set to Cull Always. Every so often an update event is given in which the heightmap and/or texture are updated. The texture update causes an ImageGraphics object to be updated which is associated with the map.



Each of these Map objects is a combination of a TerrainPage and a Quad, each with their own, different, texture. Dependant on the distance of the camera from the Map one of the two is shown. By default the page is set to cull always and the quad is set to cull dynamic.



This is my problem: The game starts and we're looking at the current map view. Something occurs which causes the future map view to update. Remember, we haven't seen that view yet. If we switch to that view now, the texture has not been updated correctly, but the heightmap has. From now on every update results in a correct update of the textures.



The question: Why doesn't the texture update is the terrainpage or quad hasn't been 'seen' at least once? It looks like the objects need to have been set to cull dynamic at least once for the textures to want to update.


If it only happens the very first time that the texture is displayed, maybe it's due to the fact that the texture is not yet created. You can check this by looking if it has a texture id > 0. You can cause the texture to be created by putting it in a TextureState and invoking the apply method of that state.