- Create a texture, renderbuffer, and framebuffer object
- bind the framebuffer object to your opengl context
- attach the texture to the color component of the framebuffer
- attach the renderbuffer to the depth component of the framebuffer
- render to this framebuffer
- switch to default framebuffer
- render the texture to your viewports.
details about FBO: http://www.opengl.org/wiki/Framebuffer_Objects
make sure you share the opengl context between the 2 viewports (see: http://wiki.wxwidgets.org/WxGLCanvas#Sharing_wxGLCanvas_context)