Sign in to follow this  
TriML

Viewports or Rectangles for different views?

Recommended Posts

TriML    124
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
circlesoft    1178
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

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