BackBufferHeight and BackBufferWidth

The properties BackBufferHeight and BackBufferWidth have the value 0 until I set theses properties to another value and call graphics.ApplyChanges(). Do I have to set values at the beginning of my application. Or should I determinate the size of the backbuffer using Window.ClientHeight and Window.ClientWidth-Methods?
[331 byte] By [Simpson474] at [2007-12-24]
# 1
The BackBufferHeight and BackBufferWidth determine the size of your screen so you will want to set them at the beginning, before anything is rendered.

hope that helps

PeterD. at 2007-10-8 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...
# 2
Those properties should be set to the size of the current device if one is created. Sounds like a bug to me. You should enter it in connect.
TheZMan at 2007-10-8 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...
# 3
But don't these values simply default to something when you first start the application, if you haven't explicitly set them?

I don't recall setting them explicitly when I first started coding with XNA and I never got a zero sized screen.

ZMan what exactly makes this a bug?

PeterD. at 2007-10-8 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...
# 4
Yep, they don't default to 0,0 so the properties should refelct whatever that default size is surely? If the current backbuffer is 640,480 even if thats the default I should get 640,480 back.
TheZMan at 2007-10-8 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...
# 5

According to what I know the back buffer height and width properties are only needed to be set if you want to control the resolution.

Now if for example the back buffer value really was zero then you wouldn't be able to see anything because the ziewing space (if you will) is 0, 0.

So this is one of the two

1) It is a bug and the back buffer properties are really suppose to return the current back buffer size even if you haven't set them

OR

2) The back buffer is 0, 0 until you set them then it sends the command to the graphics card to change the resolution to your desired value

In it is good practice to set the back buffers even if it has a default value it will give your application more control. But it is required of you to set the back buffers before your application can go fullscreen.

A 13 Year Old Programmer

wakawaka54 at 2007-10-8 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...
# 6
I've submitted this to connect. Let's see
Simpson474 at 2007-10-8 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...