Sign in to follow this  
Shashwat Rohilla

Setting the Viewport for rendering

Recommended Posts

I'm using XNA 4.0 in VS 2010

Please tell me how to set a particular part of the screen for rendering.
eg I want to use 70% of the screen for 3D rendering (left side) and rest 30% (right side) for displaying the scores and other information.

I tried to use change some variables but they were all read-only.
Thanks

Share this post


Link to post
Share on other sites
Washu    7829
[url="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevice.viewport.aspx"]http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevice.viewport.aspx[/url]

Might help

Share this post


Link to post
Share on other sites
It helped me.
I was able to create two different viewports.
But I wanted to color both of them with different backgrounds.
I used GraphicsDevice(Color.Green) after setting it to different viewports but it renders the whole window (not just the specified viewport).

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