I use osgEarth in an environment with relatively low-end GPUs. I noticed at least on Linux with the Nvidia driver, the whole system becomes unuseable when there is an over-subscription of memory, i.e. the total GPU memory allocated by all processes is close to (or maybe exceeds?) the maximum available dedicated GPU memory.
Is there a way in osgEarth to restrict the amount of allocated GPU resources, e.g. the number currently bound tile textures? Like I would like osgEarth not to use more than 1GB of GPU memory and if it does reach that limit it should start paging out the tiles unless it is below than that threshold.
). Now, performance feels a lot more consistent, frame drops/hitches when the tile textures are loaded are much less noticeable. But I have to do more extensive profiling.
However, I'm not sure whether setting the max texture pool size really sets a maximum bound for the texture allocation, i.e. if the pool has no more memory available, more textures are probably just allocated as if not using the texture pool?
Besides, do you think osgEarth would also benefit from setting the OSG buffer pool size (via
Do you know some heuristics/back-of-the-envelope calculations one could employ to determine the amount of required GPU memory for a given set of map data (maybe using number of layers, number of LODs, tile resolution, ...?)
Is there a way to configure osgEarth to use GL texture compression? I noticed there is an option called "compressNormalMaps" in the 'TerrainOptions' class. But I don't use normal maps, just offline TMS image/elevation layers without lighting.
Also, in this class there is an option "expirationThreshold" which I set to 0. The way I interpret this is that by doing so it could also reduce GPU memory since unused tiles are expired immediately instead of keeping them around? I did not notice any effect on memory however.
You can set the buffer object size too, but the BO's are much smaller than the textures in general so it won't have as critical of an impact. Can't hurt though? I really don't know much at all about the implementation.
To enable texture compression by default you can set this in your earth file:
<map> <options> <terrain texture_compression="auto" ...