How to capture a opengl window at background on windows?

At background means minimized, SW_HIDE, off screen, partially off screen, or something else. Wondering how all of these operates.

I’d like to capture a window rendered by opengl. It is created by another program (currently Virtualbox) which I can’t touch.

Hooks should be avoided if possible, for Virtualbox is a somehow low-level program and hooking it may cause instability I think.

Thanks in advance.