Multiple Sub-window Buffer-to-Texture problem

I’m currently stuck on this problem. What I have currently set up is two glutSubWindows in a 2x1 fashion. What I want to do is to save everything on my main window (the combination of both subWindows) into a single texture.

Any ideas/advice/help would be appreciated