I am conceptualizing an approach to improve the current implementation of opengl in an application. The application has high res image (max i have seen till now is 40k x 24k). These images are made of 512x512 tiles.(Ignore the issues like 40k is not divisible by 512).
[li]If there are 4 textures on the screen of size(512x512) and window size being(1024x1024), then i have 4 threads holding 4 textureId’s. Using immediate mode rendering textures and then rendered on the screen so as to fill the entire window.
[/li][li]The textures are bound to change depending upon panning. So new textures are created using a separate thread.
[/li][li]Zooming in also happens so image size changes where new high res image tiles are loaded.
[li]I am thnking of getting rid of immediate mode rendering.
[/li][li]First I am planning to use Texture 2d array to store the textures and reduce the number of draw calls. (Still a bit unclear about this approach)
[/li][li]Second I am planning to use PBO to load textures from RAM to GPU via DMA.
[/li][li]Third can I generate textures once and then use glTexSubImage2D with PBO to update new texture data as I pan the image. (One thing to worry about here is what happens when you zoom in/out, the number of textures on the window change.)
Any suggetions and tips on the above approach are helpful. If there are other methods to improve the performace they are welcome too. I am beginner in opengl so correct me if I have misunderstood some concept.