XNA rendering on GDI HDC
I am integrating with an application that uses plugins. I have my own plugin that is provided an HDC to draw on, this works fine using C#
Graphics gfx = Graphics.FromHdc(hdc);
I can then draw using GDI without issue.
I would like to start experimenting with XNA, I've loaded a few sample projects and had a look through the code.开发者_JAVA技巧 It appears that by default XNA handles the creation of the window and when I should be redrawing each frame.
What I need to be able to do is use XNA to render a frame when the plugin's render event is raised. Then either render directly to the plugin HDC or to copy the XNA image to it.
Can this be done? Does anyone have any examples? I'm very new to XNA.
Thanks
There is a winforms sample that shows you how to custom create the XNA graphics device and then render it onto a windows form control.
http://creators.xna.com/en-US/sample/winforms_series1
精彩评论