Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Setting the Viewport for rendering

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Shashwat Rohilla   Members   

130
Like
0Likes
Like

Posted 20 February 2012 - 12:57 PM

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

#2 Washu   Senior Moderators   

7803
Like
0Likes
Like

Posted 20 February 2012 - 02:26 PM

http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevice.viewport.aspx

Might help

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 Shashwat Rohilla   Members   

130
Like
0Likes
Like

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).




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.