Jump to content
  • Advertisement
Sign in to follow this  
TriML

Viewports or Rectangles for different views?

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

I have to display four different views on the same screen. Currently i am using D3DVIEWPORT9 to define the view areas and draw data accordingly. But the data is created with reference to the whole screen size. Is it possible to use rectangles instead of viewport, so that the data is positioned without any change?

Share this post


Link to post
Share on other sites
Advertisement
Yes, you could render your 4 views to 4 different render-targets, and then render those render-targets as quads at the appropriate positions. If you have never used render-targets before, check this tutorial out. Basically, its exactly like normal rendering, except that you render to a texture instead. This allows you to use that texture again later in your pipeline, usually as a source.

Remember that you can use ID3DXSprite for drawing the RT's to the actual backbuffer once you have rendered them all.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!