Archived

This topic is now archived and is closed to further replies.

NightShade

Rendering to multiple windows (MFC/DX8)

Recommended Posts

Hi. I''m creating an editor using MFC. There will be dialogs that display things from random 2d stuff to parts of 3d meshes. Think 3d max, kind of, but more dialog-based. I''m wondering what the accepted way to do this is with DirectX8. I''m thinking of making a set of swap chains using CreateAdditionalSwapChain, then for each one I need to render to, call SetRenderTarget with the Swap Chain''s back buffer. Render and display. Does that sound right? Can anybody point me in the direction of a tutorial that displays 2 things at once, in seperate windows, using DirectX8? Thanks!
-ns-

Share this post


Link to post
Share on other sites
one good way is to create one window that covers the entire area you want to draw to, then draw to subregions by calling SetViewport.

Look in the SDK docs for info on viewports. I''ve always assumed that''s much cheaper than dealing with the regions as actual separate entities.

Share this post


Link to post
Share on other sites
Thanks for the reply!

I''ll look into it. I actually just got the CreateAdditionalSwapChain() stuff working somewhat also.

I''m not really sure what the benefits of either one might be however. I imagine the SwapChain method will let the windows stack and move around easier, and the viewport method will save memory, but that''s just a guess.

Thanks again!



-ns-

Share this post


Link to post
Share on other sites