I have a question about what happens when my ogl canvas is behind some other window.
I have an OpenGL app for which rendering takes quite some time (say 10 or 20 seconds, I use LOD and continuously refine to reach the final image).
To offset the slow rendering, when rendering completes I capture an image of the canvas and use that on the next repaint when possible.
But if my ogl canvas is partially or fully covered by some other app, when I capture the image the parts of the canvas that were behind other apps are garbage. I need to detect this and decide to redraw the canvas instead of using the captured image in these situations.
So how can I tell if my ogl canvas is covered by some other app while I’m drawing? I tried checking the current DC and context and they don’t change. Does OpenGL have this information, or do I need to get it from my windowing system?
I am very confused.
Thanks!