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
Setting the Viewport for rendering
Started by Shashwat Rohilla, Feb 20 2012 12:57 PM
2 replies to this topic
Sponsor:
#2 Senior Moderators - Reputation: 3114
Posted 20 February 2012 - 02:26 PM
In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
ScapeCode - Blog | SlimDX
#3 Members - Reputation: 123
Posted 27 February 2012 - 06:52 AM
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).
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).






