954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Render Panel to Image / Another Panel

Hello,

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?

Resnymph
Newbie Poster
7 posts since Feb 2010
Reputation Points: 10
Solved Threads: 2
 

The following thread might help.
Printing Panel in C# desktop Application

Not sure how this will handle OpenGL / DirectX rendered image though.

nick.crane
Nearly a Posting Virtuoso
1,230 posts since Feb 2010
Reputation Points: 375
Solved Threads: 187
 

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).

Resnymph
Newbie Poster
7 posts since Feb 2010
Reputation Points: 10
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: