multiple viewports

KissPsycho

New member
Joined
Jan 24, 2007
Messages
1
hi all,
i am new to mdx, and i want to know, is it possible to create 3d applications like level editor, mesh viewer using mdx,

1.particularly i want to know is it possible to create multiple view ports
using swap chains techniques in mdx

tnx
 
SwapChain object

It sure is. The SwapChain object can be used to create additional swap chains:

C#:
PresentParameters   presParams = new PresentParameters();

//Set up parameters
presParams.DeviceWindow = someControl;
presParams.Windowed = true;
presParams.SwapEffect = SwapEffect.Discard;
//etc

//Create new swap chain
SwapChain newChain = new SwapChain(someDevice, presParams);

You can then render to the swap chain by calling the SetRenderTarget method of the Device, setting device properties (eg viewport and transformations), then rendering. Finally the SwapChain object has a Present method to perform the backbuffer flip.

Good luck :cool:
 
Last edited by a moderator:
Back
Top