# Clear this up for me

## Recommended Posts

I am not sure where I am supposed to be setting my screen size dimensions for DX, but my best guess as of now is the
D3DPRESENT_PARAMETERS
//BackBufferWidth
//BackBufferHeight


sets the screen size for fullscreen rendering? If so then why does my call to d3d9->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3dDisplayMode); keep setting my size to 1600x1200 when I tell my app to init the window to 1024x768? I am confused to what is happening and have looked at examples and ran out of ideas... Thanks

##### Share on other sites
Ok I think I got it, I was calling

and then sending the d3dDisplayMode to my D3DPRESENT_PARAMETERS back buffer width/height variables...

now I set my

D3DDISPLAYMODE d3dDisplayMode variable explictly and don't call

anymore and seems to work. Is this correct? If so I am assuming

just gets the current display mode regardless of what you setup the D3DDISPLAYMODE to if you send the returned value from GetAdapterDisplayMode to the back buffer width and height variables and don't explicitly set the values yourself... Thanks

##### Share on other sites
Yes, back buffer width and back buffer height are the right properties to set. I don't know exactly what's wrong, cause I've never hand any problems. I assume that you are in fullscreen and are on the primary monitor. Also when are you calling that function? You might actually be getting the right resolution. Try to use the functions in the ID3D9Device instead. Try device.GetDisplayMode instead.

edit.

lol, I'm not sure what you're trying to do, but GetDisplayMode reads the current display mode, you don't need to use it when creating a device. You should just directly set the variables in PresentParams

## Create an account

Register a new account

• ## Partner Spotlight

• ### Forum Statistics

• Total Topics
627681
• Total Posts
2978611

• 13
• 12
• 10
• 12
• 22