DirectX under C#
-
I'm looking for information on the right way to draw to two different windows using a single DirectX device. The biggest key is device.Present(overrideWindow) but SwapBuffers also seem to be involved, and perhaps the Viewport settings may make a difference. I'd appreciate pointers to a good resource, comments, or suggestions. Working source code, of course, is even better. - - - - further detail: I am currently drawing one window with 2 viewports and Present() it. Then I draw the other window with a single viewport and Present(win2) it. The second window's viewport size gets misinterpreted, somehow, and it doesn't fill the second window even though it is explicitly set to use the window's full width and height. The first window's display is (not suprisingly) duplicated in the region not filled by the viewport on the second window. Drawing withing the viewport on the second window is correct. I do not have a separate SwapBuffer for the second window, since it doesn't seem necessary, and it is unclear to me what benefit it would provide. - - - - Mark