Setting the screen resolution

Started by
1 comment, last by Agony 19 years, 2 months ago
I'm using pDirect3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3ddm); to get the screen size and set the buffers in full screen. However, my screen has a higher resolution than what I want to run the game in. Is there an equivalent SetAdapterDisplayMode? Code complete isn't pulling up anything. Thanks. -Nick
Advertisement
You set it via the present parameters when creating the D3D device.
------------------------See my games programming site at: www.toymaker.info
The width/height/color-depth information can be specified in the D3DPRESENT_PARAMETERS structure that is used in two functions, CreateDevice() and Reset(). The structure contains three members, BackBufferWidth, BackBufferHeight, and BackBufferFormat, that are relevant to your inquiry. Most examples probably just use the values obtained from GetAdapterDisplayMode(), but this is by no means mandatory.
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas only, and not for things themselves." - John Locke

This topic is closed to new replies.

Advertisement