xna-4.0


When to use PresentationParameters.BackBufferWidth vs .Viewport.Width


Had to shorten the calls to make the question more readable but...
When is correct or incorrect to use on or the other ?
I guess in most cases is the same as you just have the one Viewport but if going split screen I guess you ll have more
Usually you want the viewport size, as this is the region within which rendering actually takes place.
If you ever add anything like split-screen or picture-in-picture rendering, then you must use the viewport. So you may as well use it to begin with.
You should use the backbuffer size only when that is what you actually want. For example, you want the backbuffer when taking screenshots, or setting viewport positions.
I've got a more detailed answer to a very similar question over on the game dev site.

Related Links

Platformer tile engine--advice on what to do with long tiles
XNA Vector2 path contained inside rectangle
XNA changing 200 or so tiles pixels
Loading files during run time in XNA 4.0
Optimized keyboard controls for XNA game
Best structure for xna Arcade Game
xna 4 taking desktop screenshot
Can't reset my gametime to zero in XNA
Displaying seconds in XNA with Keypress?
XNA game how to make a snake tail
Creating an array of game objects
Lap timer in XNA 4.0?
XNA: Identifying identical sprites created with for loop
Increase Character Spacing in XNA
XNA choosing a subgroup of Game.Components
Loading Silverlight Texture2D from Resources

Categories

HOME
keras
deezer
google-play
onedrive
octobercms
cvs
c#-2.0
retrofit
alpha
volttron
kentor-authservices
rascal
handsontable
correlation
google-cloud-spanner
timeout
circular-dependency
carthage
lombok
opentracing
openrefine
flux
ml
php-openssl
rundeck
poltergeist
internet-explorer-9
brunch
filezilla
maxmind
maquette
react-chartjs
ioio
create-table
titanium-mobile
webtest
atl
http-digest
lto
multilingual
splice
email-templates
elmah
android-mediaprojection
nxlog
taffy
fault
worker-thread
nodebb
akka-cluster
parallel-data-warehouse
passport-google-oauth
infix-notation
asp.net-4.5
xml-attribute
fuzzy-search
firebaseui
gridview-sorting
contact-list
connect-by
superstack
fadeout
hexdump
cloudbees
energy
xna-4.0
eclipse-clp
kcachegrind
0xdbe
twirl
operation
remobjects
dereference
device-orientation
sorl-thumbnail
tt-news
winddk
document-classification
reactfx
hippomocks
ember-charts
fmod
terminal-services
pyhdf
file-locking
distutils
dsn
errai
ticoredatasync
postgresql-performance
stage
zpt
cinema-4d
jmock
dmx512
xsdobjectgen
firefox4
ugc

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App