I’m creating a map/satellite image viewing app. I want to be able to load a very large jpg (or other format) and smoothly pan across it and zoom into it, etc.
I’d love to hear your opinions on how I can best do this. At the moment I’m looking into using this tile rendering library: http://www.mesa3d.org/brianp/TR.html.
IIRC the TR library is used for rendering to large images, not to display what is already available.
Anyway, I am using tiles, 2k x 2k (because older Ati GPUs have this texture size limit), to display images upto 128k x 128k. Have the big image stored is tiled format, to avoid unnecessary copies - only the needed tiles are loaded / displayed. Never actually went to 128k x 128k though…
Brian Paul’s tile rendering is the wrong approach. In that he draws to a very large virtual display by splitting it into framebuffer sized tiles and assembles it in memory. You almost want to do the opposite.
You can do a couple of things, you can tile your immagery into multiple textures and page them as needed, or if your image is small enough you can use a single compunent band separate textures and render with color masks. I’ve done both in different circumstances.
You’ll probably end up with multiple textures, it’s the most flexible approach but you will probably have to deal with with filtering issues and paging if you have REALLY big images, it’s not always straightforward. You could try the virtual terrain project for related work.