Jump to content
  • Advertisement

Archived

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

CtrlAltDelete

how 2 display more than 1 3d surface in D3D?

This topic is 6940 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok I have already designed the code to create a program that correctly inits and displays a Depth corrected, fullscreen 3D image using double buffering, now my next step in this is to create multiple 3d views(all on 1 monitor) each one being independent of the others. how is this done? Thanks in advance, Chuck

Share this post


Link to post
Share on other sites
Advertisement
Im sorry but I only know 2D DX, but i would think that you just replicated all the objects needed for one 3D view four times. Like you need a surface for one view, make four surfaces for multiple views. Then just tell each view to only draw to its surface, and tell each surface to blit (if this is still consistant in DX3D) to the correct quadrant of the screen. I can''t garantee good framerate if your doing more than plain looking at the views, though (i.e rotating, translating, etc) Oh, and make sure to scale the image down 1/2 in the x and y dimensions to make draw the whole view, only smaller. .

Share this post


Link to post
Share on other sites
hmmm ok I get what your saying ,I was thinking something along those lines aswell but the question im left with now is...

Does every individual 3D view have its own viewport, device, and depth buffer?
Does it have a all of the above or a combination?

Thanks , Chuck

Share this post


Link to post
Share on other sites
quote:
Original post by Zipster

Im sorry but I only know 2D DX, but i would think that you just replicated all the objects needed for one 3D view four times.


WHOA!!!...

Use a camera, or rahter four cameras. Just make sure that when camera #1 is being drawn it goes on off-screen #1, cam#2 on off#2, cam#3 off#3, etc.....

Then you just blit those views onto the backbuffer, and flip, or blit if in windows mode.







Share this post


Link to post
Share on other sites
And if you are using IM Mode, just change your Render Target (D3DDevice->SetRenderTarget) to another surface, this is the fastest way (according to the DirectX FAQ).
You could create a secondayry (or tertiary or...) D3DDevice, but that is very inefficient.

So all you have to do is create some Offscreen Plain Surfaces, change the render Target after drawing to one Surface, and at the end Blit them all to the Primary Surface.

Lars

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!