I have created an application that passes a Handle of a panel to a DLL which is then used for creating a DirectX or OpenGL render window, all of which works fine.

I wish to duplicate what is rendered in the panel elsewhere (basically multiple render windows all rendering the same thing).

My approach was to do something along the lines of this:

1. Create a panel (offscreen).
2. Take 'screen shots' of the panel and render them to my render windows (sizing as appropriate).

My problem lies with the second step in that I cannot get it to render the contents of the panel that have been created via the OpenGL / DirectX rendering.

Does anyone know of a way I can render the contents of a panel (which may not be on screen) and save it to another panel or image?

8 Years
Discussion Span
Last Post by Resnymph

Hi Nick,

Thanks for the help, unfortunately the draw to bitmap code didn't do the trick - it did render the panel but not the OpenGL contents (I think this is possibly down to the panel not actually containing what the OpenGL code renders - or at least it doesn't know about it at the C# application phase).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.