Jump to content
  • Advertisement

Archived

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

Newbie00

Viewport

This topic is 5282 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

Is it possible to copy viewport 1 into viewport 2 and have them both be showing on the screen at the same time while in the same window? If so, how would I do this?

Share this post


Link to post
Share on other sites
Advertisement
If you''re referring to split-screens, then i don''t think you do it as you are suggesting. I think its more a case of doing everything twice for each viewport.

I''m someone else could shed more light on this.

regards

ace

Share this post


Link to post
Share on other sites
Straight from the SDK: "To draw multiple views within a scene, repeat the IDirect3DDevice9::SetViewport and draw geometry sequence for each view."

But, I think there is something else you could do: access the back-buffer using IDirect3DDevice9::GetRenderTarget(). With the IDirect3DSurface9 it gives you, you can do multiple IDirect3DSurface9::LockRect()''s (one for each viewport, I suppose), then copy the data from viewport1''s rect to viewport2''s rect. This will be slow though, so I don''t recommend it.


Dustin Franklin
Mircrosoft DirectX MVP

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!