OpenSpace
OpenSpace copied to clipboard
Use font atlas for text globe layers
The layer types TileIndexTileLayer
and TileIndexTileLayer
make use of font rendering to render text on to tiles. However, the text is rendered to tiles which get cached and takes up memory, also, the time it takes for the rendering to tiles FBOs leads to stuttering.
What we would want to do is to instead of letting text layers use tiles, is to do the actual text rendering as the chunks are rendered. Then there is no need for caching and tiles do not need to be pre-rendered.
The only layer type which is not a tile layer type is the SolidColor
type. Similarly to that one, a text layer type could be added which do not make use of cached tiles and use its own shader uniforms. This text layer type could be extended with the specific text layers that we want (tile index and size reference for example). Another interesting thing would be a lat-long grid with numeric values for latitude and longitude.
That would be great! For future reference, minimizing the number of framebuffer target changes might be important when rendering out the fonts every frame