Sign in to follow this  

Viewports or Rectangles for different views?

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

This topic is 4392 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this